Skip to content

[GPCAPIM-289]-[Pass integration tests through APIM proxy (with mock CIS2)]-[RP]#101

Open
BJSS-russell-pollock wants to merge 1 commit intomainfrom
feature/GPCAPIM-289
Open

[GPCAPIM-289]-[Pass integration tests through APIM proxy (with mock CIS2)]-[RP]#101
BJSS-russell-pollock wants to merge 1 commit intomainfrom
feature/GPCAPIM-289

Conversation

@BJSS-russell-pollock
Copy link
Contributor

Description

To allow for the CI process to run before the APIM integration has been completed, the tests are currently executed against a container running within the same process, which invokes the lambda in the same way as it would be ran within AWS. This ticket looks to alter the target of the tests to instead point at the deployed APIM proxy for the Pull Request.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@BJSS-russell-pollock BJSS-russell-pollock self-assigned this Mar 4, 2026
@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-289 branch 4 times, most recently from df1f8b1 to b2e781a Compare March 5, 2026 09:21
@BJSS-russell-pollock BJSS-russell-pollock deleted the feature/GPCAPIM-289 branch March 5, 2026 09:24
@BJSS-russell-pollock BJSS-russell-pollock restored the feature/GPCAPIM-289 branch March 5, 2026 09:25
@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-289 branch 20 times, most recently from f091e19 to 444df7e Compare March 11, 2026 22:58
@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-289 branch 14 times, most recently from 57c54ca to d90a051 Compare March 12, 2026 13:25
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

Trivy gate: no Critical/High vulnerabilities.

Trivy Filesystem Scan Summary

Filesystem: infrastructure/environments/preview

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 0
UNKNOWN 0

✅ No vulnerabilities found.

@github-actions
Copy link

github-actions bot commented Mar 12, 2026

Trivy gate: no Critical/High vulnerabilities.

Trivy Filesystem Scan Summary

Filesystem: .

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 0
UNKNOWN 0

✅ No vulnerabilities found.

@BJSS-russell-pollock BJSS-russell-pollock force-pushed the feature/GPCAPIM-289 branch 7 times, most recently from f9af754 to 0a50194 Compare March 12, 2026 16:25
@sonarqubecloud
Copy link

@github-actions
Copy link

Deployment Complete

@BJSS-russell-pollock BJSS-russell-pollock marked this pull request as ready for review March 12, 2026 16:51
@BJSS-russell-pollock BJSS-russell-pollock requested a review from a team as a code owner March 12, 2026 16:51
@@ -0,0 +1,84 @@
name: "Run test suite"
description: |
Composite action that runs a single test type (unit/contract/schema/integration/acceptance),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composite action that can run any one of the test types: unit/contract/schema/integration/acceptance

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or

Composite action that is used to run the test types:

name: "Run test suite"
description: |
Composite action that runs a single test type (unit/contract/schema/integration/acceptance),
uploads the test artefacts, and publishes a JUnit summary to the GitHub Actions job.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

junit and html

required: true
apigee-access-token:
description: "Apigee access token"
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the env defaults to remote:

env:
description: "Environment: local or remote"
required: false
default: "remote"

as you have further down - should this 'apigee-access-token' default to true as you say above that this token is required for a remote run?

ENV: ${{ inputs.env }}
run: |
if [[ -n "${APIGEE_ACCESS_TOKEN}" ]]; then
echo "::add-mask::${APIGEE_ACCESS_TOKEN}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

if it masks the log when why log it out?

- name: Retrieve Apigee Token
id: apigee-token
shell: bash
run: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run: set -euo pipefail

if: always()
run: |
[ -f "gateway-api/test-artefacts/contract-tests.xml" ] && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
echo "::add-mask::$APIGEE_TOKEN"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question about the mask

[ -f "gateway-api/test-artefacts/contract-tests.xml" ] && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
echo "::add-mask::$APIGEE_TOKEN"
printf 'apigee-access-token=%s\n' "$APIGEE_TOKEN" >> "$GITHUB_OUTPUT"
echo "Token retrieved successfully (length: ${#APIGEE_TOKEN})"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need the mask?

STUB_SDS: "true"
STUB_PDS: "true"
STUB_PROVIDER: "true"
ENV: "local"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are setting the ENV as remote or local on each of the specific test jobs why do we need it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants