Skip to content

Commit d0f55ce

Browse files
committed
Use 9002 port
1 parent e7b7510 commit d0f55ce

13 files changed

Lines changed: 60 additions & 60 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818

1919
- name: Start MinIO server
2020
run: |
21-
docker run -d -p 9000:9000 -p 9001:9001 \
21+
docker run -d -p 9002:9002 -p 9003:9003 \
2222
-e "MINIO_ROOT_USER=minio_access" \
2323
-e "MINIO_ROOT_PASSWORD=minio_secret" \
2424
--name minio-server \
2525
s3cpp-minio:latest \
26-
server /data --console-address ":9001"
26+
server /data --address ":9002" --console-address ":9003"
2727
28-
timeout 30 bash -c 'until curl -f http://localhost:9000/minio/health/live 2>/dev/null; do sleep 1; done'
28+
timeout 30 bash -c 'until curl -f http://localhost:9002/minio/health/live 2>/dev/null; do sleep 1; done'
2929
3030
- name: Install dependencies
3131
run: |

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ RUN useradd -r minio-user && \
1818
mkdir -p /data && \
1919
chown minio-user:minio-user /data
2020

21-
EXPOSE 9000 9001
21+
EXPOSE 9002 9003
2222

2323
USER minio-user
2424

2525
ENTRYPOINT ["/usr/local/bin/minio"]
26-
CMD ["server", "/data", "--console-address", ":9001"]
26+
CMD ["server", "/data", "--address", ":9002", "--console-address", ":9003"]
2727

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ Some tests require a local MinIO container to be running:
183183

184184
```bash
185185
$ docker build -t s3cpp-minio:latest .
186-
$ docker run -d -p 9000:9000 -p 9001:9001 \
186+
$ docker run -d -p 9002:9002 -p 9003:9003 \
187187
-e "MINIO_ROOT_USER=minio_access" \
188188
-e "MINIO_ROOT_PASSWORD=minio_secret" \
189189
s3cpp-minio:latest \
190-
server /data --console-address ":9001"
190+
server /data --address ":9002" --console-address ":9003"
191191
```
192192

193193
The full test suite contains 63 tests

benchmark/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ A local MinIO instance is expected to be running already. The current `test.cpp`
1414

1515
```bash
1616
$ docker build -t s3cpp-minio:latest ..
17-
$ docker run -d -p 9000:9000 -p 9001:9001 \
17+
$ docker run -d -p 9002:9002 -p 9003:9003 \
1818
-e "MINIO_ROOT_USER=minio_access" \
1919
-e "MINIO_ROOT_PASSWORD=minio_secret" \
2020
s3cpp-minio:latest \
21-
server /data --console-address ":9001"
21+
server /data --address ":9002" --console-address ":9003"
2222
```
2323

2424
## Usage

benchmark/aws-sdk-cpp/task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static bench::ClientHandle initialize_client(const char *access,
1717
Aws::InitAPI(options);
1818

1919
Aws::S3::S3ClientConfiguration clientConfig;
20-
clientConfig.endpointOverride = "http://127.0.0.1:9000/";
20+
clientConfig.endpointOverride = "http://127.0.0.1:9002/";
2121
clientConfig.region = "eu-west-1";
2222
clientConfig.scheme = Aws::Http::Scheme::HTTP;
2323

benchmark/aws-sdk-go-v2/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var p runtime.Pinner // yolo
2727
func initialize_client(access, secret, endpoint string) *s3.Client {
2828
cfg, err := config.LoadDefaultConfig(context.TODO(),
2929
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(access, secret, "")),
30-
config.WithBaseEndpoint("http://127.0.0.1:9000/"),
30+
config.WithBaseEndpoint("http://127.0.0.1:9002/"),
3131
config.WithDefaultRegion("eu-west-2"),
3232
)
3333
if err != nil {

benchmark/aws-sdk-rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn initialize_client(access: String, secret: String, endpoint: String) -> Client
2222
let credentials = Credentials::from_keys(access, secret, None);
2323
let config = Config::builder()
2424
.credentials_provider(credentials)
25-
.endpoint_url("http://127.0.0.1:9000/")
25+
.endpoint_url("http://127.0.0.1:9002/")
2626
.region(Region::new("eu-west-1"))
2727
.build();
2828
let client = aws_sdk_s3::Client::from_conf(config);

benchmark/benchmark.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace s3b {
99
static void benchmark_init_client(::benchmark::State &state, s3b::implementation impl) {
1010
const std::string access_ = "minio_access";
1111
const std::string secret_ = "minio_secret";
12-
const std::string endpoint_ = "127.0.0.1:9000";
12+
const std::string endpoint_ = "127.0.0.1:9002";
1313
for (auto _ : state) {
14-
auto handle = impl.init_client("minio_access", "minio_secret", "127.0.0.1:9000");
14+
auto handle = impl.init_client("minio_access", "minio_secret", "127.0.0.1:9002");
1515
::benchmark::DoNotOptimize(handle);
1616
state.PauseTiming();
1717
impl.free_client(handle);
@@ -85,7 +85,7 @@ static std::string get_benchmark_name(const std::string &aws_operation, const im
8585
} // namespace s3b
8686

8787
int main(int argc, char *argv[]) {
88-
s3b::check_endpoint("127.0.0.1:9000");
88+
s3b::check_endpoint("127.0.0.1:9002");
8989
s3b::clean_up();
9090

9191
std::array<s3b::implementation, s3b::implementations_count> implementations = s3b::parse_implementations();

benchmark/implementations.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ inline implementation parse_implementation(const char *so_path) {
7878
std::exit(1);
7979
}
8080

81-
return implementation{so_path, init_client("minio_access", "minio_secret", "127.0.0.1:9000"),
81+
return implementation{so_path, init_client("minio_access", "minio_secret", "127.0.0.1:9002"),
8282
init_client, create_bucket,
8383
put_object, get_object, free_client};
8484
}
@@ -130,7 +130,7 @@ inline void clean_up() {
130130

131131
// TODO(cristian): use another port/ip for benchmark to not collide with core s3cpp tests...
132132
s3cpp::S3Client client =
133-
s3cpp::S3Client("minio_access", "minio_secret", "127.0.0.1:9000", s3cpp::S3AddressingStyle::PathStyle);
133+
s3cpp::S3Client("minio_access", "minio_secret", "127.0.0.1:9002", s3cpp::S3AddressingStyle::PathStyle);
134134

135135
auto result = client.ListBuckets();
136136
if (!result.has_value()) {
@@ -154,11 +154,11 @@ inline void check_endpoint(const std::string &endpoint) {
154154
if (!s3cpp::Ping(endpoint)) {
155155
std::println(stderr, "MinIO is not running. Start it with:\n"
156156
" docker build -t s3cpp-minio:latest ..\n"
157-
" docker run -d -p 9000:9000 -p 9001:9001 \\\n"
157+
" docker run -d -p 9002:9002 -p 9003:9003 \\\n"
158158
" -e \"MINIO_ROOT_USER=minio_access\" \\\n"
159159
" -e \"MINIO_ROOT_PASSWORD=minio_secret\" \\\n"
160160
" s3cpp-minio:latest \\\n"
161-
" server /data --console-address \":9001\"");
161+
" server /data --address \":9002\" --console-address \":9003\"");
162162
std::exit(1);
163163
}
164164
}

benchmark/s3cpp/task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static bench::ClientHandle initialize_client(const char *access,
99
const char *secret,
1010
const char *endpoint) {
1111
auto client = new S3Client(access, secret,
12-
endpoint, // 127.0.0.1:9000
12+
endpoint, // 127.0.0.1:9002
1313
s3cpp::S3AddressingStyle::PathStyle);
1414
return reinterpret_cast<bench::ClientHandle>(client);
1515
}

0 commit comments

Comments
 (0)