Skip to content

Commit

Permalink
Merge pull request #305 from vscheuber/main
Browse files Browse the repository at this point in the history
fix saml cot import tests and snapshots
  • Loading branch information
vscheuber authored Oct 14, 2023
2 parents bd4d66f + 6483b33 commit 1e7e1a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 127 deletions.
135 changes: 9 additions & 126 deletions test/e2e/__snapshots__/saml-cot-import.e2e.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,140 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`frodo saml cot import "frodo saml cot import --all --file test/e2e/exports/all/allAlphaThemes.theme.json": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:564:52
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:641:32)
at importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:551:32)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:106:16
"
`;
exports[`frodo saml cot import "frodo saml cot import --all --file test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import --all-separate --directory test/e2e/exports/all-separate/saml/cot": should import all saml circle of trusts from the test/e2e/exports/all-separate/saml/cot directory" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import --cot-id AzureCOT --file test/e2e/exports/all/allAlphaThemes.theme.json": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:458:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:495:31)
at importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:442:31)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:89:16
"
`;
exports[`frodo saml cot import "frodo saml cot import --cot-id AzureCOT --file test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import --file test/e2e/exports/all/allAlphaThemes.theme.json": should import the first saml cot from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:513:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:548:36)
at importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:498:36)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:98:16
"
`;
exports[`frodo saml cot import "frodo saml cot import --file test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import the first saml cot from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -AD test/e2e/exports/all-separate/saml/cot": should import all saml circle of trusts from the test/e2e/exports/all-separate/saml/cot directory" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -af allAlphaThemes.theme.json -D test/e2e/exports/all": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:564:52
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:641:32)
at importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:551:32)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:106:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -af allAlphaCirclesOfTrust.cot.saml.json -D test/e2e/exports/all": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -af test/e2e/exports/all/allAlphaThemes.theme.json": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:564:52
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:641:32)
at importCirclesOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:551:32)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:106:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -af test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import all saml circle of trusts from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -f allAlphaThemes.theme.json -D test/e2e/exports/all": should import the first saml circle of trust from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:513:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:548:36)
at importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:498:36)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:98:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -f allAlphaCirclesOfTrust.cot.saml.json -D test/e2e/exports/all": should import the first saml circle of trust from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -f test/e2e/exports/all/allAlphaThemes.theme.json": should import the first saml circle of trust from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:513:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:548:36)
at importFirstCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:498:36)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:98:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -f test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import the first saml circle of trust from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -i AzureCOT -f allAlphaThemes.theme.json -D test/e2e/exports/all": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:458:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:495:31)
at importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:442:31)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:89:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -i AzureCOT -f allAlphaCirclesOfTrust.cot.saml.json -D test/e2e/exports/all": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;

exports[`frodo saml cot import "frodo saml cot import -i AzureCOT -f test/e2e/exports/all/allAlphaThemes.theme.json": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaThemes.theme.json" 1`] = `
"TypeError: Cannot read properties of undefined (reading 'cot')
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:458:48
at Generator.next (<anonymous>)
at asyncGeneratorStep (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:22:103)
at _next (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:194)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:364
at new Promise (<anonymous>)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:23:97
at _importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:495:31)
at importCircleOfTrust (/snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:442:31)
at /snapshot/frodo-working-directory/frodo-lib/cjs/ops/CirclesOfTrustOps.js:89:16
"
`;
exports[`frodo saml cot import "frodo saml cot import -i AzureCOT -f test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json": should import the saml circle of trust with the id "AzureCOT" from the file "test/e2e/exports/all/allAlphaCirclesOfTrust.cot.saml.json" 1`] = `""`;
2 changes: 1 addition & 1 deletion test/e2e/saml-cot-import.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ env.env.FRODO_SA_ID = c.saId;
env.env.FRODO_SA_JWK = c.saJwk;

const allDirectory = "test/e2e/exports/all";
const allAlphaCirclesOfTrustFileName = "allAlphaThemes.theme.json";
const allAlphaCirclesOfTrustFileName = "allAlphaCirclesOfTrust.cot.saml.json";
const allAlphaCirclesOfTrustExport = `${allDirectory}/${allAlphaCirclesOfTrustFileName}`;
const allSeparateCircleOfTrustsDirectory = `test/e2e/exports/all-separate/saml/cot`;

Expand Down

0 comments on commit 1e7e1a2

Please sign in to comment.