Skip to content

Commit 2b2e41d

Browse files
committed
Fix AWS token used in tests
The change in #1393 was not correct - although it exposed the new role, it never _used_ it anywhere and the net result was that the tests failed due to missing environment variables: https://github.com/hazelcast/hazelcast-cpp-client/blob/eb19e7f9f8789be79d79fbc1b29a3cf6f2bb98ad/hazelcast/test/src/HazelcastTests7.cpp#L1558-L1566 Added step to generate the required credentials, but still _without_ any hardcoded tokens.
1 parent eb19e7f commit 2b2e41d

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

.github/actions/build-test/unix/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,21 @@ runs:
4646
-DBUILD_TESTS=ON \
4747
-DBUILD_EXAMPLES=OFF
4848
49+
- name: Configure AWS credentials
50+
id: aws-credentials
51+
uses: aws-actions/configure-aws-credentials@v5
52+
with:
53+
role-to-assume: ${{ inputs.AWS_ROLE_TO_ASSUME }}
54+
aws-region: 'us-east-1'
55+
output-credentials: true
56+
4957
- name: Test
5058
if: ${{ inputs.RUN_TESTS == 'true' }}
5159
env:
5260
BUILD_DIR: build
5361
HAZELCAST_ENTERPRISE_KEY: ${{ inputs.HAZELCAST_ENTERPRISE_KEY }}
54-
AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }}
62+
AWS_ACCESS_KEY_ID: ${{ steps.aws-credentials.outputs.aws-access-key-id }}
63+
AWS_SECRET_ACCESS_KEY: ${{ steps.aws-credentials.outputs.aws-secret-access-key }}
5564
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ inputs.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }}
5665
BUILD_TYPE: ${{ inputs.BUILD_TYPE }}
5766
shell: bash

.github/actions/build-test/windows/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,22 @@ runs:
147147
-DBUILD_TESTS=ON `
148148
-DBUILD_EXAMPLES=OFF
149149
150+
- name: Configure AWS credentials
151+
id: aws-credentials
152+
uses: aws-actions/configure-aws-credentials@v5
153+
with:
154+
role-to-assume: ${{ inputs.AWS_ROLE_TO_ASSUME }}
155+
aws-region: 'us-east-1'
156+
output-credentials: true
157+
150158
- name: Test
151159
if: ${{ inputs.RUN_TESTS == 'true' }}
152160
env:
153161
BUILD_DIR: build
154162
BUILD_CONFIGURATION: ${{ inputs.BUILD_TYPE }}
155163
HAZELCAST_ENTERPRISE_KEY: ${{ inputs.HAZELCAST_ENTERPRISE_KEY }}
156-
AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }}
164+
AWS_ACCESS_KEY_ID: ${{ steps.aws-credentials.outputs.aws-access-key-id }}
165+
AWS_SECRET_ACCESS_KEY: ${{ steps.aws-credentials.outputs.aws-secret-access-key }}
157166
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ inputs.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }}
158167
SSL_CERT_FILE: 'C:\cacert.pem'
159168
shell: pwsh

.github/actions/coverage-report/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,21 @@ runs:
6969
-DBUILD_TESTS=ON \
7070
-DBUILD_EXAMPLES=OFF
7171
72+
- name: Configure AWS credentials
73+
id: aws-credentials
74+
uses: aws-actions/configure-aws-credentials@v5
75+
with:
76+
role-to-assume: ${{ inputs.AWS_ROLE_TO_ASSUME }}
77+
aws-region: 'us-east-1'
78+
output-credentials: true
79+
7280
- name: Test
7381
if: ${{ inputs.RUN_TESTS == 'true' }}
7482
env:
7583
BUILD_DIR: build
7684
HAZELCAST_ENTERPRISE_KEY: ${{ inputs.HAZELCAST_ENTERPRISE_KEY }}
77-
AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }}
85+
AWS_ACCESS_KEY_ID: ${{ steps.aws-credentials.outputs.aws-access-key-id }}
86+
AWS_SECRET_ACCESS_KEY: ${{ steps.aws-credentials.outputs.aws-secret-access-key }}
7887
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ inputs.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }}
7988
BUILD_TYPE: ${{ env.BUILD_TYPE }}
8089
shell: bash

0 commit comments

Comments
 (0)