Skip to content

Commit c4869c0

Browse files
Merge pull request #656 from adobe/issue/e2e-tests-failing
Issue/e2e tests failing
2 parents 5e083c6 + 9c3cb46 commit c4869c0

File tree

5 files changed

+324
-17
lines changed

5 files changed

+324
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
15-
node-version: [12.x, 14.x, 16.x]
15+
node-version: [14.x, 16.x]
1616
include:
1717
- os: ubuntu-latest
1818
node-version: 14.x
@@ -28,13 +28,6 @@ jobs:
2828
- run: npm version
2929
- run: npm install
3030
- run: npm test
31-
- run: npm run e2e
32-
env:
33-
E2E_CLIENT_ID: ${{ secrets.E2E_CLIENT_ID }}
34-
E2E_CLIENT_SECRET: ${{ secrets.E2E_CLIENT_SECRET }}
35-
E2E_TA_EMAIL: ${{ secrets.E2E_TA_EMAIL }}
36-
E2E_IMS_ORG_ID: ${{ secrets.E2E_IMS_ORG_ID }}
37-
E2E_PRIVATE_KEY_B64: ${{ secrets.E2E_PRIVATE_KEY_B64 }}
3831
- run: npm run semantic-release-dry-run
3932
- name: Codecov
4033
uses: codecov/[email protected]

.github/workflows/release.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ jobs:
2121
run: npm install
2222
- name: Test
2323
run: npm test
24-
- name: End to End Test
25-
run: npm run e2e
26-
env:
27-
E2E_CLIENT_ID: ${{ secrets.E2E_CLIENT_ID }}
28-
E2E_CLIENT_SECRET: ${{ secrets.E2E_CLIENT_SECRET }}
29-
E2E_TA_EMAIL: ${{ secrets.E2E_TA_EMAIL }}
30-
E2E_IMS_ORG_ID: ${{ secrets.E2E_IMS_ORG_ID }}
31-
E2E_PRIVATE_KEY_B64: ${{ secrets.E2E_PRIVATE_KEY_B64 }}
3224
- name: Codecov
3325
uses: codecov/[email protected]
3426
with:

src/commands/cloudmanager/execution/get-step-details.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GetExecutionStepDetails extends BaseCommand {
3131

3232
const buildStep = stepStates.find(stepState => stepState.action === 'build')
3333
const codeQualityStep = stepStates.find(stepState => stepState.action === 'codeQuality')
34-
if (buildStep.status === 'FINISHED') {
34+
if (buildStep.status === 'FINISHED' && codeQualityStep) {
3535
codeQualityStep.startedAt = buildStep.finishedAt
3636
}
3737

test/commands/execution/get-step-details.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const { resetCurrentOrgId, setCurrentOrgId } = require('@adobe/aio-lib-ims')
1616
const GetExecutionStepDetails = require('../../../src/commands/cloudmanager/execution/get-step-details')
1717
const execution1010 = require('../../data/execution1010.json')
1818
const execution1011 = require('../../data/execution1011.json')
19+
const execution1013 = require('../../data/execution1013.json')
1920

2021
beforeEach(() => {
2122
resetCurrentOrgId()
@@ -95,3 +96,20 @@ test('get-execution-step-details - cancelled build', async () => {
9596

9697
await expect(cli.table.mock.calls[0][0][2].startedAt).toBeUndefined()
9798
})
99+
100+
test('get-execution-step-details - result with no code quality step', async () => {
101+
setCurrentOrgId('good')
102+
mockSdk.getExecution = jest.fn(() => execution1013)
103+
104+
expect.assertions(7)
105+
106+
const runResult = GetExecutionStepDetails.run(['5', '--programId', '5', '1002'])
107+
await expect(runResult instanceof Promise).toBeTruthy()
108+
109+
await expect(runResult).resolves.toBeTruthy()
110+
await expect(init.mock.calls.length).toEqual(1)
111+
await expect(init).toHaveBeenCalledWith('good', 'test-client-id', 'fake-token', 'https://cloudmanager.adobe.io')
112+
await expect(mockSdk.getExecution.mock.calls.length).toEqual(1)
113+
await expect(mockSdk.getExecution).toHaveBeenCalledWith('5', '5', '1002')
114+
await expect(cli.table.mock.calls).toHaveLength(1)
115+
})

test/data/execution1013.json

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
{
2+
"_embedded": {
3+
"stepStates": [
4+
{
5+
"_links": {
6+
"self": {
7+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8564/step/15482",
8+
"templated": false
9+
}
10+
},
11+
"id": "53034",
12+
"stepId": "15482",
13+
"phaseId": "8564",
14+
"executionId": "1007",
15+
"pipelineId": "7",
16+
"programId": "5",
17+
"action": "validate",
18+
"startedAt": "2019-07-08T23:40:54.030+0000",
19+
"finishedAt": "2019-07-08T23:40:57.129+0000",
20+
"updatedAt": "2019-07-08T23:40:57.198+0000",
21+
"status": "FINISHED"
22+
},
23+
{
24+
"_links": {
25+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
26+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8565/step/15483/logs",
27+
"templated": false
28+
},
29+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
30+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8565/step/15483/metrics",
31+
"templated": false
32+
},
33+
"self": {
34+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8565/step/15483",
35+
"templated": false
36+
}
37+
},
38+
"id": "53035",
39+
"stepId": "15483",
40+
"phaseId": "8565",
41+
"executionId": "1007",
42+
"pipelineId": "7",
43+
"programId": "5",
44+
"action": "build",
45+
"repository": "weretail",
46+
"branch": "master",
47+
"startedAt": "2019-07-08T23:40:58.355+0000",
48+
"finishedAt": "2019-07-08T23:47:48.522+0000",
49+
"updatedAt": "2019-07-08T23:47:48.602+0000",
50+
"status": "FINISHED"
51+
},
52+
{
53+
"_links": {
54+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
55+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15485/logs",
56+
"templated": false
57+
},
58+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
59+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15485/metrics",
60+
"templated": false
61+
},
62+
"self": {
63+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15485",
64+
"templated": false
65+
}
66+
},
67+
"id": "53037",
68+
"stepId": "15485",
69+
"phaseId": "8566",
70+
"executionId": "1007",
71+
"pipelineId": "7",
72+
"programId": "5",
73+
"action": "deploy",
74+
"environment": "weretail-global-b61e-01-stage",
75+
"environmentType": "stage",
76+
"environmentId": "1885",
77+
"assetCollectionId": "1",
78+
"startedAt": "2019-07-08T23:50:17.622+0000",
79+
"finishedAt": "2019-07-09T00:35:56.151+0000",
80+
"updatedAt": "2019-07-09T00:35:56.927+0000",
81+
"details": {
82+
"environmentUrls": [
83+
{
84+
"instanceType": "publish",
85+
"instanceUrl": "https://weretail-global-stage.adobecqms.net"
86+
},
87+
{
88+
"instanceType": "author",
89+
"instanceUrl": "https://author-weretail-global-stage.adobecqms.net"
90+
}
91+
],
92+
"deploymentStepDescription": "[{\"id\":1,\"stepAction\":\"perform-backup\",\"instanceId\":\"dispatcher1uswest2\",\"updated\":\"2019-07-08T23:50:33.512+0000\"},{\"id\":2,\"stepAction\":\"perform-backup\",\"instanceId\":\"author1uswest2\",\"updated\":\"2019-07-08T23:50:33.548+0000\"},{\"id\":3,\"stepAction\":\"perform-backup\",\"instanceId\":\"publish1uswest2\",\"updated\":\"2019-07-08T23:50:33.587+0000\"},{\"id\":4,\"stepAction\":\"manage-elb-links-detach\",\"instanceId\":\"dispatcher1uswest2\",\"updated\":\"2019-07-08T23:58:34.693+0000\"},{\"id\":5,\"stepAction\":\"install-client-packages\",\"instanceId\":\"publish1uswest2\",\"updated\":\"2019-07-08T23:59:21.131+0000\"},{\"id\":6,\"stepAction\":\"install-client-packages\",\"instanceId\":\"author1uswest2\",\"updated\":\"2019-07-08T23:59:21.291+0000\"},{\"id\":7,\"stepAction\":\"manage-elb-links-attach\",\"instanceId\":\"dispatcher1uswest2\",\"updated\":\"2019-07-09T00:35:14.727+0000\"}]"
93+
},
94+
"status": "FINISHED"
95+
},
96+
{
97+
"_links": {
98+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
99+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15486/logs",
100+
"templated": false
101+
},
102+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
103+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15486/metrics",
104+
"templated": false
105+
},
106+
"self": {
107+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15486",
108+
"templated": false
109+
}
110+
},
111+
"id": "53038",
112+
"stepId": "15486",
113+
"phaseId": "8566",
114+
"executionId": "1007",
115+
"pipelineId": "7",
116+
"programId": "5",
117+
"action": "securityTest",
118+
"environment": "weretail-global-b61e-01-stage",
119+
"environmentType": "stage",
120+
"environmentId": "1885",
121+
"assetCollectionId": "1",
122+
"startedAt": "2019-07-09T00:36:00.735+0000",
123+
"finishedAt": "2019-07-09T00:37:15.357+0000",
124+
"updatedAt": "2019-07-09T00:37:15.955+0000",
125+
"details": {
126+
"input": {
127+
"override": true
128+
}
129+
},
130+
"status": "FINISHED"
131+
},
132+
{
133+
"_links": {
134+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
135+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15487/logs",
136+
"templated": false
137+
},
138+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
139+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15487/metrics",
140+
"templated": false
141+
},
142+
"self": {
143+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15487",
144+
"templated": false
145+
}
146+
},
147+
"id": "53039",
148+
"stepId": "15487",
149+
"phaseId": "8566",
150+
"executionId": "1007",
151+
"pipelineId": "7",
152+
"programId": "5",
153+
"action": "loadTest",
154+
"environment": "weretail-global-b61e-01-stage",
155+
"environmentType": "stage",
156+
"environmentId": "1885",
157+
"assetCollectionId": "1",
158+
"startedAt": "2019-07-09T00:37:18.412+0000",
159+
"finishedAt": "2019-07-09T00:45:59.478+0000",
160+
"updatedAt": "2019-07-09T00:45:59.478+0000",
161+
"details": {},
162+
"status": "FINISHED"
163+
},
164+
{
165+
"_links": {
166+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
167+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15488/logs",
168+
"templated": false
169+
},
170+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
171+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15488/metrics",
172+
"templated": false
173+
},
174+
"self": {
175+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15488",
176+
"templated": false
177+
}
178+
},
179+
"id": "53040",
180+
"stepId": "15488",
181+
"phaseId": "8566",
182+
"executionId": "1007",
183+
"pipelineId": "7",
184+
"programId": "5",
185+
"action": "assetsTest",
186+
"environment": "weretail-global-b61e-01-stage",
187+
"environmentType": "stage",
188+
"environmentId": "1885",
189+
"assetCollectionId": "1",
190+
"startedAt": "2019-07-09T00:46:01.548+0000",
191+
"finishedAt": "2019-07-09T00:53:29.614+0000",
192+
"updatedAt": "2019-07-09T00:53:29.615+0000",
193+
"details": {},
194+
"status": "FINISHED"
195+
},
196+
{
197+
"_links": {
198+
"http://ns.adobe.com/adobecloud/rel/pipeline/logs": {
199+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15489/logs",
200+
"templated": false
201+
},
202+
"http://ns.adobe.com/adobecloud/rel/pipeline/metrics": {
203+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15489/metrics",
204+
"templated": false
205+
},
206+
"self": {
207+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8566/step/15489",
208+
"templated": false
209+
}
210+
},
211+
"id": "53041",
212+
"stepId": "15489",
213+
"phaseId": "8566",
214+
"executionId": "1007",
215+
"pipelineId": "7",
216+
"programId": "5",
217+
"action": "reportPerformanceTest",
218+
"environment": "weretail-global-b61e-01-stage",
219+
"environmentType": "stage",
220+
"environmentId": "1885",
221+
"assetCollectionId": "1",
222+
"startedAt": "2019-07-09T00:53:31.763+0000",
223+
"finishedAt": "2019-07-09T00:53:36.671+0000",
224+
"updatedAt": "2019-07-09T00:53:37.106+0000",
225+
"details": {},
226+
"status": "FINISHED"
227+
},
228+
{
229+
"_links": {
230+
"http://ns.adobe.com/adobecloud/rel/pipeline/advance": {
231+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8567/step/15490/advance",
232+
"templated": false
233+
},
234+
"http://ns.adobe.com/adobecloud/rel/pipeline/cancel": {
235+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8567/step/15490/cancel",
236+
"templated": false
237+
},
238+
"self": {
239+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8567/step/15490",
240+
"templated": false
241+
}
242+
},
243+
"id": "53042",
244+
"stepId": "15490",
245+
"phaseId": "8567",
246+
"executionId": "1007",
247+
"pipelineId": "7",
248+
"programId": "5",
249+
"action": "approval",
250+
"environment": "weretail-global-b61e-01-prod",
251+
"environmentType": "prod",
252+
"environmentId": "1884",
253+
"startedAt": "2019-07-09T00:55:00.842+0000",
254+
"updatedAt": "2019-07-09T00:55:00.909+0000",
255+
"details": {},
256+
"status": "FINISHED"
257+
},
258+
{
259+
"_links": {
260+
"self": {
261+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8567/step/15492",
262+
"templated": false
263+
},
264+
"http://ns.adobe.com/adobecloud/rel/pipeline/cancel": {
265+
"href": "/api/program/5/pipeline/7/execution/1007/phase/8567/step/15492/cancel",
266+
"templated": false
267+
}
268+
},
269+
"id": "53044",
270+
"stepId": "15492",
271+
"phaseId": "8567",
272+
"executionId": "1007",
273+
"pipelineId": "7",
274+
"programId": "5",
275+
"action": "deploy",
276+
"environment": "weretail-global-b61e-01-prod",
277+
"environmentType": "prod",
278+
"environmentId": "1884",
279+
"updatedAt": "2019-07-08T23:40:50.195+0000",
280+
"details": {
281+
"environmentUrls": [
282+
{
283+
"instanceType": "publish",
284+
"instanceUrl": "https://weretail-global-prod.adobecqms.net"
285+
},
286+
{
287+
"instanceType": "author",
288+
"instanceUrl": "https://author-weretail-global-prod.adobecqms.net"
289+
}
290+
]
291+
},
292+
"status": "WAITING"
293+
}
294+
]
295+
},
296+
"id": "1013",
297+
"programId": "5",
298+
"pipelineId": "7",
299+
"artifactsVersion": "2019.708.234050.000001007",
300+
"trigger": "MANUAL",
301+
"status": "RUNNING",
302+
"createdAt": "2019-07-08T23:40:50.123+0000",
303+
"updatedAt": "2019-07-08T23:47:57.853+0000"
304+
}

0 commit comments

Comments
 (0)