Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vscheuber committed Jun 11, 2024
1 parent 74610be commit b2c008b
Show file tree
Hide file tree
Showing 13 changed files with 6,991 additions and 5,941 deletions.
20 changes: 11 additions & 9 deletions test/e2e/__snapshots__/config-import.e2e.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ exports[`frodo config import "frodo config import -adf test/e2e/exports/all/Alph
"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1701393386423 [ba58ff99-76d3-4c69-9c4a-7f150ac70e2c]
- Resolving dependencies
✔ Resolved all dependencies.
[========================================] 100% | 16/16 | Finished Importing Everything!
[========================================] 100% | 6/6 | Finished importing journeys
Errors occurred during full config import
Error importing scripts
Error updating script
Expand Down Expand Up @@ -161,8 +159,6 @@ exports[`frodo config import "frodo config import -agCf test/e2e/exports/all/Alp
"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1701393386423 [ba58ff99-76d3-4c69-9c4a-7f150ac70e2c]
- Resolving dependencies
✔ Resolved all dependencies.
[========================================] 100% | 16/16 | Finished Importing Everything!
[========================================] 100% | 6/6 | Finished importing journeys
Errors occurred during full config import
Error importing config entities
Error updating config entity bravoOrgPrivileges
Expand All @@ -184,8 +180,10 @@ Errors occurred during full config import
Error deleting service 'SocialIdentityProviders' before import
Error deleting global full service config SocialIdentityProviders
HTTP client error
Code: ERR_BAD_RESPONSE
Status: 502
Code: ERR_BAD_REQUEST
Status: 403
Reason: Forbidden
Message: This operation is not available in ForgeRock Identity Cloud.
Error putting global full service config baseurl
Error deleting service 'baseurl' before import
Error deleting global full service config baseurl
Expand Down Expand Up @@ -240,11 +238,15 @@ exports[`frodo config import "frodo config import -arCf test/e2e/exports/all/Alp
"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1701393386423 [ba58ff99-76d3-4c69-9c4a-7f150ac70e2c]
- Resolving dependencies
✔ Resolved all dependencies.
[========================================] 100% | 16/16 | Finished Importing Everything!
[========================================] 100% | 6/6 | Finished importing journeys
Errors occurred during full config import
Error importing config entities
Error updating config entity bravoOrgPrivileges
Error updating config entity emailTemplate/forgottenUsername
HTTP client error
Code: ERR_BAD_REQUEST
Status: 401
Reason: Unauthorized
Message: Unauthorized
Error importing email templates
HTTP client error
Code: ERR_BAD_REQUEST
Status: 401
Expand Down
12 changes: 9 additions & 3 deletions test/e2e/config-import.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ describe('frodo config import', () => {
await exec(CMD, env);
fail("Command should've failed")
} catch (e) {
expect(removeAnsiEscapeCodes(e.stderr)).toMatchSnapshot();
// parallel test execution alters the progress bar output causing the snapshot to mismatch.
// only workable solution I could find was to remove progress bar output altogether from such tests.
expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot();
}
});

Expand All @@ -100,7 +102,9 @@ describe('frodo config import', () => {
await exec(CMD, env);
fail("Command should've failed")
} catch (e) {
expect(removeAnsiEscapeCodes(e.stderr)).toMatchSnapshot();
// parallel test execution alters the progress bar output causing the snapshot to mismatch.
// only workable solution I could find was to remove progress bar output altogether from such tests.
expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot();
}
});

Expand All @@ -110,7 +114,9 @@ describe('frodo config import', () => {
await exec(CMD, env);
fail("Command should've failed")
} catch (e) {
expect(removeAnsiEscapeCodes(e.stderr)).toMatchSnapshot();
// parallel test execution alters the progress bar output causing the snapshot to mismatch.
// only workable solution I could find was to remove progress bar output altogether from such tests.
expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot();
}
});

Expand Down
Loading

0 comments on commit b2c008b

Please sign in to comment.