s3/client: Keep server port on config

Currently the code temporarily assumes that the endpoint port is 9000.
This is what tests' local minio is started with. This patch keeps the
port number on endpoint config and makes test get the port number from
minio starting code via environment.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2023-04-12 19:20:01 +03:00
parent 85f06ca556
commit 3bec5ea2ce
7 changed files with 10 additions and 3 deletions

View File

@@ -22,6 +22,7 @@
s3::endpoint_config_ptr make_minio_config() {
s3::endpoint_config cfg = {
.port = std::stoul(tests::getenv_safe("S3_SERVER_PORT_FOR_TEST")),
};
return make_lw_shared<s3::endpoint_config>(std::move(cfg));
}