Skip to content

Commit f054068

Browse files
authored
APS-3966, APS-4050 - Runtime Groups (#1331)
1 parent b78f202 commit f054068

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3406
-527
lines changed

.github/workflows/aps-cypress-e2e.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
# Start following logs in the background with continuous output
5757
docker logs -f cypress-e2e 2>&1 &
5858
LOG_PID=$!
59-
59+
6060
while true; do
6161
if [ "$(docker ps -aq -f status=exited -f name=cypress-e2e)" ]; then
6262
echo "Cypress tests completed."
@@ -120,7 +120,7 @@ jobs:
120120
with:
121121
name: astra-scan-results
122122
path: ${{ github.workspace }}/e2e/cypress/fixtures/state/scanResult.json
123-
123+
124124
- name: Check for failed tests and create Issue
125125
if: always()
126126
env:
@@ -163,4 +163,4 @@ jobs:
163163
env:
164164
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
165165
JIRA_API_KEY: ${{ secrets.JIRA_API_KEY }}
166-
ASTRA_SCAN_RESULTS: ${{ github.workspace }}/e2e/cypress/fixtures/state/scanResult.json
166+
ASTRA_SCAN_RESULTS: ${{ github.workspace }}/e2e/cypress/fixtures/state/scanResult.json

.github/workflows/ci-build-feeders.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@ jobs:
3131

3232
- uses: actions/checkout@v2
3333

34+
- name: Install oc
35+
uses: redhat-actions/oc-installer@v1
36+
with:
37+
version: '4.6'
38+
39+
- name: Authenticate to silver and set context
40+
uses: redhat-actions/oc-login@v1
41+
with:
42+
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
43+
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
44+
45+
# Disables SSL cert checking. Use this if you don't have the certificate authority data.
46+
insecure_skip_tls_verify: true
47+
48+
namespace: ${{ env.OPENSHIFT_NAMESPACE }}
49+
3450
- name: Login to DockerHub
3551
uses: docker/login-action@v1
3652
with:
@@ -66,22 +82,6 @@ jobs:
6682
- name: Push
6783
run: docker push ${{ steps.docker_meta.outputs.tags }}
6884

69-
- name: Install oc
70-
uses: redhat-actions/oc-installer@v1
71-
with:
72-
version: '4.6'
73-
74-
- name: Authenticate and set context
75-
uses: redhat-actions/oc-login@v1
76-
with:
77-
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
78-
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
79-
80-
# Disables SSL cert checking. Use this if you don't have the certificate authority data.
81-
insecure_skip_tls_verify: true
82-
83-
namespace: ${{ env.OPENSHIFT_NAMESPACE }}
84-
8585
- name: 'Get Helm'
8686
if: github.ref != 'refs/heads/dev'
8787
run: |
@@ -143,7 +143,6 @@ jobs:
143143
helm repo add bcgov http://bcgov.github.io/helm-charts
144144
helm upgrade --install proto-asp-${{ steps.set-deploy-id.outputs.DEPLOY_ID }}-feeder -f values.yaml --history-max 3 bcgov/generic-api
145145
146-
147146
- name: Authenticate to Gold and set context
148147
if: github.ref == 'refs/heads/test'
149148
uses: redhat-actions/oc-login@v1
@@ -157,4 +156,3 @@ jobs:
157156
if: github.ref == 'refs/heads/test'
158157
run: |
159158
oc rollout restart deployment/bcgov-aps-portal-feeder-generic-api -n ${{ secrets.OPENSHIFT_GOLD_TEST_NAMESPACE }}
160-

.github/workflows/ci-feat-sonar.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ jobs:
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
61-
SONAR_HOST_URL: https://sonarcloud.io

e2e/cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default defineConfig({
4444
'./cypress/tests/19-*/*.ts',
4545
'./cypress/tests/20-*/*.ts',
4646
'./cypress/tests/21-*/**/*.ts',
47+
'./cypress/tests/22-*/**/*.ts',
4748
]
4849
return config
4950
},

e2e/cypress/support/auth-commands.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,20 @@ Cypress.Commands.add(
463463
}
464464
)
465465

466+
Cypress.Commands.add(
467+
'makeKongProxyRequest',
468+
(serviceName: string, methodType: string, body: any = undefined) => {
469+
let authorization
470+
return cy.request({
471+
url: Cypress.env('KONG_URL'),
472+
method: methodType,
473+
headers: { Host: `${serviceName}` + '.api.gov.bc.ca' },
474+
body: body,
475+
failOnStatusCode: false,
476+
})
477+
}
478+
)
479+
466480
Cypress.Commands.add(
467481
'makeKongGatewayRequest',
468482
(endpoint: string, requestName: string, methodType: string) => {
@@ -569,6 +583,10 @@ Cypress.Commands.add('setRequestBody', (body: any) => {
569583
requestBody = JSON.stringify(body)
570584
})
571585

586+
Cypress.Commands.add('clearRequestBody', () => {
587+
requestBody = undefined
588+
})
589+
572590
Cypress.Commands.add('setRequestFormData', (body: FormData) => {
573591
requestBody = body
574592
})

e2e/cypress/support/global.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ declare namespace Cypress {
2626

2727
makeKongRequest(serviceName: string, methodType: string, key?: string): Chainable<any>
2828

29+
makeKongProxyRequest(serviceName: string, methodType: string): Chainable<any>
30+
2931
makeKongGatewayRequestUsingClientIDSecret(
3032
hostURL: string,
3133
methodType?: string
@@ -94,6 +96,8 @@ declare namespace Cypress {
9496

9597
setRequestBody(requestBody: any): void
9698

99+
clearRequestBody(): void
100+
97101
setQueryString(qs: any): void
98102

99103
setRequestFormData(body: FormData): void

e2e/cypress/support/prep-commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Cypress.Commands.add('buildOrgGatewayDatasetAndProduct', (): Cypress.Chainable<a
1414
name: `ministry-of-kittens-${orgId}`,
1515
title: 'Some good title about kittens',
1616
description: 'Some good description about kittens',
17-
tags: [],
17+
tags: ['member_class:MIN', `member_id:${orgId}`],
1818
orgUnits: [
1919
{
2020
name: `division-of-toys-${orgId}`,
@@ -130,7 +130,7 @@ Cypress.Commands.add('buildOrgGatewayDatasetAndProduct', (): Cypress.Chainable<a
130130
organization: {
131131
name: org.name,
132132
title: 'Some good title about kittens',
133-
tags: [],
133+
tags: ['member_class:MIN', `member_id:${orgId}`],
134134
description: 'Some good description about kittens',
135135
},
136136
organizationUnit: {

0 commit comments

Comments
 (0)