-
Notifications
You must be signed in to change notification settings - Fork 83
Add end-to-end test case for API Platform + Gateway + Devportal integration #2471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DinithHerath
wants to merge
6
commits into
wso2:main
Choose a base branch
from
DinithHerath:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
13d521f
Add end-to-end test case for API Platform + Gateway + Devportal integ…
DinithHerath 0ee98fb
Add .gitignore for devportal webhook private key
DinithHerath 72d9033
Update E2E test configuration to exclude devportal scenarios for Post…
DinithHerath 52ac7db
Refactor webhook key management in E2E tests to generate RSA keys dyn…
DinithHerath 7578fb4
Remove redundant comments in devportal service description in docker-…
DinithHerath d74b2c5
Update subscription token encryption key in Docker Compose files to e…
DinithHerath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Platform API + Gateway + Developer Portal E2E | ||
|
|
||
| # Full three-plane end-to-end test: a subscription and API key created in the real | ||
| # developer portal are pushed to the real platform-api control plane over the signed | ||
| # webhook, propagated to the real gateway data plane, and used to invoke a secured | ||
| # API through the ingress. Also drives the credential lifecycle (revoke, expiry, | ||
| # plan change, pause/resume, token regen, remove) and verifies each at the gateway | ||
| # or via platform-api. | ||
| # | ||
| # The developer-portal scenarios are postgres-only (they need the shared postgres | ||
| # server for the devportal store + webhook round-trip), so this runs a single | ||
| # postgres job. It builds the developer-portal image on top of the platform-api, | ||
| # gateway and sample-service images. | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shall we ignore docs path |
||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| devportal-e2e: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | ||
| with: | ||
| go-version: '1.26.2' | ||
| cache-dependency-path: '**/go.sum' | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 | ||
|
|
||
| - name: Build platform-api image | ||
| run: make -C platform-api build IMAGE_NAME=platform-api VERSION=it-e2e | ||
|
|
||
| - name: Build gateway images (controller + runtime) | ||
| run: make build VERSION=it-e2e | ||
| working-directory: gateway | ||
|
|
||
| - name: Build sample-service image | ||
| run: make build | ||
| working-directory: samples/sample-service | ||
|
|
||
| - name: Build developer-portal image | ||
| run: make build VERSION=it-e2e | ||
| working-directory: portals/developer-portal | ||
|
|
||
| - name: Run developer-portal e2e (postgres) | ||
| # make build above tags the devportal image under the default registry, so | ||
| # point the compose at it. E2E_TAGS=@devportal runs both the happy-path and | ||
| # the credential-lifecycle scenario (the latter is tagged @devportal @lifecycle). | ||
| env: | ||
| E2E_DB: postgres | ||
| E2E_TAGS: '@devportal' | ||
| DEVPORTAL_IMAGE: ghcr.io/wso2/api-platform/developer-portal:it-e2e | ||
| run: go test -run TestFeatures -count=1 -v -timeout 25m ./... | ||
| working-directory: tests/integration-e2e | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # World-readable copy of the devportal webhook private key, generated by the | ||
| # suite (prepareWebhookKey) so the platform-api container can read the mount. | ||
| .webhook-key.it.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.