From b069242c180538a30312c5bfd9771ceff7680bb5 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 4 Jul 2024 20:44:37 +0400 Subject: [PATCH] tests: Fix REST gateway ENV variables in AIO tests ENV var containing listen endpoint of the REST GW differs b/w two tested versions. The easiest way is to set both. Signed-off-by: Leonard Lyubich --- pool/pool_aio_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pool/pool_aio_test.go b/pool/pool_aio_test.go index 4be2075f..e5a1a1d2 100644 --- a/pool/pool_aio_test.go +++ b/pool/pool_aio_test.go @@ -190,6 +190,7 @@ func runTests(_ context.Context, t *testing.T, nodeEndpoint string) { } func createDockerContainer(ctx context.Context, t *testing.T, image string) testcontainers.Container { + const restGWListenEndpoint = "0.0.0.0:8090" req := testcontainers.ContainerRequest{ Image: image, // timeout is chosen to have enough time for NeoFS chain deployment from scratch within NeoFS AIO @@ -198,11 +199,12 @@ func createDockerContainer(ctx context.Context, t *testing.T, image string) test Hostname: "aio_autotest_" + strconv.FormatInt(time.Now().UnixNano(), 36), ExposedPorts: []string{"8080/tcp"}, Env: map[string]string{ - "REST_GW_WALLET_PATH": "/config/wallet-rest.json", - "REST_GW_WALLET_PASSPHRASE": "one", - "REST_GW_WALLET_ADDRESS": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo", - "REST_GW_PEERS_0_ADDRESS": "localhost:8080", - "REST_GW_LISTEN_ADDRESS": "0.0.0.0:8090", + "REST_GW_WALLET_PATH": "/config/wallet-rest.json", + "REST_GW_WALLET_PASSPHRASE": "one", + "REST_GW_WALLET_ADDRESS": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo", + "REST_GW_POOL_PEERS_0_ADDRESS": "localhost:8080", + "REST_GW_LISTEN_ADDRESS": restGWListenEndpoint, // 0.39.0 + "REST_GW_SERVER_ENDPOINTS_0_ADDRESS": restGWListenEndpoint, // latest }, } aioC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{