Skip to content

Commit 0f3fb78

Browse files
Merge pull request #4855 from linuxfoundation/unicron-test-coverage-fix-broken-ci
Fix broken intermittent CI failures
2 parents bb63d7d + d93718b commit 0f3fb78

File tree

5 files changed

+9
-21
lines changed

5 files changed

+9
-21
lines changed

tests/functional/cypress/e2e/v4/projects.cy.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -374,19 +374,6 @@ describe('To Validate & get projects Activity Callback via API call', function (
374374
expectedStatus: 404,
375375
// No message check because body is empty
376376
},
377-
{
378-
title: 'GET /project-info/{projectSFID} with malformed projectSFID',
379-
method: 'GET',
380-
url: `${claBaseEndpoint}project-info/${badProjectSFID}`,
381-
expectedStatusLocal: 422,
382-
expectedStatusRemote: 422,
383-
expectedCodeLocal: 604,
384-
expectedCodeRemote: 604,
385-
expectedMessageLocal: 'projectSFID in path should be at least 15 chars long',
386-
expectedMessageRemote: 'projectSFID in path should be at least 15 chars long',
387-
expectedMessageContainsLocal: false,
388-
expectedMessageContainsRemote: false,
389-
},
390377

391378
// (Sanity) valid-looking parameters should succeed (or at least get past validation)
392379
{
@@ -409,13 +396,6 @@ describe('To Validate & get projects Activity Callback via API call', function (
409396
url: `${claBaseEndpoint}project/enabled/${exampleFoundationSFID}`,
410397
expectedStatus: 200,
411398
},
412-
{
413-
title: 'GET /project-info/{projectSFID} with valid projectSFID',
414-
method: 'GET',
415-
url: `${claBaseEndpoint}project-info/${exampleProjectSFID}`,
416-
expectedStatusLocal: 200,
417-
expectedStatusRemote: 200,
418-
},
419399
];
420400

421401
cy.wrap(cases).each((c: any) => {

tests/functional/cypress/support/commands.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export function getAPIBaseURL(version) {
260260
export function getXACLHeader() {
261261
const xacl = Cypress.env('XACL');
262262
if (xacl) {
263-
// cy.task('log', `--> using X-ACL ${shortenMiddle(xacl)} from env`);
263+
cy.task('log', `--> using X-ACL ${shortenMiddle(xacl)} from env`);
264264
return {
265265
'X-ACL': xacl,
266266
'X-USERNAME': 'lgryglicki',
@@ -292,6 +292,7 @@ export function getOAuth2Headers() {
292292

293293
let bearerToken = '';
294294
export function getTokenKey() {
295+
cy.task('log', `--> getting token`);
295296
const envToken = Cypress.env('TOKEN');
296297
if (envToken) {
297298
cy.task('log', `--> getting token from env`);

tests/functional/utils/run-single-test-local.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Typical: TOKEN='-' ALL=1 ./utils/run-single-test-local.sh
23
if [ -z "${TOKEN}" ]
34
then
45
export TOKEN="$(cat ./token.secret)"

tests/functional/utils/run-single-test-remote.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
# Typical TOKEN='-' XACL='-' ALL=1 ./utils/run-single-test-remote.sh
3+
# Manually: DEBUG=1 xvfb-run -a npx cypress run --env DEBUG=1
24
if [ -z "${TOKEN}" ]
35
then
46
export TOKEN="$(cat ./token.secret)"

tests/functional/utils/run-single-test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,15 @@ fi
6565
if ( [ ! -z "${TOKEN}" ] && [ ! "${TOKEN}" = "-" ] )
6666
then
6767
ENV_ARGS="${ENV_ARGS:+$ENV_ARGS,}TOKEN=${TOKEN}"
68+
else
69+
unset TOKEN
6870
fi
6971

7072
if ( [ ! -z "${XACL}" ] && [ ! "${XACL}" = "-" ] )
7173
then
7274
ENV_ARGS="${ENV_ARGS:+$ENV_ARGS,}XACL=${XACL}"
75+
else
76+
unset XACL
7377
fi
7478

7579
if [ ! -z "${ENV_ARGS}" ]; then

0 commit comments

Comments
 (0)