diff --git a/package-lock.json b/package-lock.json index ba28246f6..fead36eec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "frodo": "dist/launch.cjs" }, "devDependencies": { - "@rockcarver/frodo-lib": "3.1.0", + "@rockcarver/frodo-lib": "3.3.0", "@types/colors": "^1.2.1", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.2.3", @@ -1082,9 +1082,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -1132,9 +1132,9 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -1848,9 +1848,9 @@ } }, "node_modules/@rockcarver/frodo-lib": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rockcarver/frodo-lib/-/frodo-lib-3.1.0.tgz", - "integrity": "sha512-ruThNiJovUtfbr/V7bACo6ezwa58kONmWtTBWcPLrWYA58vDa5OYI6WHqPturmFW4ee1yGAb63w6hFynM0E9qA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@rockcarver/frodo-lib/-/frodo-lib-3.3.0.tgz", + "integrity": "sha512-isPkll4aUeAbpYJMkUMKJiDzjsZ+LItdZYQrbTvdOa/g5xt6dKaI1fcMxNDyq/AnOVoNThcj7VxLWJwBChrZRw==", "dev": true, "license": "MIT", "engines": { @@ -3127,9 +3127,9 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3578,9 +3578,9 @@ } }, "node_modules/copyfiles/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4411,9 +4411,9 @@ } }, "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4524,9 +4524,9 @@ } }, "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4619,9 +4619,9 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -5273,9 +5273,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -6213,9 +6213,9 @@ } }, "node_modules/jake/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -9306,9 +9306,9 @@ } }, "node_modules/tar-fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", - "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", + "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", "dev": true, "license": "MIT", "dependencies": { @@ -9366,9 +9366,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index fbda1b494..d71aaaa2e 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ ] }, "devDependencies": { - "@rockcarver/frodo-lib": "3.1.0", + "@rockcarver/frodo-lib": "3.3.0", "@types/colors": "^1.2.1", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.2.3", diff --git a/src/cli/idm/idm.ts b/src/cli/idm/idm.ts index ab54df7f8..4132d8e96 100644 --- a/src/cli/idm/idm.ts +++ b/src/cli/idm/idm.ts @@ -20,8 +20,8 @@ export default function setup() { program.addCommand(CountCmd().name('count')); program.addCommand(Schema().name('schema')); - + program.addCommand(DeleteCmd().name(`delete`)); - + return program; } diff --git a/src/cli/service/service-import.ts b/src/cli/service/service-import.ts index 01e268ca4..2b6b22529 100644 --- a/src/cli/service/service-import.ts +++ b/src/cli/service/service-import.ts @@ -89,7 +89,7 @@ export default function setup() { const globalConfig = options.global ?? false; const realmConfig = globalConfig ? false - : options.currentRealm ?? false; + : (options.currentRealm ?? false); // import by id if (options.serviceId && options.file && (await getTokens())) { diff --git a/src/ops/ConfigOps.ts b/src/ops/ConfigOps.ts index 9b1bd28f3..3e3350819 100644 --- a/src/ops/ConfigOps.ts +++ b/src/ops/ConfigOps.ts @@ -20,6 +20,7 @@ import { saveServersToFiles } from './classic/ServerOps'; import { ManagedSkeleton, writeManagedJsonToDirectory } from './IdmOps'; import { writeSyncJsonToDirectory } from './MappingOps'; import { extractScriptsToFiles } from './ScriptOps'; +import { errorHandler } from './utils/OpsUtils'; const { getTypedFilename, @@ -55,16 +56,12 @@ export async function exportEverythingToFile( } ): Promise { try { - const collectErrors: Error[] = []; - const exportData = await exportFullConfiguration(options, collectErrors); + const exportData = await exportFullConfiguration(options, errorHandler); let fileName = 'all.config.json'; if (file) { fileName = file; } saveJsonToFile(exportData, getFilePath(fileName, true), includeMeta); - if (collectErrors.length > 0) { - throw new FrodoError(`Errors occurred during full export`, collectErrors); - } return true; } catch (error) { printError(error); @@ -102,7 +99,7 @@ export async function exportEverythingToFiles( const collectErrors: Error[] = []; const exportData: FullExportInterface = await exportFullConfiguration( options, - collectErrors + errorHandler ); delete exportData.meta; const baseDirectory = getWorkingDirectory(true); @@ -354,14 +351,7 @@ export async function importEverythingFromFile( ): Promise { try { const data = await getFullExportConfig(file); - const collectErrors: Error[] = []; - await importFullConfiguration(data, options, collectErrors); - if (collectErrors.length > 0) { - throw new FrodoError( - `Errors occurred during full config import`, - collectErrors - ); - } + await importFullConfiguration(data, options, errorHandler); return true; } catch (error) { cleanupProgressIndicators(); @@ -386,14 +376,7 @@ export async function importEverythingFromFiles( ): Promise { try { const data = await getFullExportConfigFromDirectory(getWorkingDirectory()); - const collectErrors: Error[] = []; - await importFullConfiguration(data, options, collectErrors); - if (collectErrors.length > 0) { - throw new FrodoError( - `Errors occurred during full config import`, - collectErrors - ); - } + await importFullConfiguration(data, options, errorHandler); return true; } catch (error) { printError(error); @@ -438,14 +421,7 @@ export async function importEntityfromFile( data.realm[realm] = {} as FullRealmExportInterface; await getConfig(data.realm[realm], file, undefined); } - const collectErrors: Error[] = []; - const imports = await importFullConfiguration(data, options, collectErrors); - if (collectErrors.length > 0) { - throw new FrodoError( - `Error occurred during config import`, - collectErrors - ); - } + const imports = await importFullConfiguration(data, options, errorHandler); if (imports.length === 0) { throw new FrodoError(`No imports were made`); } diff --git a/src/ops/IdmOps.ts b/src/ops/IdmOps.ts index 784431567..cf68d3d20 100644 --- a/src/ops/IdmOps.ts +++ b/src/ops/IdmOps.ts @@ -17,6 +17,7 @@ import { getLegacyMappingsFromFiles, writeSyncJsonToDirectory, } from './MappingOps'; +import { errorHandler } from './utils/OpsUtils'; const { getFilePath, @@ -188,10 +189,13 @@ export async function exportAllConfigEntitiesToFile( ): Promise { try { const options = getIdmImportExportOptions(entitiesFile, envFile); - const exportData = await exportConfigEntities({ - envReplaceParams: options.envReplaceParams, - entitiesToExport: options.entitiesToExportOrImport, - }); + const exportData = await exportConfigEntities( + { + envReplaceParams: options.envReplaceParams, + entitiesToExport: options.entitiesToExportOrImport, + }, + errorHandler + ); let fileName = getTypedFilename(`all`, `idm`); if (file) { fileName = file; @@ -222,10 +226,13 @@ export async function exportAllConfigEntitiesToFiles( const errors: Error[] = []; try { const options = getIdmImportExportOptions(entitiesFile, envFile); - const exportData = await exportConfigEntities({ - envReplaceParams: options.envReplaceParams, - entitiesToExport: options.entitiesToExportOrImport, - }); + const exportData = await exportConfigEntities( + { + envReplaceParams: options.envReplaceParams, + entitiesToExport: options.entitiesToExportOrImport, + }, + errorHandler + ); for (const [id, obj] of Object.entries(exportData.idm)) { try { if (separateMappings && id === 'sync') { @@ -309,11 +316,16 @@ export async function importConfigEntityByIdFromFile( const options = getIdmImportExportOptions(undefined, envFile); - await importConfigEntities(importData, entityId, { - envReplaceParams: options.envReplaceParams, - entitiesToImport: undefined, - validate, - }); + await importConfigEntities( + importData, + entityId, + { + envReplaceParams: options.envReplaceParams, + entitiesToImport: undefined, + validate, + }, + errorHandler + ); return true; } catch (error) { printError(error); @@ -398,11 +410,16 @@ export async function importFirstConfigEntityFromFile( const options = getIdmImportExportOptions(undefined, envFile); - await importConfigEntities(importData, entityId, { - envReplaceParams: options.envReplaceParams, - entitiesToImport: undefined, - validate, - }); + await importConfigEntities( + importData, + entityId, + { + envReplaceParams: options.envReplaceParams, + entitiesToImport: undefined, + validate, + }, + errorHandler + ); stopProgressIndicator( indicatorId, `Imported ${entityId} from ${filePath}.`, @@ -448,7 +465,8 @@ export async function importAllConfigEntitiesFromFile( entitiesToImport: options.entitiesToExportOrImport, envReplaceParams: options.envReplaceParams, validate, - } + }, + errorHandler ); stopProgressIndicator(indicatorId, `Imported config entities`, 'success'); return true; @@ -538,7 +556,8 @@ export async function importAllConfigEntitiesFromFiles( entitiesToImport: options.entitiesToExportOrImport, envReplaceParams: options.envReplaceParams, validate, - } + }, + errorHandler ); stopProgressIndicator(indicatorId, `Imported config entities`, 'success'); return true; diff --git a/src/ops/JourneyOps.ts b/src/ops/JourneyOps.ts index c64eda43d..6dff942e9 100644 --- a/src/ops/JourneyOps.ts +++ b/src/ops/JourneyOps.ts @@ -29,7 +29,7 @@ import * as Node from './NodeOps'; import * as Saml2 from './Saml2Ops'; import * as Script from './ScriptOps'; import * as Theme from './ThemeOps'; -import { cloneDeep } from './utils/OpsUtils'; +import { cloneDeep, errorHandler } from './utils/OpsUtils'; import wordwrap from './utils/Wordwrap'; const { @@ -232,7 +232,10 @@ export async function exportJourneysToFile( file = getTypedFilename(`all${getRealmString()}Journeys`, 'journey'); } const filePath = getFilePath(file, true); - const fileData: MultiTreeExportInterface = await exportJourneys(options); + const fileData: MultiTreeExportInterface = await exportJourneys( + options, + errorHandler + ); saveJsonToFile(fileData, filePath, includeMeta); return true; } catch (error) { @@ -255,7 +258,7 @@ export async function exportJourneysToFiles( } ): Promise { try { - const journeysExport = await exportJourneys(options); + const journeysExport = await exportJourneys(options, errorHandler); const trees = Object.entries(journeysExport.trees); for (const [treeId, treeValue] of trees) { const indicatorId = createProgressIndicator( @@ -507,7 +510,7 @@ export async function importJourneysFromFile( try { const data = fs.readFileSync(getFilePath(file), 'utf8'); const fileData = JSON.parse(data); - await importJourneys(fileData, options); + await importJourneys(fileData, options, errorHandler); return true; } catch (error) { printError(error); @@ -535,7 +538,11 @@ export async function importJourneysFromFiles( allJourneysData.trees[id] = obj; } } - await importJourneys(allJourneysData as MultiTreeExportInterface, options); + await importJourneys( + allJourneysData as MultiTreeExportInterface, + options, + errorHandler + ); return true; } catch (error) { printError(error); @@ -1182,7 +1189,10 @@ export async function deleteJourneys( `Deleting journeys...` ); try { - const status: DeleteJourneysStatus = await _deleteJourneys(options); + const status: DeleteJourneysStatus = await _deleteJourneys( + options, + errorHandler + ); stopProgressIndicator( indicatorId, `Deleted ${Object.keys(status).length} journeys` diff --git a/src/ops/ScriptOps.ts b/src/ops/ScriptOps.ts index 213c11df8..7ac1f1922 100644 --- a/src/ops/ScriptOps.ts +++ b/src/ops/ScriptOps.ts @@ -29,6 +29,7 @@ import { succeedSpinner, updateProgressIndicator, } from '../utils/Console'; +import { errorHandler } from './utils/OpsUtils'; import wordwrap from './utils/Wordwrap'; const { @@ -359,7 +360,7 @@ export async function exportScriptsToFile( if (file) { fileName = file; } - const scriptExport = await exportScripts(options); + const scriptExport = await exportScripts(options, errorHandler); saveJsonToFile(scriptExport, getFilePath(fileName, true), includeMeta); debugMessage(`Cli.ScriptOps.exportScriptsToFile: end`); return true; @@ -383,56 +384,50 @@ export async function exportScriptsToFiles( ): Promise { debugMessage(`Cli.ScriptOps.exportScriptsToFiles: start`); const errors: Error[] = []; - let barId: string; - try { - const scriptExport = await exportScripts(options); - const scriptList = Object.values(scriptExport.script); - barId = createProgressIndicator( + const scriptExport = await exportScripts(options, errorHandler); + const scriptList = Object.values(scriptExport.script); + const barId = createProgressIndicator( + 'determinate', + scriptList.length, + 'Exporting scripts to individual files...' + ); + for (const script of scriptList) { + const fileBarId = createProgressIndicator( 'determinate', - scriptList.length, - 'Exporting scripts to individual files...' + 1, + `Exporting script ${script.name}...` ); - for (const script of scriptList) { - const fileBarId = createProgressIndicator( - 'determinate', - 1, - `Exporting script ${script.name}...` - ); + try { const file = getFilePath(getTypedFilename(script.name, 'script'), true); - try { - if (extract) { - extractScriptsToFiles({ - script: { - [script._id]: script, - }, - }); - } - saveToFile('script', script, '_id', file, includeMeta); - updateProgressIndicator(fileBarId, `Saving ${script.name} to ${file}.`); - stopProgressIndicator(fileBarId, `${script.name} saved to ${file}.`); - } catch (error) { - stopProgressIndicator( - fileBarId, - `Error exporting ${script.name}`, - 'fail' - ); - errors.push(error); + if (extract) { + extractScriptsToFiles({ + script: { + [script._id]: script, + }, + }); } - updateProgressIndicator(barId, `Exported script ${script.name}`); - } - if (errors.length > 0) { - throw new FrodoError(`Error exporting scripts`, errors); + saveToFile('script', script, '_id', file, includeMeta); + updateProgressIndicator(fileBarId, `Saving ${script.name} to ${file}.`); + stopProgressIndicator(fileBarId, `${script.name} saved to ${file}.`); + } catch (error) { + stopProgressIndicator( + fileBarId, + `Error exporting ${script.name}`, + 'fail' + ); + errors.push(error); } - stopProgressIndicator( - barId, - `Exported ${scriptList.length} scripts to individual files.` - ); - debugMessage(`Cli.ScriptOps.exportScriptsToFiles: end`); - return true; - } catch (error) { - stopProgressIndicator(barId, `Error exporting scripts`); - printError(error); + updateProgressIndicator(barId, `Exported script ${script.name}`); + } + if (errors.length > 0) { + throw new FrodoError(`Error exporting scripts`, errors); } + stopProgressIndicator( + barId, + `Exported ${scriptList.length} scripts to individual files.` + ); + debugMessage(`Cli.ScriptOps.exportScriptsToFiles: end`); + return true; } /** @@ -638,7 +633,14 @@ async function handleScriptFileImport( const script = getScriptExportByScriptFile(file); const indicatorId = createProgressIndicator('determinate', 1, `${file}`); try { - await importScripts(id, name, script, options, validateScripts); + await importScripts( + id, + name, + script, + options, + validateScripts, + errorHandler + ); updateProgressIndicator(indicatorId, `${file}`); stopProgressIndicator(indicatorId, `${file}`); } catch (error) { @@ -763,7 +765,7 @@ export async function deleteAllScripts(): Promise { `Deleting all non-default scripts...` ); try { - await deleteScripts(); + await deleteScripts(errorHandler); stopProgressIndicator( spinnerId, `Deleted all non-default scripts.`, diff --git a/src/ops/utils/OpsUtils.ts b/src/ops/utils/OpsUtils.ts index 706796765..c57a4f211 100644 --- a/src/ops/utils/OpsUtils.ts +++ b/src/ops/utils/OpsUtils.ts @@ -1,3 +1,7 @@ +import { FrodoError } from '@rockcarver/frodo-lib'; + +import { printError } from '../../utils/Console'; + /** * Deep clone object * @param {any} obj object to deep clone @@ -6,3 +10,13 @@ export function cloneDeep(obj: any): any { return JSON.parse(JSON.stringify(obj)); } + +/** + * Result callback that handles errors when they occur by printing them and setting the process exit code + * @param error The error to handle + */ +export function errorHandler(error?: FrodoError) { + if (!error) return; + printError(error); + process.exitCode = 1; +} diff --git a/src/utils/Config.ts b/src/utils/Config.ts index 8e1a84aa6..38349baab 100644 --- a/src/utils/Config.ts +++ b/src/utils/Config.ts @@ -12,6 +12,7 @@ import { readServersFromFiles } from '../ops/classic/ServerOps'; import { getManagedObjectsFromFiles } from '../ops/IdmOps'; import { getLegacyMappingsFromFiles } from '../ops/MappingOps'; import { getScriptExportByScriptFile } from '../ops/ScriptOps'; +import { errorHandler } from '../ops/utils/OpsUtils'; import { printMessage } from './Console'; const { getFilePath, readFiles, saveTextToFile, saveJsonToFile } = frodo.utils; @@ -83,17 +84,20 @@ export async function getFullExportConfig( // If working directory doesn't exist, export from the cloud const workingDirectory = state.getDirectory(); if (!workingDirectory) { - return await exportFullConfiguration({ - useStringArrays: true, - noDecode: false, - coords: true, - includeDefault: true, - includeActiveValues: false, - target: '', - includeReadOnly: true, - onlyRealm: false, - onlyGlobal: false, - }); + return await exportFullConfiguration( + { + useStringArrays: true, + noDecode: false, + coords: true, + includeDefault: true, + includeActiveValues: false, + target: '', + includeReadOnly: true, + onlyRealm: false, + onlyGlobal: false, + }, + errorHandler + ); } // Go through files in the working directory and reconstruct the full export return await getFullExportConfigFromDirectory(workingDirectory); diff --git a/test/e2e/__snapshots__/agent-export.e2e.test.js.snap b/test/e2e/__snapshots__/agent-export.e2e.test.js.snap index a7fc04c40..aa520ec8b 100644 --- a/test/e2e/__snapshots__/agent-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/agent-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo agent export "frodo agent export --agent-id frodo-test-java-agent": should export the agent with agent id "frodo-test-java-agent" 1`] = `""`; +exports[`frodo agent export "frodo agent export --agent-id frodo-test-java-agent": should export the agent with agent id "frodo-test-java-agent" 1`] = `0`; + +exports[`frodo agent export "frodo agent export --agent-id frodo-test-java-agent": should export the agent with agent id "frodo-test-java-agent" 2`] = `""`; exports[`frodo agent export "frodo agent export --agent-id frodo-test-java-agent": should export the agent with agent id "frodo-test-java-agent": frodo-test-java-agent.java.agent.json 1`] = ` { @@ -676,7 +678,9 @@ exports[`frodo agent export "frodo agent export --agent-id frodo-test-java-agent } `; -exports[`frodo agent export "frodo agent export --all": should export all agents to a single file 1`] = `""`; +exports[`frodo agent export "frodo agent export --all": should export all agents to a single file 1`] = `0`; + +exports[`frodo agent export "frodo agent export --all": should export all agents to a single file 2`] = `""`; exports[`frodo agent export "frodo agent export --all": should export all agents to a single file: allAlphaAgents.agent.json 1`] = ` { @@ -1579,7 +1583,9 @@ exports[`frodo agent export "frodo agent export --all": should export all agents } `; -exports[`frodo agent export "frodo agent export --all-separate --no-metadata --directory agentExportTestDir3": should export all agents to separate files in the directory agentExportTestDir3 1`] = `""`; +exports[`frodo agent export "frodo agent export --all-separate --no-metadata --directory agentExportTestDir3": should export all agents to separate files in the directory agentExportTestDir3 1`] = `0`; + +exports[`frodo agent export "frodo agent export --all-separate --no-metadata --directory agentExportTestDir3": should export all agents to separate files in the directory agentExportTestDir3 2`] = `""`; exports[`frodo agent export "frodo agent export --all-separate --no-metadata --directory agentExportTestDir3": should export all agents to separate files in the directory agentExportTestDir3: agentExportTestDir3/cdsso-ig-agent.gateway.agent.json 1`] = ` { @@ -2551,7 +2557,9 @@ exports[`frodo agent export "frodo agent export --all-separate --no-metadata --d } `; -exports[`frodo agent export "frodo agent export -AD agentExportTestDir4": should export all agents to separate files in the directory agentExportTestDir4 1`] = `""`; +exports[`frodo agent export "frodo agent export -AD agentExportTestDir4": should export all agents to separate files in the directory agentExportTestDir4 1`] = `0`; + +exports[`frodo agent export "frodo agent export -AD agentExportTestDir4": should export all agents to separate files in the directory agentExportTestDir4 2`] = `""`; exports[`frodo agent export "frodo agent export -AD agentExportTestDir4": should export all agents to separate files in the directory agentExportTestDir4: agentExportTestDir4/cdsso-ig-agent.gateway.agent.json 1`] = ` { @@ -3534,7 +3542,9 @@ exports[`frodo agent export "frodo agent export -AD agentExportTestDir4": should } `; -exports[`frodo agent export "frodo agent export -AD agentExportTestDir6 --global --type classic": should export all global agents to separate files in the directory agentExportTestDir6 1`] = `""`; +exports[`frodo agent export "frodo agent export -AD agentExportTestDir6 --global --type classic": should export all global agents to separate files in the directory agentExportTestDir6 1`] = `0`; + +exports[`frodo agent export "frodo agent export -AD agentExportTestDir6 --global --type classic": should export all global agents to separate files in the directory agentExportTestDir6 2`] = `""`; exports[`frodo agent export "frodo agent export -AD agentExportTestDir6 --global --type classic": should export all global agents to separate files in the directory agentExportTestDir6: agentExportTestDir6/AgentService.agent.json 1`] = ` { @@ -3552,7 +3562,9 @@ exports[`frodo agent export "frodo agent export -AD agentExportTestDir6 --global } `; -exports[`frodo agent export "frodo agent export -NaD agentExportTestDir2": should export all agents to a single file in the directory agentExportTestDir2 1`] = `""`; +exports[`frodo agent export "frodo agent export -NaD agentExportTestDir2": should export all agents to a single file in the directory agentExportTestDir2 1`] = `0`; + +exports[`frodo agent export "frodo agent export -NaD agentExportTestDir2": should export all agents to a single file in the directory agentExportTestDir2 2`] = `""`; exports[`frodo agent export "frodo agent export -NaD agentExportTestDir2": should export all agents to a single file in the directory agentExportTestDir2: agentExportTestDir2/allAlphaAgents.agent.json 1`] = ` { @@ -4454,7 +4466,9 @@ exports[`frodo agent export "frodo agent export -NaD agentExportTestDir2": shoul } `; -exports[`frodo agent export "frodo agent export -Ni frodo-test-web-agent -D agentExportTestDir1": should export the agent with agent id "frodo-test-web-agent" into the directory named agentExportTestDir1 1`] = `""`; +exports[`frodo agent export "frodo agent export -Ni frodo-test-web-agent -D agentExportTestDir1": should export the agent with agent id "frodo-test-web-agent" into the directory named agentExportTestDir1 1`] = `0`; + +exports[`frodo agent export "frodo agent export -Ni frodo-test-web-agent -D agentExportTestDir1": should export the agent with agent id "frodo-test-web-agent" into the directory named agentExportTestDir1 2`] = `""`; exports[`frodo agent export "frodo agent export -Ni frodo-test-web-agent -D agentExportTestDir1": should export the agent with agent id "frodo-test-web-agent" into the directory named agentExportTestDir1: agentExportTestDir1/frodo-test-web-agent.web.agent.json 1`] = ` { @@ -4943,7 +4957,9 @@ exports[`frodo agent export "frodo agent export -Ni frodo-test-web-agent -D agen } `; -exports[`frodo agent export "frodo agent export -a --file my-allAlphaAgents.agent.json": should export all agents to a single file named my-allAlphaAgents.agent.json 1`] = `""`; +exports[`frodo agent export "frodo agent export -a --file my-allAlphaAgents.agent.json": should export all agents to a single file named my-allAlphaAgents.agent.json 1`] = `0`; + +exports[`frodo agent export "frodo agent export -a --file my-allAlphaAgents.agent.json": should export all agents to a single file named my-allAlphaAgents.agent.json 2`] = `""`; exports[`frodo agent export "frodo agent export -a --file my-allAlphaAgents.agent.json": should export all agents to a single file named my-allAlphaAgents.agent.json: my-allAlphaAgents.agent.json 1`] = ` { @@ -5846,7 +5862,9 @@ exports[`frodo agent export "frodo agent export -a --file my-allAlphaAgents.agen } `; -exports[`frodo agent export "frodo agent export -aD agentExportTestDir5 -gm classic": should export all global agents to a single file in the directory agentExportTestDir5 1`] = `""`; +exports[`frodo agent export "frodo agent export -aD agentExportTestDir5 -gm classic": should export all global agents to a single file in the directory agentExportTestDir5 1`] = `0`; + +exports[`frodo agent export "frodo agent export -aD agentExportTestDir5 -gm classic": should export all global agents to a single file in the directory agentExportTestDir5 2`] = `""`; exports[`frodo agent export "frodo agent export -aD agentExportTestDir5 -gm classic": should export all global agents to a single file in the directory agentExportTestDir5: agentExportTestDir5/allGlobalAgents.agent.json 1`] = ` { @@ -5864,7 +5882,9 @@ exports[`frodo agent export "frodo agent export -aD agentExportTestDir5 -gm clas } `; -exports[`frodo agent export "frodo agent export -i AgentService -gm classic": should export the global agent with agent id "AgentService" 1`] = `""`; +exports[`frodo agent export "frodo agent export -i AgentService -gm classic": should export the global agent with agent id "AgentService" 1`] = `0`; + +exports[`frodo agent export "frodo agent export -i AgentService -gm classic": should export the global agent with agent id "AgentService" 2`] = `""`; exports[`frodo agent export "frodo agent export -i AgentService -gm classic": should export the global agent with agent id "AgentService": AgentService.agent.json 1`] = ` { @@ -5882,7 +5902,9 @@ exports[`frodo agent export "frodo agent export -i AgentService -gm classic": sh } `; -exports[`frodo agent export "frodo agent export -i frodo-test-web-agent -f my-frodo-test-web-agent.agent.json": should export the agent with agent id "frodo-test-web-agent" into file named my-frodo-test-web-agent.agent.json 1`] = `""`; +exports[`frodo agent export "frodo agent export -i frodo-test-web-agent -f my-frodo-test-web-agent.agent.json": should export the agent with agent id "frodo-test-web-agent" into file named my-frodo-test-web-agent.agent.json 1`] = `0`; + +exports[`frodo agent export "frodo agent export -i frodo-test-web-agent -f my-frodo-test-web-agent.agent.json": should export the agent with agent id "frodo-test-web-agent" into file named my-frodo-test-web-agent.agent.json 2`] = `""`; exports[`frodo agent export "frodo agent export -i frodo-test-web-agent -f my-frodo-test-web-agent.agent.json": should export the agent with agent id "frodo-test-web-agent" into file named my-frodo-test-web-agent.agent.json: my-frodo-test-web-agent.agent.json 1`] = ` { diff --git a/test/e2e/__snapshots__/agent-gateway-export.e2e.test.js.snap b/test/e2e/__snapshots__/agent-gateway-export.e2e.test.js.snap index 5884b8cc8..d80801d50 100644 --- a/test/e2e/__snapshots__/agent-gateway-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/agent-gateway-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo agent gateway export "frodo agent gateway export --agent-id frodo-test-ig-agent": should export the gateway agent with agent id "frodo-test-ig-agent" 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export --agent-id frodo-test-ig-agent": should export the gateway agent with agent id "frodo-test-ig-agent" 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export --agent-id frodo-test-ig-agent": should export the gateway agent with agent id "frodo-test-ig-agent" 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export --agent-id frodo-test-ig-agent": should export the gateway agent with agent id "frodo-test-ig-agent": frodo-test-ig-agent.gateway.agent.json 1`] = ` { @@ -37,7 +39,9 @@ exports[`frodo agent gateway export "frodo agent gateway export --agent-id frodo } `; -exports[`frodo agent gateway export "frodo agent gateway export --all": should export all gateway agents to a single file 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export --all": should export all gateway agents to a single file 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export --all": should export all gateway agents to a single file 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export --all": should export all gateway agents to a single file: allAlphaAgents.gateway.agent.json 1`] = ` { @@ -78,7 +82,9 @@ exports[`frodo agent gateway export "frodo agent gateway export --all": should e } `; -exports[`frodo agent gateway export "frodo agent gateway export --all-separate --no-metadata --directory agentGatewayExportTestDir3": should export all gateway agents to separate files in the directory agentGatewayExportTestDir3 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export --all-separate --no-metadata --directory agentGatewayExportTestDir3": should export all gateway agents to separate files in the directory agentGatewayExportTestDir3 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export --all-separate --no-metadata --directory agentGatewayExportTestDir3": should export all gateway agents to separate files in the directory agentGatewayExportTestDir3 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export --all-separate --no-metadata --directory agentGatewayExportTestDir3": should export all gateway agents to separate files in the directory agentGatewayExportTestDir3: agentGatewayExportTestDir3/frodo-test-ig-agent.gateway.agent.json 1`] = ` { @@ -124,7 +130,9 @@ exports[`frodo agent gateway export "frodo agent gateway export --all-separate - } `; -exports[`frodo agent gateway export "frodo agent gateway export -A": should export all gateway agents to separate files 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export -A": should export all gateway agents to separate files 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export -A": should export all gateway agents to separate files 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export -A": should export all gateway agents to separate files: frodo-test-ig-agent.gateway.agent.json 1`] = ` { @@ -173,7 +181,9 @@ exports[`frodo agent gateway export "frodo agent gateway export -A": should expo } `; -exports[`frodo agent gateway export "frodo agent gateway export -NaD agentGatewayExportTestDir2": should export all gateway agents to a single file in the directory agentGatewayExportTestDir2 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export -NaD agentGatewayExportTestDir2": should export all gateway agents to a single file in the directory agentGatewayExportTestDir2 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export -NaD agentGatewayExportTestDir2": should export all gateway agents to a single file in the directory agentGatewayExportTestDir2 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export -NaD agentGatewayExportTestDir2": should export all gateway agents to a single file in the directory agentGatewayExportTestDir2: agentGatewayExportTestDir2/allAlphaAgents.gateway.agent.json 1`] = ` { @@ -212,7 +222,9 @@ exports[`frodo agent gateway export "frodo agent gateway export -NaD agentGatewa } `; -exports[`frodo agent gateway export "frodo agent gateway export -Ni frodo-test-ig-agent -D agentGatewayExportTestDir1": should export the gateway agent with agent id "frodo-test-ig-agent" into the directory named agentGatewayExportTestDir1 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export -Ni frodo-test-ig-agent -D agentGatewayExportTestDir1": should export the gateway agent with agent id "frodo-test-ig-agent" into the directory named agentGatewayExportTestDir1 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export -Ni frodo-test-ig-agent -D agentGatewayExportTestDir1": should export the gateway agent with agent id "frodo-test-ig-agent" into the directory named agentGatewayExportTestDir1 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export -Ni frodo-test-ig-agent -D agentGatewayExportTestDir1": should export the gateway agent with agent id "frodo-test-ig-agent" into the directory named agentGatewayExportTestDir1: agentGatewayExportTestDir1/frodo-test-ig-agent.gateway.agent.json 1`] = ` { @@ -247,7 +259,9 @@ exports[`frodo agent gateway export "frodo agent gateway export -Ni frodo-test-i } `; -exports[`frodo agent gateway export "frodo agent gateway export -a --file my-allAlphaAgents.gateway.agent.json": should export all gateway agents to a single file named my-allAlphaAgents.gateway.agent.json 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export -a --file my-allAlphaAgents.gateway.agent.json": should export all gateway agents to a single file named my-allAlphaAgents.gateway.agent.json 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export -a --file my-allAlphaAgents.gateway.agent.json": should export all gateway agents to a single file named my-allAlphaAgents.gateway.agent.json 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export -a --file my-allAlphaAgents.gateway.agent.json": should export all gateway agents to a single file named my-allAlphaAgents.gateway.agent.json: my-allAlphaAgents.gateway.agent.json 1`] = ` { @@ -288,7 +302,9 @@ exports[`frodo agent gateway export "frodo agent gateway export -a --file my-all } `; -exports[`frodo agent gateway export "frodo agent gateway export -i frodo-test-ig-agent -f my-frodo-test-ig-agent.gateway.agent.json.json": should export the gateway agent with agent id "frodo-test-ig-agent" into file named my-frodo-test-ig-agent.gateway.agent.json 1`] = `""`; +exports[`frodo agent gateway export "frodo agent gateway export -i frodo-test-ig-agent -f my-frodo-test-ig-agent.gateway.agent.json.json": should export the gateway agent with agent id "frodo-test-ig-agent" into file named my-frodo-test-ig-agent.gateway.agent.json 1`] = `0`; + +exports[`frodo agent gateway export "frodo agent gateway export -i frodo-test-ig-agent -f my-frodo-test-ig-agent.gateway.agent.json.json": should export the gateway agent with agent id "frodo-test-ig-agent" into file named my-frodo-test-ig-agent.gateway.agent.json 2`] = `""`; exports[`frodo agent gateway export "frodo agent gateway export -i frodo-test-ig-agent -f my-frodo-test-ig-agent.gateway.agent.json.json": should export the gateway agent with agent id "frodo-test-ig-agent" into file named my-frodo-test-ig-agent.gateway.agent.json: my-frodo-test-ig-agent.gateway.agent.json.json 1`] = ` { diff --git a/test/e2e/__snapshots__/agent-java-export.e2e.test.js.snap b/test/e2e/__snapshots__/agent-java-export.e2e.test.js.snap index ee560827e..887483465 100644 --- a/test/e2e/__snapshots__/agent-java-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/agent-java-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo agent java export "frodo agent java export --agent-id frodo-test-java-agent": should export the java agent with agent id "frodo-test-java-agent" 1`] = `""`; +exports[`frodo agent java export "frodo agent java export --agent-id frodo-test-java-agent": should export the java agent with agent id "frodo-test-java-agent" 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export --agent-id frodo-test-java-agent": should export the java agent with agent id "frodo-test-java-agent" 2`] = `""`; exports[`frodo agent java export "frodo agent java export --agent-id frodo-test-java-agent": should export the java agent with agent id "frodo-test-java-agent": frodo-test-java-agent.java.agent.json 1`] = ` { @@ -676,7 +678,9 @@ exports[`frodo agent java export "frodo agent java export --agent-id frodo-test- } `; -exports[`frodo agent java export "frodo agent java export --all": should export all java agents to a single file 1`] = `""`; +exports[`frodo agent java export "frodo agent java export --all": should export all java agents to a single file 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export --all": should export all java agents to a single file 2`] = `""`; exports[`frodo agent java export "frodo agent java export --all": should export all java agents to a single file: allAlphaAgents.java.agent.json 1`] = ` { @@ -1129,7 +1133,9 @@ exports[`frodo agent java export "frodo agent java export --all": should export } `; -exports[`frodo agent java export "frodo agent java export --all-separate --no-metadata --directory agentJavaExportTestDir3": should export all java agents to separate files in the directory agentJavaExportTestDir3 1`] = `""`; +exports[`frodo agent java export "frodo agent java export --all-separate --no-metadata --directory agentJavaExportTestDir3": should export all java agents to separate files in the directory agentJavaExportTestDir3 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export --all-separate --no-metadata --directory agentJavaExportTestDir3": should export all java agents to separate files in the directory agentJavaExportTestDir3 2`] = `""`; exports[`frodo agent java export "frodo agent java export --all-separate --no-metadata --directory agentJavaExportTestDir3": should export all java agents to separate files in the directory agentJavaExportTestDir3: agentJavaExportTestDir3/frodo-test-java-agent.java.agent.json 1`] = ` { @@ -1587,7 +1593,9 @@ exports[`frodo agent java export "frodo agent java export --all-separate --no-me } `; -exports[`frodo agent java export "frodo agent java export -A": should export all java agents to separate files 1`] = `""`; +exports[`frodo agent java export "frodo agent java export -A": should export all java agents to separate files 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export -A": should export all java agents to separate files 2`] = `""`; exports[`frodo agent java export "frodo agent java export -A": should export all java agents to separate files: frodo-test-java-agent.java.agent.json 1`] = ` { @@ -2048,7 +2056,9 @@ exports[`frodo agent java export "frodo agent java export -A": should export all } `; -exports[`frodo agent java export "frodo agent java export -NaD agentJavaExportTestDir2": should export all java agents to a single file in the directory agentJavaExportTestDir2 1`] = `""`; +exports[`frodo agent java export "frodo agent java export -NaD agentJavaExportTestDir2": should export all java agents to a single file in the directory agentJavaExportTestDir2 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export -NaD agentJavaExportTestDir2": should export all java agents to a single file in the directory agentJavaExportTestDir2 2`] = `""`; exports[`frodo agent java export "frodo agent java export -NaD agentJavaExportTestDir2": should export all java agents to a single file in the directory agentJavaExportTestDir2: agentJavaExportTestDir2/allAlphaAgents.java.agent.json 1`] = ` { @@ -2499,7 +2509,9 @@ exports[`frodo agent java export "frodo agent java export -NaD agentJavaExportTe } `; -exports[`frodo agent java export "frodo agent java export -Ni frodo-test-java-agent -D agentJavaExportTestDir1": should export the java agent with agent id "frodo-test-java-agent" into the directory agentJavaExportTestDir1 1`] = `""`; +exports[`frodo agent java export "frodo agent java export -Ni frodo-test-java-agent -D agentJavaExportTestDir1": should export the java agent with agent id "frodo-test-java-agent" into the directory agentJavaExportTestDir1 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export -Ni frodo-test-java-agent -D agentJavaExportTestDir1": should export the java agent with agent id "frodo-test-java-agent" into the directory agentJavaExportTestDir1 2`] = `""`; exports[`frodo agent java export "frodo agent java export -Ni frodo-test-java-agent -D agentJavaExportTestDir1": should export the java agent with agent id "frodo-test-java-agent" into the directory agentJavaExportTestDir1: agentJavaExportTestDir1/frodo-test-java-agent.java.agent.json 1`] = ` { @@ -3173,7 +3185,9 @@ exports[`frodo agent java export "frodo agent java export -Ni frodo-test-java-ag } `; -exports[`frodo agent java export "frodo agent java export -a --file my-allAlphaAgents.java.agent.json": should export all java agents to a single file named my-allAlphaAgents.java.agent.json 1`] = `""`; +exports[`frodo agent java export "frodo agent java export -a --file my-allAlphaAgents.java.agent.json": should export all java agents to a single file named my-allAlphaAgents.java.agent.json 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export -a --file my-allAlphaAgents.java.agent.json": should export all java agents to a single file named my-allAlphaAgents.java.agent.json 2`] = `""`; exports[`frodo agent java export "frodo agent java export -a --file my-allAlphaAgents.java.agent.json": should export all java agents to a single file named my-allAlphaAgents.java.agent.json: my-allAlphaAgents.java.agent.json 1`] = ` { @@ -3626,7 +3640,9 @@ exports[`frodo agent java export "frodo agent java export -a --file my-allAlphaA } `; -exports[`frodo agent java export "frodo agent java export -i frodo-test-java-agent -f my-frodo-test-java-agent.java.agent.json": should export the java agent with agent id "frodo-test-java-agent" into file named my-frodo-test-java-agent.java.agent.json 1`] = `""`; +exports[`frodo agent java export "frodo agent java export -i frodo-test-java-agent -f my-frodo-test-java-agent.java.agent.json": should export the java agent with agent id "frodo-test-java-agent" into file named my-frodo-test-java-agent.java.agent.json 1`] = `0`; + +exports[`frodo agent java export "frodo agent java export -i frodo-test-java-agent -f my-frodo-test-java-agent.java.agent.json": should export the java agent with agent id "frodo-test-java-agent" into file named my-frodo-test-java-agent.java.agent.json 2`] = `""`; exports[`frodo agent java export "frodo agent java export -i frodo-test-java-agent -f my-frodo-test-java-agent.java.agent.json": should export the java agent with agent id "frodo-test-java-agent" into file named my-frodo-test-java-agent.java.agent.json: my-frodo-test-java-agent.java.agent.json 1`] = ` { diff --git a/test/e2e/__snapshots__/agent-web-export.e2e.test.js.snap b/test/e2e/__snapshots__/agent-web-export.e2e.test.js.snap index bc67c69fa..6dd38e266 100644 --- a/test/e2e/__snapshots__/agent-web-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/agent-web-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo agent web export "frodo agent web export --agent-id frodo-test-web-agent": should export the web agent with agent id "frodo-test-web-agent" 1`] = `""`; +exports[`frodo agent web export "frodo agent web export --agent-id frodo-test-web-agent": should export the web agent with agent id "frodo-test-web-agent" 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export --agent-id frodo-test-web-agent": should export the web agent with agent id "frodo-test-web-agent" 2`] = `""`; exports[`frodo agent web export "frodo agent web export --agent-id frodo-test-web-agent": should export the web agent with agent id "frodo-test-web-agent": frodo-test-web-agent.web.agent.json 1`] = ` { @@ -491,7 +493,9 @@ exports[`frodo agent web export "frodo agent web export --agent-id frodo-test-we } `; -exports[`frodo agent web export "frodo agent web export --all": should export all web agents to a single file 1`] = `""`; +exports[`frodo agent web export "frodo agent web export --all": should export all web agents to a single file 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export --all": should export all web agents to a single file 2`] = `""`; exports[`frodo agent web export "frodo agent web export --all": should export all web agents to a single file: allAlphaAgents.web.agent.json 1`] = ` { @@ -824,7 +828,9 @@ exports[`frodo agent web export "frodo agent web export --all": should export al } `; -exports[`frodo agent web export "frodo agent web export --all-separate --no-metadata --directory agentWebExportTestDir3": should export all web agents to separate files in the directory agentWebExportTestDir3 1`] = `""`; +exports[`frodo agent web export "frodo agent web export --all-separate --no-metadata --directory agentWebExportTestDir3": should export all web agents to separate files in the directory agentWebExportTestDir3 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export --all-separate --no-metadata --directory agentWebExportTestDir3": should export all web agents to separate files in the directory agentWebExportTestDir3 2`] = `""`; exports[`frodo agent web export "frodo agent web export --all-separate --no-metadata --directory agentWebExportTestDir3": should export all web agents to separate files in the directory agentWebExportTestDir3: agentWebExportTestDir3/frodo-test-web-agent.web.agent.json 1`] = ` { @@ -1162,7 +1168,9 @@ exports[`frodo agent web export "frodo agent web export --all-separate --no-meta } `; -exports[`frodo agent web export "frodo agent web export -A": should export all web agents to separate files 1`] = `""`; +exports[`frodo agent web export "frodo agent web export -A": should export all web agents to separate files 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export -A": should export all web agents to separate files 2`] = `""`; exports[`frodo agent web export "frodo agent web export -A": should export all web agents to separate files: frodo-test-web-agent.web.agent.json 1`] = ` { @@ -1503,7 +1511,9 @@ exports[`frodo agent web export "frodo agent web export -A": should export all w } `; -exports[`frodo agent web export "frodo agent web export -NaD agentWebExportTestDir2": should export all web agents to a single file in the directory agentWebExportTestDir2 1`] = `""`; +exports[`frodo agent web export "frodo agent web export -NaD agentWebExportTestDir2": should export all web agents to a single file in the directory agentWebExportTestDir2 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export -NaD agentWebExportTestDir2": should export all web agents to a single file in the directory agentWebExportTestDir2 2`] = `""`; exports[`frodo agent web export "frodo agent web export -NaD agentWebExportTestDir2": should export all web agents to a single file in the directory agentWebExportTestDir2: agentWebExportTestDir2/allAlphaAgents.web.agent.json 1`] = ` { @@ -1834,7 +1844,9 @@ exports[`frodo agent web export "frodo agent web export -NaD agentWebExportTestD } `; -exports[`frodo agent web export "frodo agent web export -Ni frodo-test-web-agent -D agentWebExportTestDir1": should export the web agent with agent id "frodo-test-web-agent" into the directory agentWebExportTestDir1 1`] = `""`; +exports[`frodo agent web export "frodo agent web export -Ni frodo-test-web-agent -D agentWebExportTestDir1": should export the web agent with agent id "frodo-test-web-agent" into the directory agentWebExportTestDir1 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export -Ni frodo-test-web-agent -D agentWebExportTestDir1": should export the web agent with agent id "frodo-test-web-agent" into the directory agentWebExportTestDir1 2`] = `""`; exports[`frodo agent web export "frodo agent web export -Ni frodo-test-web-agent -D agentWebExportTestDir1": should export the web agent with agent id "frodo-test-web-agent" into the directory agentWebExportTestDir1: agentWebExportTestDir1/frodo-test-web-agent.web.agent.json 1`] = ` { @@ -2323,7 +2335,9 @@ exports[`frodo agent web export "frodo agent web export -Ni frodo-test-web-agent } `; -exports[`frodo agent web export "frodo agent web export -i frodo-test-web-agent -f my-frodo-test-web-agent.web.agent.json": should export the web agent with agent id "frodo-test-web-agent" into file named test.json 1`] = `""`; +exports[`frodo agent web export "frodo agent web export -i frodo-test-web-agent -f my-frodo-test-web-agent.web.agent.json": should export the web agent with agent id "frodo-test-web-agent" into file named test.json 1`] = `0`; + +exports[`frodo agent web export "frodo agent web export -i frodo-test-web-agent -f my-frodo-test-web-agent.web.agent.json": should export the web agent with agent id "frodo-test-web-agent" into file named test.json 2`] = `""`; exports[`frodo agent web export "frodo agent web export -i frodo-test-web-agent -f my-frodo-test-web-agent.web.agent.json": should export the web agent with agent id "frodo-test-web-agent" into file named test.json: my-frodo-test-web-agent.web.agent.json 1`] = ` { diff --git a/test/e2e/__snapshots__/app-export.e2e.test.js.snap b/test/e2e/__snapshots__/app-export.e2e.test.js.snap index a33223c28..fc264b121 100644 --- a/test/e2e/__snapshots__/app-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/app-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo app export "frodo app export --all -f my-allAlphaApplications.application.json": should export all apps to a single file named my-allAlphaApplications.application.json 1`] = `""`; +exports[`frodo app export "frodo app export --all -f my-allAlphaApplications.application.json": should export all apps to a single file named my-allAlphaApplications.application.json 1`] = `0`; + +exports[`frodo app export "frodo app export --all -f my-allAlphaApplications.application.json": should export all apps to a single file named my-allAlphaApplications.application.json 2`] = `""`; exports[`frodo app export "frodo app export --all -f my-allAlphaApplications.application.json": should export all apps to a single file named my-allAlphaApplications.application.json: my-allAlphaApplications.application.json 1`] = ` { @@ -3191,7 +3193,9 @@ target.manager = {"_ref":"managed/alpha_user/"+queryResult.result[0]._id,"_refPr } `; -exports[`frodo app export "frodo app export --app-id EncoreADv2": should export the app with app id "EncoreADv2" 1`] = `""`; +exports[`frodo app export "frodo app export --app-id EncoreADv2": should export the app with app id "EncoreADv2" 1`] = `0`; + +exports[`frodo app export "frodo app export --app-id EncoreADv2": should export the app with app id "EncoreADv2" 2`] = `""`; exports[`frodo app export "frodo app export --app-id EncoreADv2": should export the app with app id "EncoreADv2": EncoreADv2.application.json 1`] = ` { @@ -4485,7 +4489,9 @@ if (!idFound) { } `; -exports[`frodo app export "frodo app export -A": should export all apps to separate files 1`] = `""`; +exports[`frodo app export "frodo app export -A": should export all apps to separate files 1`] = `0`; + +exports[`frodo app export "frodo app export -A": should export all apps to separate files 2`] = `""`; exports[`frodo app export "frodo app export -A": should export all apps to separate files: EncoreADv2.application.json 1`] = ` { @@ -7815,7 +7821,9 @@ exports[`frodo app export "frodo app export -A": should export all apps to separ } `; -exports[`frodo app export "frodo app export -a --file my-other-allAlphaApplications.application.json": should export all apps to a single file named my-other-allAlphaApplications.application.json 1`] = `""`; +exports[`frodo app export "frodo app export -a --file my-other-allAlphaApplications.application.json": should export all apps to a single file named my-other-allAlphaApplications.application.json 1`] = `0`; + +exports[`frodo app export "frodo app export -a --file my-other-allAlphaApplications.application.json": should export all apps to a single file named my-other-allAlphaApplications.application.json 2`] = `""`; exports[`frodo app export "frodo app export -a --file my-other-allAlphaApplications.application.json": should export all apps to a single file named my-other-allAlphaApplications.application.json: my-other-allAlphaApplications.application.json 1`] = ` { @@ -11006,7 +11014,9 @@ target.manager = {"_ref":"managed/alpha_user/"+queryResult.result[0]._id,"_refPr } `; -exports[`frodo app export "frodo app export -a --no-deps -f my-yet-another-allAlphaApplications.application.json": should export all apps to a single file with no dependencies into a file named my-yet-another-allAlphaApplications.application.json 1`] = `""`; +exports[`frodo app export "frodo app export -a --no-deps -f my-yet-another-allAlphaApplications.application.json": should export all apps to a single file with no dependencies into a file named my-yet-another-allAlphaApplications.application.json 1`] = `0`; + +exports[`frodo app export "frodo app export -a --no-deps -f my-yet-another-allAlphaApplications.application.json": should export all apps to a single file with no dependencies into a file named my-yet-another-allAlphaApplications.application.json 2`] = `""`; exports[`frodo app export "frodo app export -a --no-deps -f my-yet-another-allAlphaApplications.application.json": should export all apps to a single file with no dependencies into a file named my-yet-another-allAlphaApplications.application.json: my-yet-another-allAlphaApplications.application.json 1`] = ` { @@ -11390,7 +11400,9 @@ exports[`frodo app export "frodo app export -a --no-deps -f my-yet-another-allAl } `; -exports[`frodo app export "frodo app export -a": should export all apps to a single file 1`] = `""`; +exports[`frodo app export "frodo app export -a": should export all apps to a single file 1`] = `0`; + +exports[`frodo app export "frodo app export -a": should export all apps to a single file 2`] = `""`; exports[`frodo app export "frodo app export -a": should export all apps to a single file: allAlphaApplications.application.json 1`] = ` { @@ -14581,7 +14593,9 @@ target.manager = {"_ref":"managed/alpha_user/"+queryResult.result[0]._id,"_refPr } `; -exports[`frodo app export "frodo app export -i HRLite --no-deps -f my-nodeps-HRLite.application.json": should export the app with app id "HRLite" with no dependencies into a file named my-nodeps-HRLite.application.json 1`] = `""`; +exports[`frodo app export "frodo app export -i HRLite --no-deps -f my-nodeps-HRLite.application.json": should export the app with app id "HRLite" with no dependencies into a file named my-nodeps-HRLite.application.json 1`] = `0`; + +exports[`frodo app export "frodo app export -i HRLite --no-deps -f my-nodeps-HRLite.application.json": should export the app with app id "HRLite" with no dependencies into a file named my-nodeps-HRLite.application.json 2`] = `""`; exports[`frodo app export "frodo app export -i HRLite --no-deps -f my-nodeps-HRLite.application.json": should export the app with app id "HRLite" with no dependencies into a file named my-nodeps-HRLite.application.json: my-nodeps-HRLite.application.json 1`] = ` { @@ -14639,7 +14653,9 @@ exports[`frodo app export "frodo app export -i HRLite --no-deps -f my-nodeps-HRL } `; -exports[`frodo app export "frodo app export -i HRLite -f my-HRLite.application.json": should export the app with app id "HRLite" into file named my-HRLite.application.json 1`] = `""`; +exports[`frodo app export "frodo app export -i HRLite -f my-HRLite.application.json": should export the app with app id "HRLite" into file named my-HRLite.application.json 1`] = `0`; + +exports[`frodo app export "frodo app export -i HRLite -f my-HRLite.application.json": should export the app with app id "HRLite" into file named my-HRLite.application.json 2`] = `""`; exports[`frodo app export "frodo app export -i HRLite -f my-HRLite.application.json": should export the app with app id "HRLite" into file named my-HRLite.application.json: my-HRLite.application.json 1`] = ` { @@ -15241,7 +15257,9 @@ target.manager = {"_ref":"managed/alpha_user/"+queryResult.result[0]._id,"_refPr } `; -exports[`frodo app export "frodo app export -i HRLite": should export the app with app id "HRLite" 1`] = `""`; +exports[`frodo app export "frodo app export -i HRLite": should export the app with app id "HRLite" 1`] = `0`; + +exports[`frodo app export "frodo app export -i HRLite": should export the app with app id "HRLite" 2`] = `""`; exports[`frodo app export "frodo app export -i HRLite": should export the app with app id "HRLite": HRLite.application.json 1`] = ` { diff --git a/test/e2e/__snapshots__/authn-export.e2e.test.js.snap b/test/e2e/__snapshots__/authn-export.e2e.test.js.snap index 5da46dc37..7a0ee1dcf 100644 --- a/test/e2e/__snapshots__/authn-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/authn-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo authn export "frodo authn export --global --no-metadata --directory authnExportDir3 --type classic": should export global authentication settings to a file in the "authnExportDir3" directory 1`] = `""`; +exports[`frodo authn export "frodo authn export --global --no-metadata --directory authnExportDir3 --type classic": should export global authentication settings to a file in the "authnExportDir3" directory 1`] = `0`; + +exports[`frodo authn export "frodo authn export --global --no-metadata --directory authnExportDir3 --type classic": should export global authentication settings to a file in the "authnExportDir3" directory 2`] = `""`; exports[`frodo authn export "frodo authn export --global --no-metadata --directory authnExportDir3 --type classic": should export global authentication settings to a file in the "authnExportDir3" directory: authnExportDir3/global.authentication.settings.json 1`] = ` { @@ -116,7 +118,9 @@ exports[`frodo authn export "frodo authn export --global --no-metadata --directo } `; -exports[`frodo authn export "frodo authn export --no-metadata --file authnExportTest.json --directory authnExportDir2": should export authentication settings to a file named "authnExportTest.json" in the "authnExportDir2" directory 1`] = `""`; +exports[`frodo authn export "frodo authn export --no-metadata --file authnExportTest.json --directory authnExportDir2": should export authentication settings to a file named "authnExportTest.json" in the "authnExportDir2" directory 1`] = `0`; + +exports[`frodo authn export "frodo authn export --no-metadata --file authnExportTest.json --directory authnExportDir2": should export authentication settings to a file named "authnExportTest.json" in the "authnExportDir2" directory 2`] = `""`; exports[`frodo authn export "frodo authn export --no-metadata --file authnExportTest.json --directory authnExportDir2": should export authentication settings to a file named "authnExportTest.json" in the "authnExportDir2" directory: authnExportDir2/authnExportTest.json 1`] = ` { @@ -190,7 +194,9 @@ exports[`frodo authn export "frodo authn export --no-metadata --file authnExport } `; -exports[`frodo authn export "frodo authn export -ND authnExportDir1": should export authentication settings to a single file in the "authnExportDir1" directory 1`] = `""`; +exports[`frodo authn export "frodo authn export -ND authnExportDir1": should export authentication settings to a single file in the "authnExportDir1" directory 1`] = `0`; + +exports[`frodo authn export "frodo authn export -ND authnExportDir1": should export authentication settings to a single file in the "authnExportDir1" directory 2`] = `""`; exports[`frodo authn export "frodo authn export -ND authnExportDir1": should export authentication settings to a single file in the "authnExportDir1" directory: authnExportDir1/alphaRealm.authentication.settings.json 1`] = ` { @@ -264,7 +270,9 @@ exports[`frodo authn export "frodo authn export -ND authnExportDir1": should exp } `; -exports[`frodo authn export "frodo authn export -f authnExportTest.json": should export authentication settings to a file named "authnExportTest.json" 1`] = `""`; +exports[`frodo authn export "frodo authn export -f authnExportTest.json": should export authentication settings to a file named "authnExportTest.json" 1`] = `0`; + +exports[`frodo authn export "frodo authn export -f authnExportTest.json": should export authentication settings to a file named "authnExportTest.json" 2`] = `""`; exports[`frodo authn export "frodo authn export -f authnExportTest.json": should export authentication settings to a file named "authnExportTest.json": authnExportTest.json 1`] = ` { @@ -339,7 +347,9 @@ exports[`frodo authn export "frodo authn export -f authnExportTest.json": should } `; -exports[`frodo authn export "frodo authn export -g -m classic": should export global authentication settings to a file 1`] = `""`; +exports[`frodo authn export "frodo authn export -g -m classic": should export global authentication settings to a file 1`] = `0`; + +exports[`frodo authn export "frodo authn export -g -m classic": should export global authentication settings to a file 2`] = `""`; exports[`frodo authn export "frodo authn export -g -m classic": should export global authentication settings to a file: global.authentication.settings.json 1`] = ` { diff --git a/test/e2e/__snapshots__/authz-policy-export.e2e.test.js.snap b/test/e2e/__snapshots__/authz-policy-export.e2e.test.js.snap index c3bfd838c..0128f18f9 100644 --- a/test/e2e/__snapshots__/authz-policy-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/authz-policy-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo authz policy export "frodo authz policy export --all --file my-allAlphaPolicies.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to a single file named my-allAlphaPolicies.policy.authz.json with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export --all --file my-allAlphaPolicies.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to a single file named my-allAlphaPolicies.policy.authz.json with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export --all --file my-allAlphaPolicies.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to a single file named my-allAlphaPolicies.policy.authz.json with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export --all --file my-allAlphaPolicies.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to a single file named my-allAlphaPolicies.policy.authz.json with no dependencies and with prereqs: my-allAlphaPolicies.policy.authz.json 1`] = ` { @@ -157,7 +159,9 @@ exports[`frodo authz policy export "frodo authz policy export --all --file my-al } `; -exports[`frodo authz policy export "frodo authz policy export --all-separate --no-metadata --directory authzPolicyExportTestDir3 --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to separate files in the directory authzPolicyExportTestDir3 with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export --all-separate --no-metadata --directory authzPolicyExportTestDir3 --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to separate files in the directory authzPolicyExportTestDir3 with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export --all-separate --no-metadata --directory authzPolicyExportTestDir3 --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to separate files in the directory authzPolicyExportTestDir3 with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export --all-separate --no-metadata --directory authzPolicyExportTestDir3 --set-id test-policy-set --no-deps --prereqs": should export all policies from the test-policy-set to separate files in the directory authzPolicyExportTestDir3 with no dependencies and with prereqs: authzPolicyExportTestDir3/FeatureStorePolicy.policy.authz.json 1`] = ` { @@ -398,7 +402,9 @@ exports[`frodo authz policy export "frodo authz policy export --all-separate --n } `; -exports[`frodo authz policy export "frodo authz policy export --policy-id 'Test Policy' -f my-Test-Policy.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export the policy with id "Test Policy" from the test-policy-set into the file my-Test-Policy.policy.authz.json with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export --policy-id 'Test Policy' -f my-Test-Policy.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export the policy with id "Test Policy" from the test-policy-set into the file my-Test-Policy.policy.authz.json with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export --policy-id 'Test Policy' -f my-Test-Policy.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export the policy with id "Test Policy" from the test-policy-set into the file my-Test-Policy.policy.authz.json with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export --policy-id 'Test Policy' -f my-Test-Policy.policy.authz.json --set-id test-policy-set --no-deps --prereqs": should export the policy with id "Test Policy" from the test-policy-set into the file my-Test-Policy.policy.authz.json with no dependencies and with prereqs: my-Test-Policy.policy.authz.json 1`] = ` { @@ -536,7 +542,9 @@ exports[`frodo authz policy export "frodo authz policy export --policy-id 'Test } `; -exports[`frodo authz policy export "frodo authz policy export -A": should export all policies to separate files 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export -A": should export all policies to separate files 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export -A": should export all policies to separate files 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export -A": should export all policies to separate files: FeatureStorePolicy.policy.authz.json 1`] = ` { @@ -665,7 +673,9 @@ exports[`frodo authz policy export "frodo authz policy export -A": should export } `; -exports[`frodo authz policy export "frodo authz policy export -NaD authzPolicyExportTestDir2": should export all policies to a single file in the directory authzPolicyExportTestDir2 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export -NaD authzPolicyExportTestDir2": should export all policies to a single file in the directory authzPolicyExportTestDir2 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export -NaD authzPolicyExportTestDir2": should export all policies to a single file in the directory authzPolicyExportTestDir2 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export -NaD authzPolicyExportTestDir2": should export all policies to a single file in the directory authzPolicyExportTestDir2: authzPolicyExportTestDir2/allAlphaPolicies.policy.authz.json 1`] = ` { @@ -768,7 +778,9 @@ exports[`frodo authz policy export "frodo authz policy export -NaD authzPolicyEx } `; -exports[`frodo authz policy export "frodo authz policy export -Ni 'Test Policy' -D authzPolicyExportTestDir1": should export the policy with id "Test Policy" into the directory authzPolicyExportTestDir1 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export -Ni 'Test Policy' -D authzPolicyExportTestDir1": should export the policy with id "Test Policy" into the directory authzPolicyExportTestDir1 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export -Ni 'Test Policy' -D authzPolicyExportTestDir1": should export the policy with id "Test Policy" into the directory authzPolicyExportTestDir1 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export -Ni 'Test Policy' -D authzPolicyExportTestDir1": should export the policy with id "Test Policy" into the directory authzPolicyExportTestDir1: authzPolicyExportTestDir1/Test-Policy.policy.authz.json 1`] = ` { @@ -852,7 +864,9 @@ exports[`frodo authz policy export "frodo authz policy export -Ni 'Test Policy' } `; -exports[`frodo authz policy export "frodo authz policy export -a": should export all policies to a single file 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export -a": should export all policies to a single file 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export -a": should export all policies to a single file 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export -a": should export all policies to a single file: allAlphaPolicies.policy.authz.json 1`] = ` { @@ -970,7 +984,9 @@ exports[`frodo authz policy export "frodo authz policy export -a": should export } `; -exports[`frodo authz policy export "frodo authz policy export -i 'Test Policy'": should export the policy with id "Test Policy" 1`] = `""`; +exports[`frodo authz policy export "frodo authz policy export -i 'Test Policy'": should export the policy with id "Test Policy" 1`] = `0`; + +exports[`frodo authz policy export "frodo authz policy export -i 'Test Policy'": should export the policy with id "Test Policy" 2`] = `""`; exports[`frodo authz policy export "frodo authz policy export -i 'Test Policy'": should export the policy with id "Test Policy": Test-Policy.policy.authz.json 1`] = ` { diff --git a/test/e2e/__snapshots__/authz-set-export.e2e.test.js.snap b/test/e2e/__snapshots__/authz-set-export.e2e.test.js.snap index f402ae354..1a41e9605 100644 --- a/test/e2e/__snapshots__/authz-set-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/authz-set-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo authz set export "frodo authz set export --all --file my-allAlphaPolicySets.policyset.authz.json --no-deps --prereqs": should export all policy sets from the test-policy-set to a single file named my-allAlphaPolicySets.policyset.authz.json with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz set export "frodo authz set export --all --file my-allAlphaPolicySets.policyset.authz.json --no-deps --prereqs": should export all policy sets from the test-policy-set to a single file named my-allAlphaPolicySets.policyset.authz.json with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export --all --file my-allAlphaPolicySets.policyset.authz.json --no-deps --prereqs": should export all policy sets from the test-policy-set to a single file named my-allAlphaPolicySets.policyset.authz.json with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz set export "frodo authz set export --all --file my-allAlphaPolicySets.policyset.authz.json --no-deps --prereqs": should export all policy sets from the test-policy-set to a single file named my-allAlphaPolicySets.policyset.authz.json with no dependencies and with prereqs: my-allAlphaPolicySets.policyset.authz.json 1`] = ` { @@ -138,7 +140,9 @@ exports[`frodo authz set export "frodo authz set export --all --file my-allAlpha } `; -exports[`frodo authz set export "frodo authz set export --all-separate --no-metadata --directory authzPolicySetExportTestDir3 --no-deps --prereqs": should export all policy sets from the test-policy-set to separate files in the directory authzPolicySetExportTestDir3 with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz set export "frodo authz set export --all-separate --no-metadata --directory authzPolicySetExportTestDir3 --no-deps --prereqs": should export all policy sets from the test-policy-set to separate files in the directory authzPolicySetExportTestDir3 with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export --all-separate --no-metadata --directory authzPolicySetExportTestDir3 --no-deps --prereqs": should export all policy sets from the test-policy-set to separate files in the directory authzPolicySetExportTestDir3 with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz set export "frodo authz set export --all-separate --no-metadata --directory authzPolicySetExportTestDir3 --no-deps --prereqs": should export all policy sets from the test-policy-set to separate files in the directory authzPolicySetExportTestDir3 with no dependencies and with prereqs: authzPolicySetExportTestDir3/FeatureStorePolicySet.policyset.authz.json 1`] = ` { @@ -385,7 +389,9 @@ exports[`frodo authz set export "frodo authz set export --all-separate --no-meta } `; -exports[`frodo authz set export "frodo authz set export --set-id test-policy-set -f my-test-policy-set.policyset.authz.json --no-deps --prereqs": should export the policy set with id "test-policy-set" from the test-policy-set into the file .my-test-policy-set.policyset.authz.json with no dependencies and with prereqs 1`] = `""`; +exports[`frodo authz set export "frodo authz set export --set-id test-policy-set -f my-test-policy-set.policyset.authz.json --no-deps --prereqs": should export the policy set with id "test-policy-set" from the test-policy-set into the file .my-test-policy-set.policyset.authz.json with no dependencies and with prereqs 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export --set-id test-policy-set -f my-test-policy-set.policyset.authz.json --no-deps --prereqs": should export the policy set with id "test-policy-set" from the test-policy-set into the file .my-test-policy-set.policyset.authz.json with no dependencies and with prereqs 2`] = `""`; exports[`frodo authz set export "frodo authz set export --set-id test-policy-set -f my-test-policy-set.policyset.authz.json --no-deps --prereqs": should export the policy set with id "test-policy-set" from the test-policy-set into the file .my-test-policy-set.policyset.authz.json with no dependencies and with prereqs: my-test-policy-set.policyset.authz.json 1`] = ` { @@ -472,7 +478,9 @@ exports[`frodo authz set export "frodo authz set export --set-id test-policy-set } `; -exports[`frodo authz set export "frodo authz set export -A": should export all policy sets to separate files 1`] = `""`; +exports[`frodo authz set export "frodo authz set export -A": should export all policy sets to separate files 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export -A": should export all policy sets to separate files 2`] = `""`; exports[`frodo authz set export "frodo authz set export -A": should export all policy sets to separate files: FeatureStorePolicySet.policyset.authz.json 1`] = ` { @@ -704,7 +712,9 @@ exports[`frodo authz set export "frodo authz set export -A": should export all p } `; -exports[`frodo authz set export "frodo authz set export -NaD authzPolicySetExportTestDir2": should export all policy sets to a single file in the directory authzPolicySetExportTestDir2 1`] = `""`; +exports[`frodo authz set export "frodo authz set export -NaD authzPolicySetExportTestDir2": should export all policy sets to a single file in the directory authzPolicySetExportTestDir2 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export -NaD authzPolicySetExportTestDir2": should export all policy sets to a single file in the directory authzPolicySetExportTestDir2 2`] = `""`; exports[`frodo authz set export "frodo authz set export -NaD authzPolicySetExportTestDir2": should export all policy sets to a single file in the directory authzPolicySetExportTestDir2: authzPolicySetExportTestDir2/allAlphaPolicySets.policyset.authz.json 1`] = ` { @@ -959,7 +969,9 @@ exports[`frodo authz set export "frodo authz set export -NaD authzPolicySetExpor } `; -exports[`frodo authz set export "frodo authz set export -Ni test-policy-set -D authzPolicySetExportTestDir1": should export the policy set with id "test-policy-set" into the directory authzPolicySetExportTestDir1 1`] = `""`; +exports[`frodo authz set export "frodo authz set export -Ni test-policy-set -D authzPolicySetExportTestDir1": should export the policy set with id "test-policy-set" into the directory authzPolicySetExportTestDir1 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export -Ni test-policy-set -D authzPolicySetExportTestDir1": should export the policy set with id "test-policy-set" into the directory authzPolicySetExportTestDir1 2`] = `""`; exports[`frodo authz set export "frodo authz set export -Ni test-policy-set -D authzPolicySetExportTestDir1": should export the policy set with id "test-policy-set" into the directory authzPolicySetExportTestDir1: authzPolicySetExportTestDir1/test-policy-set.policyset.authz.json 1`] = ` { @@ -1114,7 +1126,9 @@ exports[`frodo authz set export "frodo authz set export -Ni test-policy-set -D a } `; -exports[`frodo authz set export "frodo authz set export -a": should export all policy sets to a single file 1`] = `""`; +exports[`frodo authz set export "frodo authz set export -a": should export all policy sets to a single file 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export -a": should export all policy sets to a single file 2`] = `""`; exports[`frodo authz set export "frodo authz set export -a": should export all policy sets to a single file: allAlphaPolicySets.policyset.authz.json 1`] = ` { @@ -1335,7 +1349,9 @@ exports[`frodo authz set export "frodo authz set export -a": should export all p } `; -exports[`frodo authz set export "frodo authz set export -i test-policy-set": should export the policy set with id "test-policy-set" 1`] = `""`; +exports[`frodo authz set export "frodo authz set export -i test-policy-set": should export the policy set with id "test-policy-set" 1`] = `0`; + +exports[`frodo authz set export "frodo authz set export -i test-policy-set": should export the policy set with id "test-policy-set" 2`] = `""`; exports[`frodo authz set export "frodo authz set export -i test-policy-set": should export the policy set with id "test-policy-set": test-policy-set.policyset.authz.json 1`] = ` { diff --git a/test/e2e/__snapshots__/authz-type-export.e2e.test.js.snap b/test/e2e/__snapshots__/authz-type-export.e2e.test.js.snap index 618ed1350..584195f1c 100644 --- a/test/e2e/__snapshots__/authz-type-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/authz-type-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo authz type export "frodo authz type export --all": should export all resource types to a single file 1`] = `""`; +exports[`frodo authz type export "frodo authz type export --all": should export all resource types to a single file 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export --all": should export all resource types to a single file 2`] = `""`; exports[`frodo authz type export "frodo authz type export --all": should export all resource types to a single file: allAlphaResourceTypes.resourcetype.authz.json 1`] = ` { @@ -137,7 +139,9 @@ exports[`frodo authz type export "frodo authz type export --all": should export } `; -exports[`frodo authz type export "frodo authz type export --all-separate --no-metadata --directory authzTypeExportTestDir4": should export all resource types to separate files in the directory authzTypeExportTestDir4 1`] = `""`; +exports[`frodo authz type export "frodo authz type export --all-separate --no-metadata --directory authzTypeExportTestDir4": should export all resource types to separate files in the directory authzTypeExportTestDir4 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export --all-separate --no-metadata --directory authzTypeExportTestDir4": should export all resource types to separate files in the directory authzTypeExportTestDir4 2`] = `""`; exports[`frodo authz type export "frodo authz type export --all-separate --no-metadata --directory authzTypeExportTestDir4": should export all resource types to separate files in the directory authzTypeExportTestDir4: authzTypeExportTestDir4/OAuth2-Scope.resourcetype.authz.json 1`] = ` { @@ -198,7 +202,9 @@ exports[`frodo authz type export "frodo authz type export --all-separate --no-me } `; -exports[`frodo authz type export "frodo authz type export --type-id 76656a38-5f8e-401b-83aa-4ccb74ce88d2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" 1`] = `""`; +exports[`frodo authz type export "frodo authz type export --type-id 76656a38-5f8e-401b-83aa-4ccb74ce88d2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export --type-id 76656a38-5f8e-401b-83aa-4ccb74ce88d2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" 2`] = `""`; exports[`frodo authz type export "frodo authz type export --type-id 76656a38-5f8e-401b-83aa-4ccb74ce88d2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2": 76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 1`] = ` { @@ -233,7 +239,9 @@ exports[`frodo authz type export "frodo authz type export --type-id 76656a38-5f8 } `; -exports[`frodo authz type export "frodo authz type export --type-name URL -f test.json": should export the resource type named "URL" 1`] = `""`; +exports[`frodo authz type export "frodo authz type export --type-name URL -f test.json": should export the resource type named "URL" 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export --type-name URL -f test.json": should export the resource type named "URL" 2`] = `""`; exports[`frodo authz type export "frodo authz type export --type-name URL -f test.json": should export the resource type named "URL": my-URL.resourcetype.authz.json 1`] = ` { @@ -268,7 +276,9 @@ exports[`frodo authz type export "frodo authz type export --type-name URL -f tes } `; -exports[`frodo authz type export "frodo authz type export -A": should export all resource types to separate files 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -A": should export all resource types to separate files 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -A": should export all resource types to separate files 2`] = `""`; exports[`frodo authz type export "frodo authz type export -A": should export all resource types to separate files: FrodoTestResourceType11.resourcetype.authz.json 1`] = ` { @@ -471,7 +481,9 @@ exports[`frodo authz type export "frodo authz type export -A": should export all } `; -exports[`frodo authz type export "frodo authz type export -NaD authzTypeExportTestDir3": should export all resource types to a single file in the directory authzTypeExportTestDir3 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -NaD authzTypeExportTestDir3": should export all resource types to a single file in the directory authzTypeExportTestDir3 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -NaD authzTypeExportTestDir3": should export all resource types to a single file in the directory authzTypeExportTestDir3 2`] = `""`; exports[`frodo authz type export "frodo authz type export -NaD authzTypeExportTestDir3": should export all resource types to a single file in the directory authzTypeExportTestDir3: authzTypeExportTestDir3/allAlphaResourceTypes.resourcetype.authz.json 1`] = ` { @@ -522,7 +534,9 @@ exports[`frodo authz type export "frodo authz type export -NaD authzTypeExportTe } `; -exports[`frodo authz type export "frodo authz type export -Ni 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -D authzTypeExportTestDir2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into the directory authzTypeExportTestDir2 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -Ni 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -D authzTypeExportTestDir2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into the directory authzTypeExportTestDir2 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -Ni 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -D authzTypeExportTestDir2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into the directory authzTypeExportTestDir2 2`] = `""`; exports[`frodo authz type export "frodo authz type export -Ni 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -D authzTypeExportTestDir2": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into the directory authzTypeExportTestDir2: authzTypeExportTestDir2/76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 1`] = ` { @@ -556,7 +570,9 @@ exports[`frodo authz type export "frodo authz type export -Ni 76656a38-5f8e-401b } `; -exports[`frodo authz type export "frodo authz type export -Nn URL -D authzTypeExportTestDir1": should export the resource type named "URL" to the directory authzTypeExportTestDir1 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -Nn URL -D authzTypeExportTestDir1": should export the resource type named "URL" to the directory authzTypeExportTestDir1 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -Nn URL -D authzTypeExportTestDir1": should export the resource type named "URL" to the directory authzTypeExportTestDir1 2`] = `""`; exports[`frodo authz type export "frodo authz type export -Nn URL -D authzTypeExportTestDir1": should export the resource type named "URL" to the directory authzTypeExportTestDir1: authzTypeExportTestDir1/URL.resourcetype.authz.json 1`] = ` { @@ -590,7 +606,9 @@ exports[`frodo authz type export "frodo authz type export -Nn URL -D authzTypeEx } `; -exports[`frodo authz type export "frodo authz type export -a --file my-allAlphaResourceTypes.resourcetype.authz.json": should export all resource types to a single file named my-allAlphaResourceTypes.resourcetype.authz.json 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -a --file my-allAlphaResourceTypes.resourcetype.authz.json": should export all resource types to a single file named my-allAlphaResourceTypes.resourcetype.authz.json 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -a --file my-allAlphaResourceTypes.resourcetype.authz.json": should export all resource types to a single file named my-allAlphaResourceTypes.resourcetype.authz.json 2`] = `""`; exports[`frodo authz type export "frodo authz type export -a --file my-allAlphaResourceTypes.resourcetype.authz.json": should export all resource types to a single file named my-allAlphaResourceTypes.resourcetype.authz.json: my-allAlphaResourceTypes.resourcetype.authz.json 1`] = ` { @@ -727,7 +745,9 @@ exports[`frodo authz type export "frodo authz type export -a --file my-allAlphaR } `; -exports[`frodo authz type export "frodo authz type export -i 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -f my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into file named my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -i 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -f my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into file named my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -i 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -f my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into file named my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 2`] = `""`; exports[`frodo authz type export "frodo authz type export -i 76656a38-5f8e-401b-83aa-4ccb74ce88d2 -f my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json": should export the resource type with id "76656a38-5f8e-401b-83aa-4ccb74ce88d2" into file named my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json: my-76656a38-5f8e-401b-83aa-4ccb74ce88d2.resourcetype.authz.json 1`] = ` { @@ -762,7 +782,9 @@ exports[`frodo authz type export "frodo authz type export -i 76656a38-5f8e-401b- } `; -exports[`frodo authz type export "frodo authz type export -n URL": should export the resource type named "URL" 1`] = `""`; +exports[`frodo authz type export "frodo authz type export -n URL": should export the resource type named "URL" 1`] = `0`; + +exports[`frodo authz type export "frodo authz type export -n URL": should export the resource type named "URL" 2`] = `""`; exports[`frodo authz type export "frodo authz type export -n URL": should export the resource type named "URL": URL.resourcetype.authz.json 1`] = ` { diff --git a/test/e2e/__snapshots__/config-export.e2e.test.js.snap b/test/e2e/__snapshots__/config-export.e2e.test.js.snap index e5381e532..c0f08a28f 100644 --- a/test/e2e/__snapshots__/config-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/config-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo config export "frodo config export --all --file testExportAll.json --use-string-arrays --no-decode --no-coords": should export everything to a single file named testExportAll.json with no decoding variables, no journey coordinates, and using string arrays 1`] = `""`; +exports[`frodo config export "frodo config export --all --file testExportAll.json --use-string-arrays --no-decode --no-coords": should export everything to a single file named testExportAll.json with no decoding variables, no journey coordinates, and using string arrays 1`] = `1`; + +exports[`frodo config export "frodo config export --all --file testExportAll.json --use-string-arrays --no-decode --no-coords": should export everything to a single file named testExportAll.json with no decoding variables, no journey coordinates, and using string arrays 2`] = `""`; exports[`frodo config export "frodo config export --all --file testExportAll.json --use-string-arrays --no-decode --no-coords": should export everything to a single file named testExportAll.json with no decoding variables, no journey coordinates, and using string arrays: testExportAll.json 1`] = ` { @@ -45994,7 +45996,9 @@ isGoogleEligible; } `; -exports[`frodo config export "frodo config export --all --read-only --file testExportAll2.json --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything to a single file named testExportAll2.json with no decoding variables, no journey coordinates, and using string arrays 1`] = `""`; +exports[`frodo config export "frodo config export --all --read-only --file testExportAll2.json --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything to a single file named testExportAll2.json with no decoding variables, no journey coordinates, and using string arrays 1`] = `0`; + +exports[`frodo config export "frodo config export --all --read-only --file testExportAll2.json --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything to a single file named testExportAll2.json with no decoding variables, no journey coordinates, and using string arrays 2`] = `""`; exports[`frodo config export "frodo config export --all --read-only --file testExportAll2.json --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything to a single file named testExportAll2.json with no decoding variables, no journey coordinates, and using string arrays: testExportAll2.json 1`] = ` { @@ -71262,7 +71266,9 @@ exports[`frodo config export "frodo config export --all --read-only --file testE } `; -exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `""`; +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `0`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 2`] = `""`; exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays: exportAllTestDir8/global/agent/AgentService.agent.json 1`] = ` { @@ -107857,7 +107863,9 @@ exports[`frodo config export "frodo config export --all-separate --no-metadata - } `; -exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `""`; +exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `1`; + +exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 2`] = `""`; exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays: exportAllTestDir3/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` { @@ -185332,7 +185340,9 @@ exports[`frodo config export "frodo config export --all-separate --read-only --n } `; -exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json. 1`] = `""`; +exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json. 1`] = `0`; + +exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json. 2`] = `""`; exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json.: testExportAllGlobal.json 1`] = ` { @@ -194080,7 +194090,9 @@ exports[`frodo config export "frodo config export --global-only -af testExportAl } `; -exports[`frodo config export "frodo config export --realm-only -AD exportAllTestDir10 -m classic": should export all global config into separate files in the directory exportAllTestDir10 1`] = `""`; +exports[`frodo config export "frodo config export --realm-only -AD exportAllTestDir10 -m classic": should export all global config into separate files in the directory exportAllTestDir10 1`] = `0`; + +exports[`frodo config export "frodo config export --realm-only -AD exportAllTestDir10 -m classic": should export all global config into separate files in the directory exportAllTestDir10 2`] = `""`; exports[`frodo config export "frodo config export --realm-only -AD exportAllTestDir10 -m classic": should export all global config into separate files in the directory exportAllTestDir10: exportAllTestDir10/realm/root/agent/Test-IG.agent.json 1`] = ` { @@ -203362,7 +203374,9 @@ exports[`frodo config export "frodo config export --realm-only -AD exportAllTest } `; -exports[`frodo config export "frodo config export -AD exportAllTestDir1": should export everything into separate files in the directory exportAllTestDir1 1`] = `""`; +exports[`frodo config export "frodo config export -AD exportAllTestDir1": should export everything into separate files in the directory exportAllTestDir1 1`] = `1`; + +exports[`frodo config export "frodo config export -AD exportAllTestDir1": should export everything into separate files in the directory exportAllTestDir1 2`] = `""`; exports[`frodo config export "frodo config export -AD exportAllTestDir1": should export everything into separate files in the directory exportAllTestDir1: exportAllTestDir1/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` { @@ -252069,7 +252083,9 @@ exports[`frodo config export "frodo config export -AD exportAllTestDir1": should } `; -exports[`frodo config export "frodo config export -AsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate 1`] = `""`; +exports[`frodo config export "frodo config export -AsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate 1`] = `1`; + +exports[`frodo config export "frodo config export -AsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate 2`] = `""`; exports[`frodo config export "frodo config export -AsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate: exportAllTestDir2/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` { @@ -300932,7 +300948,9 @@ exports[`frodo config export "frodo config export -AsxD exportAllTestDir2": shou } `; -exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5 1`] = `""`; +exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5 1`] = `1`; + +exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5 2`] = `""`; exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5: exportAllTestDir5/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` { @@ -369099,7 +369117,9 @@ exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --inclu } `; -exports[`frodo config export "frodo config export -RAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate 1`] = `""`; +exports[`frodo config export "frodo config export -RAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate 1`] = `0`; + +exports[`frodo config export "frodo config export -RAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate 2`] = `""`; exports[`frodo config export "frodo config export -RAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate: exportAllTestDir7/global/agent/AgentService.agent.json 1`] = ` { @@ -397857,7 +397877,9 @@ exports[`frodo config export "frodo config export -RAsxD exportAllTestDir7 -m cl } `; -exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file 1`] = `""`; +exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file 1`] = `1`; + +exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file 2`] = `""`; exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file: exportAllTestDir4/all.config.json 1`] = ` { @@ -453899,7 +453921,9 @@ return identity } `; -exports[`frodo config export "frodo config export -adND exportAllTestDir6 -m classic": should export everything, including default scripts, to a single file 1`] = `""`; +exports[`frodo config export "frodo config export -adND exportAllTestDir6 -m classic": should export everything, including default scripts, to a single file 1`] = `0`; + +exports[`frodo config export "frodo config export -adND exportAllTestDir6 -m classic": should export everything, including default scripts, to a single file 2`] = `""`; exports[`frodo config export "frodo config export -adND exportAllTestDir6 -m classic": should export everything, including default scripts, to a single file: exportAllTestDir6/all.config.json 1`] = ` { @@ -487863,7 +487887,9 @@ return identity } `; -exports[`frodo config export "frodo config export -gAD exportAllTestDir9": should export all global config into separate files in the directory exportAllTestDir9 1`] = `""`; +exports[`frodo config export "frodo config export -gAD exportAllTestDir9": should export all global config into separate files in the directory exportAllTestDir9 1`] = `1`; + +exports[`frodo config export "frodo config export -gAD exportAllTestDir9": should export all global config into separate files in the directory exportAllTestDir9 2`] = `""`; exports[`frodo config export "frodo config export -gAD exportAllTestDir9": should export all global config into separate files in the directory exportAllTestDir9: exportAllTestDir9/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` { @@ -503440,7 +503466,9 @@ exports[`frodo config export "frodo config export -gAD exportAllTestDir9": shoul } `; -exports[`frodo config export "frodo config export -raf testExportAllAlpha.json": should export all alpha realm config to a single file named testExportAllAlpha.json. 1`] = `""`; +exports[`frodo config export "frodo config export -raf testExportAllAlpha.json": should export all alpha realm config to a single file named testExportAllAlpha.json. 1`] = `0`; + +exports[`frodo config export "frodo config export -raf testExportAllAlpha.json": should export all alpha realm config to a single file named testExportAllAlpha.json. 2`] = `""`; exports[`frodo config export "frodo config export -raf testExportAllAlpha.json": should export all alpha realm config to a single file named testExportAllAlpha.json.: testExportAllAlpha.json 1`] = ` { diff --git a/test/e2e/__snapshots__/config-import.e2e.test.js.snap b/test/e2e/__snapshots__/config-import.e2e.test.js.snap index a9407f826..4bded4bd5 100644 --- a/test/e2e/__snapshots__/config-import.e2e.test.js.snap +++ b/test/e2e/__snapshots__/config-import.e2e.test.js.snap @@ -2,24 +2,19 @@ exports[`frodo config import "frodo config import --default -CAD test/e2e/exports/all-separate/cloud" Import everything from directory "test/e2e/exports/all-separate/cloud", including default scripts. Clean old services 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error updating config entity endpoint/testEndpoint2 +Error updating config entity endpoint/testEndpoint2 HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +Error Importing Services Error importing services Error putting global full service configs Error putting global full service config CorsService @@ -36,17 +31,19 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: The singleton resource cannot be deleted - Error importing scripts - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. - Error updating script +Error updating script HTTP client error Code: ERR_BAD_RESPONSE Status: 502 +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -55,19 +52,21 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type - Error importing scripts - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config TNTPPingOneService @@ -90,24 +89,21 @@ No imports were made exports[`frodo config import "frodo config import -AD test/e2e/exports/all-separate/cloud --include-active-values" Import everything with secret values from directory "test/e2e/exports/all-separate/cloud" 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error updating config entity endpoint/testEndpoint2 +Error updating config entity endpoint/testEndpoint2 HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -116,23 +112,22 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -AD test/e2e/exports/all-separate/cloud" Import everything from directory "test/e2e/exports/all-separate/cloud" 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -141,18 +136,14 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -AdD test/e2e/exports/all-separate/classic -m classic" Import everything from directory "test/e2e/exports/all-separate/classic" 1`] = ` "Connected to http://openam-frodo-dev.classic.com:8080/am [/] as user amAdmin -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import +Error Importing Authentication Settings Error importing authentication settings Error updating authentication settings HTTP client error @@ -160,23 +151,24 @@ Errors occurred during full config import Status: 404 Reason: Not Found Message: Resource '' not found +- Resolving dependencies +✔ Resolved all dependencies. +- Resolving dependencies +✔ Resolved all dependencies. +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -CAD test/e2e/exports/all-separate/cloud" Import everything from directory "test/e2e/exports/all-separate/cloud". Clean old services 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +Error Importing Services Error importing services Error putting global full service configs Error putting global full service config CorsService @@ -193,6 +185,9 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: The singleton resource cannot be deleted +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -201,29 +196,26 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -aCf test/e2e/exports/all/all.cloud.json" Import everything from "all.cloud.json". Clean old services 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error updating config entity endpoint/testEndpoint2 +Error updating config entity endpoint/testEndpoint2 HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +Error Importing Services Error importing services Error putting global full service configs Error putting global full service config CorsService @@ -240,6 +232,9 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: The singleton resource cannot be deleted +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -248,18 +243,14 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -adf test/e2e/exports/all/all.classic.json -m classic" Import everything from "all.classic.json", including default scripts. 1`] = ` "Connected to http://openam-frodo-dev.classic.com:8080/am [/] as user amAdmin -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import +Error Importing Authentication Settings Error importing authentication settings Error updating authentication settings HTTP client error @@ -267,42 +258,44 @@ Errors occurred during full config import Status: 404 Reason: Not Found Message: Resource '' not found +- Resolving dependencies +✔ Resolved all dependencies. +- Resolving dependencies +✔ Resolved all dependencies. +- Resolving dependencies +✔ Resolved all dependencies. " `; exports[`frodo config import "frodo config import -adf test/e2e/exports/all/all.cloud.json" Import everything from "all.cloud.json", including default scripts. 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] -- Resolving dependencies -✔ Resolved all dependencies. -- Resolving dependencies -✔ Resolved all dependencies. -Errors occurred during full config import - Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error updating config entity endpoint/testEndpoint2 +Error updating config entity endpoint/testEndpoint2 HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error importing scripts - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. +- Resolving dependencies +✔ Resolved all dependencies. +Error Importing Services Error importing services Error putting realm full service configs Error putting realm full service config email @@ -311,19 +304,20 @@ Errors occurred during full config import Status: 400 Reason: Bad Request Message: Data validation failed for the attribute, Transport Type - Error importing scripts - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. - Error updating script +Error updating script HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: This operation is not available in PingOne Advanced Identity Cloud. +- Resolving dependencies +✔ Resolved all dependencies. " `; diff --git a/test/e2e/__snapshots__/email-template-export.e2e.test.js.snap b/test/e2e/__snapshots__/email-template-export.e2e.test.js.snap index 68262e0bc..2c3c7b85c 100644 --- a/test/e2e/__snapshots__/email-template-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/email-template-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo email template export "frodo email template export --all --file my-allEmailTemplates.template.email.json": should export all email templates to a single file named my-allEmailTemplates.template.email.json 1`] = `""`; +exports[`frodo email template export "frodo email template export --all --file my-allEmailTemplates.template.email.json": should export all email templates to a single file named my-allEmailTemplates.template.email.json 1`] = `0`; + +exports[`frodo email template export "frodo email template export --all --file my-allEmailTemplates.template.email.json": should export all email templates to a single file named my-allEmailTemplates.template.email.json 2`] = `""`; exports[`frodo email template export "frodo email template export --all --file my-allEmailTemplates.template.email.json": should export all email templates to a single file named my-allEmailTemplates.template.email.json: my-allEmailTemplates.template.email.json 1`] = ` { @@ -435,7 +437,9 @@ a { } `; -exports[`frodo email template export "frodo email template export --all-separate --no-metadata --directory emailTemplateExportTestDir3": should export all email templates to separate files in the directory emailTemplateExportTestDir3 1`] = `""`; +exports[`frodo email template export "frodo email template export --all-separate --no-metadata --directory emailTemplateExportTestDir3": should export all email templates to separate files in the directory emailTemplateExportTestDir3 1`] = `0`; + +exports[`frodo email template export "frodo email template export --all-separate --no-metadata --directory emailTemplateExportTestDir3": should export all email templates to separate files in the directory emailTemplateExportTestDir3 2`] = `""`; exports[`frodo email template export "frodo email template export --all-separate --no-metadata --directory emailTemplateExportTestDir3": should export all email templates to separate files in the directory emailTemplateExportTestDir3: emailTemplateExportTestDir3/baselineDemoEmailVerification.template.email.json 1`] = ` { @@ -981,7 +985,9 @@ exports[`frodo email template export "frodo email template export --all-separate } `; -exports[`frodo email template export "frodo email template export --template-id welcome": should export the email template with email id "welcome" 1`] = `""`; +exports[`frodo email template export "frodo email template export --template-id welcome": should export the email template with email id "welcome" 1`] = `0`; + +exports[`frodo email template export "frodo email template export --template-id welcome": should export the email template with email id "welcome" 2`] = `""`; exports[`frodo email template export "frodo email template export --template-id welcome": should export the email template with email id "welcome": welcome.template.email.json 1`] = ` { @@ -1008,7 +1014,9 @@ exports[`frodo email template export "frodo email template export --template-id } `; -exports[`frodo email template export "frodo email template export -A": should export all email templates to separate files 1`] = `""`; +exports[`frodo email template export "frodo email template export -A": should export all email templates to separate files 1`] = `0`; + +exports[`frodo email template export "frodo email template export -A": should export all email templates to separate files 2`] = `""`; exports[`frodo email template export "frodo email template export -A": should export all email templates to separate files: baselineDemoEmailVerification.template.email.json 1`] = ` { @@ -1571,7 +1579,9 @@ exports[`frodo email template export "frodo email template export -A": should ex } `; -exports[`frodo email template export "frodo email template export -NaD emailTemplateExportTestDir2": should export all email templates to a single file in the directory emailTemplateExportTestDir2 1`] = `""`; +exports[`frodo email template export "frodo email template export -NaD emailTemplateExportTestDir2": should export all email templates to a single file in the directory emailTemplateExportTestDir2 1`] = `0`; + +exports[`frodo email template export "frodo email template export -NaD emailTemplateExportTestDir2": should export all email templates to a single file in the directory emailTemplateExportTestDir2 2`] = `""`; exports[`frodo email template export "frodo email template export -NaD emailTemplateExportTestDir2": should export all email templates to a single file in the directory emailTemplateExportTestDir2: emailTemplateExportTestDir2/allEmailTemplates.template.email.json 1`] = ` { @@ -2005,7 +2015,9 @@ a { } `; -exports[`frodo email template export "frodo email template export -Ni welcome -D emailTemplateExportTestDir1": should export the email template with email id "welcome" into the directory emailTemplateExportTestDir1 1`] = `""`; +exports[`frodo email template export "frodo email template export -Ni welcome -D emailTemplateExportTestDir1": should export the email template with email id "welcome" into the directory emailTemplateExportTestDir1 1`] = `0`; + +exports[`frodo email template export "frodo email template export -Ni welcome -D emailTemplateExportTestDir1": should export the email template with email id "welcome" into the directory emailTemplateExportTestDir1 2`] = `""`; exports[`frodo email template export "frodo email template export -Ni welcome -D emailTemplateExportTestDir1": should export the email template with email id "welcome" into the directory emailTemplateExportTestDir1: emailTemplateExportTestDir1/welcome.template.email.json 1`] = ` { @@ -2049,7 +2061,9 @@ a{ } `; -exports[`frodo email template export "frodo email template export -a": should export all email templates to a single file 1`] = `""`; +exports[`frodo email template export "frodo email template export -a": should export all email templates to a single file 1`] = `0`; + +exports[`frodo email template export "frodo email template export -a": should export all email templates to a single file 2`] = `""`; exports[`frodo email template export "frodo email template export -a": should export all email templates to a single file: allEmailTemplates.template.email.json 1`] = ` { @@ -2484,7 +2498,9 @@ a { } `; -exports[`frodo email template export "frodo email template export -i welcome -f my-welcome.template.email.json": should export the email template with email id "welcome" into file named my-welcome.template.email.json 1`] = `""`; +exports[`frodo email template export "frodo email template export -i welcome -f my-welcome.template.email.json": should export the email template with email id "welcome" into file named my-welcome.template.email.json 1`] = `0`; + +exports[`frodo email template export "frodo email template export -i welcome -f my-welcome.template.email.json": should export the email template with email id "welcome" into file named my-welcome.template.email.json 2`] = `""`; exports[`frodo email template export "frodo email template export -i welcome -f my-welcome.template.email.json": should export the email template with email id "welcome" into file named my-welcome.template.email.json: my-welcome.template.email.json 1`] = ` { diff --git a/test/e2e/__snapshots__/esv-secret-describe.e2e.test.js.snap b/test/e2e/__snapshots__/esv-secret-describe.e2e.test.js.snap index 4fc8e3571..035c017f3 100644 --- a/test/e2e/__snapshots__/esv-secret-describe.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-secret-describe.e2e.test.js.snap @@ -116,6 +116,20 @@ Version│Status│Loaded│Created `; exports[`frodo esv secret describe "frodo esv secret describe -ui esv-test-secret-pi": should describe the esv secret "esv-test-secret-pi" with usage 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +- Reading secret versions... +✔ Successfully read 1 secret versions. +" +`; + +exports[`frodo esv secret describe "frodo esv secret describe -ui esv-test-secret-pi": should describe the esv secret "esv-test-secret-pi" with usage 2`] = ` "Name │esv-test-secret-pi Active Version │1 Loaded Version │1 diff --git a/test/e2e/__snapshots__/esv-secret-export.e2e.test.js.snap b/test/e2e/__snapshots__/esv-secret-export.e2e.test.js.snap index c29085ecc..0fbedb0f9 100644 --- a/test/e2e/__snapshots__/esv-secret-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-secret-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo esv secret export "frodo esv secret export --all": should export all secrets to a single file 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export --all": should export all secrets to a single file 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export --all": should export all secrets to a single file 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export --all": should export all secrets to a single file: allSecrets.secret.json 1`] = ` { @@ -153,7 +155,9 @@ exports[`frodo esv secret export "frodo esv secret export --all": should export } `; -exports[`frodo esv secret export "frodo esv secret export --all-separate --no-metadata --directory secretExportTestDir3": should export all secrets to separate files in the directory secretExportTestDir3 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export --all-separate --no-metadata --directory secretExportTestDir3": should export all secrets to separate files in the directory secretExportTestDir3 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export --all-separate --no-metadata --directory secretExportTestDir3": should export all secrets to separate files in the directory secretExportTestDir3 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export --all-separate --no-metadata --directory secretExportTestDir3": should export all secrets to separate files in the directory secretExportTestDir3: secretExportTestDir3/esv-admin-token.secret.json 1`] = ` { @@ -389,7 +393,9 @@ exports[`frodo esv secret export "frodo esv secret export --all-separate --no-me } `; -exports[`frodo esv secret export "frodo esv secret export --secret-id esv-test-secret": should export the secret with secret id "esv-test-secret" 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export --secret-id esv-test-secret": should export the secret with secret id "esv-test-secret" 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export --secret-id esv-test-secret": should export the secret with secret id "esv-test-secret" 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export --secret-id esv-test-secret": should export the secret with secret id "esv-test-secret": esv-test-secret.secret.json 1`] = ` { @@ -410,7 +416,9 @@ exports[`frodo esv secret export "frodo esv secret export --secret-id esv-test-s } `; -exports[`frodo esv secret export "frodo esv secret export -A": should export all secrets to separate files 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -A": should export all secrets to separate files 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -A": should export all secrets to separate files 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -A": should export all secrets to separate files: esv-admin-token.secret.json 1`] = ` { @@ -659,7 +667,9 @@ exports[`frodo esv secret export "frodo esv secret export -A": should export all } `; -exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir4 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir4 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir4 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir4 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir4 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir4 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir4 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir4: secretExportTestDir4/esv-admin-token.secret.json 1`] = ` { @@ -1103,7 +1113,9 @@ exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDi } `; -exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir5 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir5 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir5 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir5 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir5 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir5 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDir5 --include-active-values": should export all secrets including secret values to separate files in the directory secretExportTestDir5: secretExportTestDir5/esv-admin-token.secret.json 1`] = ` { @@ -1547,7 +1559,9 @@ exports[`frodo esv secret export "frodo esv secret export -AD secretExportTestDi } `; -exports[`frodo esv secret export "frodo esv secret export -NaD secretExportTestDir2": should export all secrets to a single file in the directory secretExportTestDir2 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -NaD secretExportTestDir2": should export all secrets to a single file in the directory secretExportTestDir2 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -NaD secretExportTestDir2": should export all secrets to a single file in the directory secretExportTestDir2 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -NaD secretExportTestDir2": should export all secrets to a single file in the directory secretExportTestDir2: secretExportTestDir2/allSecrets.secret.json 1`] = ` { @@ -1699,7 +1713,9 @@ exports[`frodo esv secret export "frodo esv secret export -NaD secretExportTestD } `; -exports[`frodo esv secret export "frodo esv secret export -Ni esv-test-secret -D secretExportTestDir1": should export the secret with secret id "esv-test-secret" into the directory named secretExportTestDir1 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -Ni esv-test-secret -D secretExportTestDir1": should export the secret with secret id "esv-test-secret" into the directory named secretExportTestDir1 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -Ni esv-test-secret -D secretExportTestDir1": should export the secret with secret id "esv-test-secret" into the directory named secretExportTestDir1 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -Ni esv-test-secret -D secretExportTestDir1": should export the secret with secret id "esv-test-secret" into the directory named secretExportTestDir1: secretExportTestDir1/esv-test-secret.secret.json 1`] = ` { @@ -1719,7 +1735,9 @@ exports[`frodo esv secret export "frodo esv secret export -Ni esv-test-secret -D } `; -exports[`frodo esv secret export "frodo esv secret export -a --file my-allSecrets.secret.json": should export all secrets to a single file named my-allSecrets.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -a --file my-allSecrets.secret.json": should export all secrets to a single file named my-allSecrets.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -a --file my-allSecrets.secret.json": should export all secrets to a single file named my-allSecrets.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -a --file my-allSecrets.secret.json": should export all secrets to a single file named my-allSecrets.secret.json: my-allSecrets.secret.json 1`] = ` { @@ -1872,7 +1890,9 @@ exports[`frodo esv secret export "frodo esv secret export -a --file my-allSecret } `; -exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values.secret.json: myAllSecrets_values.secret.json 1`] = ` { @@ -2220,7 +2240,9 @@ exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_val } `; -exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values-frodo-dev.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values-frodo-dev.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values-frodo-dev.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values-frodo-dev.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values-frodo-dev.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values-frodo-dev.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_values-frodo-dev.secret.json --include-active-values": should export all secrets including secret values to a single file named myAllSecrets_values-frodo-dev.secret.json: myAllSecrets_values-frodo-dev.secret.json 1`] = ` { @@ -2568,7 +2590,9 @@ exports[`frodo esv secret export "frodo esv secret export -a -f myAllSecrets_val } `; -exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret.secret.json": should export the secret with secret id "esv-test-secret" into file named my-esv-test-secret.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret.secret.json": should export the secret with secret id "esv-test-secret" into file named my-esv-test-secret.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret.secret.json": should export the secret with secret id "esv-test-secret" into file named my-esv-test-secret.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret.secret.json": should export the secret with secret id "esv-test-secret" into file named my-esv-test-secret.secret.json: my-esv-test-secret.secret.json 1`] = ` { @@ -2589,7 +2613,9 @@ exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f } `; -exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value.secret.json: my-esv-test-secret_value.secret.json 1`] = ` { @@ -2625,7 +2651,9 @@ exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f } `; -exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value-frodo-dev.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value-frodo-dev.secret.json 1`] = `""`; +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value-frodo-dev.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value-frodo-dev.secret.json 1`] = `0`; + +exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value-frodo-dev.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value-frodo-dev.secret.json 2`] = `""`; exports[`frodo esv secret export "frodo esv secret export -i esv-test-secret -f my-esv-test-secret_value-frodo-dev.secret.json --include-active-values": should export the secret with secret id "esv-test-secret" including secret value into file named my-esv-test-secret_value-frodo-dev.secret.json: my-esv-test-secret_value-frodo-dev.secret.json 1`] = ` { diff --git a/test/e2e/__snapshots__/esv-secret-list.e2e.test.js.snap b/test/e2e/__snapshots__/esv-secret-list.e2e.test.js.snap index 28189dd6b..089ddb169 100644 --- a/test/e2e/__snapshots__/esv-secret-list.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-secret-list.e2e.test.js.snap @@ -72,6 +72,20 @@ esv-test-secret-pi-generic │ 2│ 2│loaded│ `; exports[`frodo esv secret list "frodo esv secret list -lu": should list the ids, active/loaded versions, statuses, descriptions, modifiers, modified times, and usage of the esv secrets 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading secrets... +✔ Successfully read 13 secrets. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo esv secret list "frodo esv secret list -lu": should list the ids, active/loaded versions, statuses, descriptions, modifiers, modified times, and usage of the esv secrets 2`] = ` "Id │ Active│ Loaded│Status│Description │Modifier │Modified (UTC) │Used │Version│Version│ │ │ │ │ esv-admin-token │ 1│ 1│loaded│Long-lived admin token │ba58ff99-76d3-4c69-9c4a-7f150ac70e2c│Wed, 20 Mar 2024 14:46:13 GMT│no @@ -98,6 +112,20 @@ esv-volkers-test-secret │ 10│ 10│loaded│Volker's test `; exports[`frodo esv secret list "frodo esv secret list -u": should list the usage of the esv secrets 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading secrets... +✔ Successfully read 13 secrets. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo esv secret list "frodo esv secret list -u": should list the usage of the esv secrets 2`] = ` "Id │Used esv-admin-token │no esv-brando-pingone │no diff --git a/test/e2e/__snapshots__/esv-variable-describe.e2e.test.js.snap b/test/e2e/__snapshots__/esv-variable-describe.e2e.test.js.snap index 034a65d80..0ac8533d8 100644 --- a/test/e2e/__snapshots__/esv-variable-describe.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-variable-describe.e2e.test.js.snap @@ -70,6 +70,18 @@ Usage Locations (1 total)│realm.root-alpha.script.da7a96a8-7969-4dab-9c6e-a812 `; exports[`frodo esv variable describe "frodo esv variable describe -ui esv-test-var-pi": should describe the esv variable "esv-test-var-pi" with usage 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo esv variable describe "frodo esv variable describe -ui esv-test-var-pi": should describe the esv variable "esv-test-var-pi" with usage 2`] = ` "Name │esv-test-var-pi Value │3.1415926 Type │number diff --git a/test/e2e/__snapshots__/esv-variable-export.e2e.test.js.snap b/test/e2e/__snapshots__/esv-variable-export.e2e.test.js.snap index 21b0a6ddd..f4e8eff30 100644 --- a/test/e2e/__snapshots__/esv-variable-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-variable-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo esv variable export "frodo esv variable export --all": should export all variables to a single file 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export --all": should export all variables to a single file 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export --all": should export all variables to a single file 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export --all": should export all variables to a single file: allVariables.variable.json 1`] = ` { @@ -109,7 +111,9 @@ exports[`frodo esv variable export "frodo esv variable export --all": should exp } `; -exports[`frodo esv variable export "frodo esv variable export --all-separate --no-metadata --directory variableExportTestDir3 --no-decode": should export all variables to separate files in the directory variableExportTestDir3 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export --all-separate --no-metadata --directory variableExportTestDir3 --no-decode": should export all variables to separate files in the directory variableExportTestDir3 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export --all-separate --no-metadata --directory variableExportTestDir3 --no-decode": should export all variables to separate files in the directory variableExportTestDir3 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export --all-separate --no-metadata --directory variableExportTestDir3 --no-decode": should export all variables to separate files in the directory variableExportTestDir3: variableExportTestDir3/esv-blue-piller.variable.json 1`] = ` { @@ -287,7 +291,9 @@ exports[`frodo esv variable export "frodo esv variable export --all-separate --n } `; -exports[`frodo esv variable export "frodo esv variable export --variable-id esv-test-var": should export the variable with variable id "esv-test-var" 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export --variable-id esv-test-var": should export the variable with variable id "esv-test-var" 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export --variable-id esv-test-var": should export the variable with variable id "esv-test-var" 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export --variable-id esv-test-var": should export the variable with variable id "esv-test-var": esv-test-var.variable.json 1`] = ` { @@ -306,7 +312,9 @@ exports[`frodo esv variable export "frodo esv variable export --variable-id esv- } `; -exports[`frodo esv variable export "frodo esv variable export -A": should export all variables to separate files 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export -A": should export all variables to separate files 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export -A": should export all variables to separate files 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export -A": should export all variables to separate files: esv-blue-piller.variable.json 1`] = ` { @@ -495,7 +503,9 @@ exports[`frodo esv variable export "frodo esv variable export -A": should export } `; -exports[`frodo esv variable export "frodo esv variable export -NaD variableExportTestDir2": should export all variables to a single file in the directory variableExportTestDir2 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export -NaD variableExportTestDir2": should export all variables to a single file in the directory variableExportTestDir2 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export -NaD variableExportTestDir2": should export all variables to a single file in the directory variableExportTestDir2 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export -NaD variableExportTestDir2": should export all variables to a single file in the directory variableExportTestDir2: variableExportTestDir2/allVariables.variable.json 1`] = ` { @@ -603,7 +613,9 @@ exports[`frodo esv variable export "frodo esv variable export -NaD variableExpor } `; -exports[`frodo esv variable export "frodo esv variable export -Ni esv-test-var -D variableExportTestDir1": should export the variable with variable id "esv-test-var" into the directory named variableExportTestDir1 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export -Ni esv-test-var -D variableExportTestDir1": should export the variable with variable id "esv-test-var" into the directory named variableExportTestDir1 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export -Ni esv-test-var -D variableExportTestDir1": should export the variable with variable id "esv-test-var" into the directory named variableExportTestDir1 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export -Ni esv-test-var -D variableExportTestDir1": should export the variable with variable id "esv-test-var" into the directory named variableExportTestDir1: variableExportTestDir1/esv-test-var.variable.json 1`] = ` { @@ -621,7 +633,9 @@ exports[`frodo esv variable export "frodo esv variable export -Ni esv-test-var - } `; -exports[`frodo esv variable export "frodo esv variable export -a --file my-allVariables.variable.json --no-decode": should export all variables to a single file named my-allVariables.variable.json 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export -a --file my-allVariables.variable.json --no-decode": should export all variables to a single file named my-allVariables.variable.json 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export -a --file my-allVariables.variable.json --no-decode": should export all variables to a single file named my-allVariables.variable.json 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export -a --file my-allVariables.variable.json --no-decode": should export all variables to a single file named my-allVariables.variable.json: my-allVariables.variable.json 1`] = ` { @@ -730,7 +744,9 @@ exports[`frodo esv variable export "frodo esv variable export -a --file my-allVa } `; -exports[`frodo esv variable export "frodo esv variable export -i esv-test-var -f my-esv-test-var.variable.json --no-decode": should export the variable with variable id "esv-test-var" into file named my-esv-test-var.variable.json 1`] = `""`; +exports[`frodo esv variable export "frodo esv variable export -i esv-test-var -f my-esv-test-var.variable.json --no-decode": should export the variable with variable id "esv-test-var" into file named my-esv-test-var.variable.json 1`] = `0`; + +exports[`frodo esv variable export "frodo esv variable export -i esv-test-var -f my-esv-test-var.variable.json --no-decode": should export the variable with variable id "esv-test-var" into file named my-esv-test-var.variable.json 2`] = `""`; exports[`frodo esv variable export "frodo esv variable export -i esv-test-var -f my-esv-test-var.variable.json --no-decode": should export the variable with variable id "esv-test-var" into file named my-esv-test-var.variable.json: my-esv-test-var.variable.json 1`] = ` { diff --git a/test/e2e/__snapshots__/esv-variable-list.e2e.test.js.snap b/test/e2e/__snapshots__/esv-variable-list.e2e.test.js.snap index 857c1f441..d913cf50e 100644 --- a/test/e2e/__snapshots__/esv-variable-list.e2e.test.js.snap +++ b/test/e2e/__snapshots__/esv-variable-list.e2e.test.js.snap @@ -59,6 +59,20 @@ esv-test-variable-light │299792458 `; exports[`frodo esv variable list "frodo esv variable list -lu": should list the ids, values, statuses, descriptions, modifiers, usage, and modified times of the esv variables 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading variables... +✔ Successfully read 12 variables. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo esv variable list "frodo esv variable list -lu": should list the ids, values, statuses, descriptions, modifiers, usage, and modified times of the esv variables 2`] = ` "Id │Value │Status│Description │Modifier │Modified (UTC) │Used esv-blue-piller │false │loaded│Zion membership criteria. │Frodo-SA-1701393386423 │Fri, 05 Jul 2024 20:01:11 GMT│no esv-ipv4-cidr-access-rules │{ "allow": [ "145.118.0.0/16", │loaded│IPv4 CIDR access rules: { "allow": [ │Frodo-SA-1701393386423 │Fri, 05 Jul 2024 20:01:13 GMT│no @@ -83,6 +97,20 @@ esv-trinity-phone │(312)-555-0690 │l `; exports[`frodo esv variable list "frodo esv variable list -u": should list the usage of the esv variables 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading variables... +✔ Successfully read 12 variables. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo esv variable list "frodo esv variable list -u": should list the usage of the esv variables 2`] = ` "Id │Used esv-blue-piller │no esv-ipv4-cidr-access-rules │no diff --git a/test/e2e/__snapshots__/idm-export.e2e.test.js.snap b/test/e2e/__snapshots__/idm-export.e2e.test.js.snap index bf8ed88bf..6c37ae75d 100644 --- a/test/e2e/__snapshots__/idm-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/idm-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo idm export "frodo idm export --all --file allIdmTestFile.json -E test/e2e/env/testEntitiesFile.json -e test/e2e/env/testEnvFile.env --no-metadata": should export all idm config entities to a single file named allIdmTestFile.json 1`] = `""`; +exports[`frodo idm export "frodo idm export --all --file allIdmTestFile.json -E test/e2e/env/testEntitiesFile.json -e test/e2e/env/testEnvFile.env --no-metadata": should export all idm config entities to a single file named allIdmTestFile.json 1`] = `0`; + +exports[`frodo idm export "frodo idm export --all --file allIdmTestFile.json -E test/e2e/env/testEntitiesFile.json -e test/e2e/env/testEnvFile.env --no-metadata": should export all idm config entities to a single file named allIdmTestFile.json 2`] = `""`; exports[`frodo idm export "frodo idm export --all --file allIdmTestFile.json -E test/e2e/env/testEntitiesFile.json -e test/e2e/env/testEnvFile.env --no-metadata": should export all idm config entities to a single file named allIdmTestFile.json: allIdmTestFile.json 1`] = ` { @@ -2704,7 +2706,9 @@ isGoogleEligible; } `; -exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-mappings --directory testDir3 --entities-file test/e2e/env/testEntitiesFile.json --env-file test/e2e/env/testEnvFile.env": should export all idm config entities to separate files in the "testDir" directory according to the entity and env files 1`] = `""`; +exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-mappings --directory testDir3 --entities-file test/e2e/env/testEntitiesFile.json --env-file test/e2e/env/testEnvFile.env": should export all idm config entities to separate files in the "testDir" directory according to the entity and env files 1`] = `0`; + +exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-mappings --directory testDir3 --entities-file test/e2e/env/testEntitiesFile.json --env-file test/e2e/env/testEnvFile.env": should export all idm config entities to separate files in the "testDir" directory according to the entity and env files 2`] = `""`; exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-mappings --directory testDir3 --entities-file test/e2e/env/testEntitiesFile.json --env-file test/e2e/env/testEnvFile.env": should export all idm config entities to separate files in the "testDir" directory according to the entity and env files: testDir3/repo.ds.idm.json 1`] = ` { @@ -5442,7 +5446,9 @@ exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separ } `; -exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-objects --directory testDir5": should export all idm config entities to separate files in the "testDir5" directory 1`] = `""`; +exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-objects --directory testDir5": should export all idm config entities to separate files in the "testDir5" directory 1`] = `1`; + +exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-objects --directory testDir5": should export all idm config entities to separate files in the "testDir5" directory 2`] = `""`; exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separate-objects --directory testDir5": should export all idm config entities to separate files in the "testDir5" directory: testDir5/access.idm.json 1`] = ` { @@ -21547,7 +21553,9 @@ exports[`frodo idm export "frodo idm export --all-separate --no-metadata --separ } `; -exports[`frodo idm export "frodo idm export --entity-id script": should export the idm config entity with idm id "script" 1`] = `""`; +exports[`frodo idm export "frodo idm export --entity-id script": should export the idm config entity with idm id "script" 1`] = `0`; + +exports[`frodo idm export "frodo idm export --entity-id script": should export the idm config entity with idm id "script" 2`] = `""`; exports[`frodo idm export "frodo idm export --entity-id script": should export the idm config entity with idm id "script": script.idm.json 1`] = ` { @@ -21596,7 +21604,9 @@ exports[`frodo idm export "frodo idm export --entity-id script": should export t } `; -exports[`frodo idm export "frodo idm export -AD testDir1": should export all idm config entities to separate files in the "testDir" directory 1`] = `""`; +exports[`frodo idm export "frodo idm export -AD testDir1": should export all idm config entities to separate files in the "testDir" directory 1`] = `1`; + +exports[`frodo idm export "frodo idm export -AD testDir1": should export all idm config entities to separate files in the "testDir" directory 2`] = `""`; exports[`frodo idm export "frodo idm export -AD testDir1": should export all idm config entities to separate files in the "testDir" directory: testDir1/access.idm.json 1`] = ` { @@ -38177,7 +38187,9 @@ exports[`frodo idm export "frodo idm export -AD testDir1": should export all idm } `; -exports[`frodo idm export "frodo idm export -Ni sync": should export the idm config entity with idm id "sync" separately 1`] = `""`; +exports[`frodo idm export "frodo idm export -Ni sync": should export the idm config entity with idm id "sync" separately 1`] = `0`; + +exports[`frodo idm export "frodo idm export -Ni sync": should export the idm config entity with idm id "sync" separately 2`] = `""`; exports[`frodo idm export "frodo idm export -Ni sync": should export the idm config entity with idm id "sync" separately: sync.idm.json 1`] = ` { @@ -38717,7 +38729,9 @@ isGoogleEligible; } `; -exports[`frodo idm export "frodo idm export -a": should export all idm config entities to a single file 1`] = `""`; +exports[`frodo idm export "frodo idm export -a": should export all idm config entities to a single file 1`] = `1`; + +exports[`frodo idm export "frodo idm export -a": should export all idm config entities to a single file 2`] = `""`; exports[`frodo idm export "frodo idm export -a": should export all idm config entities to a single file: all.idm.json 1`] = ` { @@ -54778,7 +54792,9 @@ isGoogleEligible; } `; -exports[`frodo idm export "frodo idm export -i script -D testDir4": should export the idm config entity with idm id "script" into the directory testDir4 1`] = `""`; +exports[`frodo idm export "frodo idm export -i script -D testDir4": should export the idm config entity with idm id "script" into the directory testDir4 1`] = `0`; + +exports[`frodo idm export "frodo idm export -i script -D testDir4": should export the idm config entity with idm id "script" into the directory testDir4 2`] = `""`; exports[`frodo idm export "frodo idm export -i script -D testDir4": should export the idm config entity with idm id "script" into the directory testDir4: testDir4/script.idm.json 1`] = ` { @@ -54827,7 +54843,9 @@ exports[`frodo idm export "frodo idm export -i script -D testDir4": should expor } `; -exports[`frodo idm export "frodo idm export -i script -e test/e2e/env/testEnvFile.env -f my-script.idm.json": should export the idm config entity with idm id "script" into file named my-script.idm.json 1`] = `""`; +exports[`frodo idm export "frodo idm export -i script -e test/e2e/env/testEnvFile.env -f my-script.idm.json": should export the idm config entity with idm id "script" into file named my-script.idm.json 1`] = `0`; + +exports[`frodo idm export "frodo idm export -i script -e test/e2e/env/testEnvFile.env -f my-script.idm.json": should export the idm config entity with idm id "script" into file named my-script.idm.json 2`] = `""`; exports[`frodo idm export "frodo idm export -i script -e test/e2e/env/testEnvFile.env -f my-script.idm.json": should export the idm config entity with idm id "script" into file named my-script.idm.json: my-script.idm.json 1`] = ` { @@ -54876,7 +54894,9 @@ exports[`frodo idm export "frodo idm export -i script -e test/e2e/env/testEnvFil } `; -exports[`frodo idm export "frodo idm export -si sync": should export the idm config entity with idm id "sync" separately 1`] = `""`; +exports[`frodo idm export "frodo idm export -si sync": should export the idm config entity with idm id "sync" separately 1`] = `0`; + +exports[`frodo idm export "frodo idm export -si sync": should export the idm config entity with idm id "sync" separately 2`] = `""`; exports[`frodo idm export "frodo idm export -si sync": should export the idm config entity with idm id "sync" separately: sync/AlphaUser2GoogleApps.sync.json 1`] = ` { diff --git a/test/e2e/__snapshots__/idm-import.e2e.test.js.snap b/test/e2e/__snapshots__/idm-import.e2e.test.js.snap index f4dcf10ce..eb0e392d5 100644 --- a/test/e2e/__snapshots__/idm-import.e2e.test.js.snap +++ b/test/e2e/__snapshots__/idm-import.e2e.test.js.snap @@ -3,14 +3,13 @@ exports[`frodo idm import "frodo idm import --all --file all.idm.json -D test/e2e/exports/all": Should import all configs from the file 'all.idm.json' in directory 'test/e2e/exports/all'" 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] - Importing config entities from test/e2e/exports/all/all.idm.json... -✖ Error importing config entities from test/e2e/exports/all/all.idm.json. -Error importing config entities - Error updating config entity bravoOrgPrivileges +Error updating config entity bravoOrgPrivileges HTTP client error Code: ERR_BAD_REQUEST Status: 403 Reason: Forbidden Message: Access denied +✔ Imported config entities " `; @@ -21,20 +20,19 @@ exports[`frodo idm import "frodo idm import --entity-id script --file test/e2e/e exports[`frodo idm import "frodo idm import -AD test/e2e/exports/all-separate/cloud/global/idm": Should import all configs from the directory 'test/e2e/exports/all-separate/cloud/global/idm'" 1`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] - Importing config entities from test/e2e/exports/all-separate/cloud/global/idm... -✖ Error importing config entities from test/e2e/exports/all-separate/cloud/global/idm. -Error importing config entities - Error updating config entity endpoint/Test +Error updating config entity endpoint/Test HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied - Error updating config entity endpoint/testEndpoint2 +Error updating config entity endpoint/testEndpoint2 HTTP client error Code: ERR_BAD_REQUEST Status: 401 Reason: Unauthorized Message: Access Denied +✔ Imported config entities " `; diff --git a/test/e2e/__snapshots__/idm-schema-object-export.e2e.test.js.snap b/test/e2e/__snapshots__/idm-schema-object-export.e2e.test.js.snap index 895a60294..18cfeb8d5 100644 --- a/test/e2e/__snapshots__/idm-schema-object-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/idm-schema-object-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo idm schema object export "frodo idm schema object export -A -D testDir3": should export all managed objects into separate files in the directory "testDir3" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -A -D testDir3": should export all managed objects into separate files in the directory "testDir3" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -A -D testDir3": should export all managed objects into separate files in the directory "testDir3" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -A -D testDir3": should export all managed objects into separate files in the directory "testDir3": testDir3/managed/managed.idm.json 1`] = ` { @@ -27,7 +29,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -A -D te } `; -exports[`frodo idm schema object export "frodo idm schema object export -A": should export all managed objects into separate files in the default directory "managed" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -A": should export all managed objects into separate files in the default directory "managed" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -A": should export all managed objects into separate files in the default directory "managed" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -A": should export all managed objects into separate files in the default directory "managed": managed/managed.idm.json 1`] = ` { @@ -54,7 +58,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -A": sho } `; -exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir1": should export all managed objects into a single file in testDir1 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir1": should export all managed objects into a single file in testDir1 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir1": should export all managed objects into a single file in testDir1 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir1": should export all managed objects into a single file in testDir1: testDir1/managed.idm.json 1`] = ` { @@ -5729,7 +5735,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -a -D te } `; -exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir2 -f test.file.json": should export all managed objects into a single file named test.file.json in testDir2 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir2 -f test.file.json": should export all managed objects into a single file named test.file.json in testDir2 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir2 -f test.file.json": should export all managed objects into a single file named test.file.json in testDir2 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -a -D testDir2 -f test.file.json": should export all managed objects into a single file named test.file.json in testDir2: testDir2/test.file.json 1`] = ` { @@ -11404,7 +11412,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -a -D te } `; -exports[`frodo idm schema object export "frodo idm schema object export -a -f test.file.json": should export all managed objects into a single file named test.file.json 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -a -f test.file.json": should export all managed objects into a single file named test.file.json 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -a -f test.file.json": should export all managed objects into a single file named test.file.json 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -a -f test.file.json": should export all managed objects into a single file named test.file.json: test.file.json 1`] = ` { @@ -17079,7 +17089,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -a -f te } `; -exports[`frodo idm schema object export "frodo idm schema object export -a": should export all managed objects into a single file 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -a": should export all managed objects into a single file 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -a": should export all managed objects into a single file 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -a": should export all managed objects into a single file: managed.idm.json 1`] = ` { @@ -22762,7 +22774,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -a": sho } `; -exports[`frodo idm schema object export "frodo idm schema object export -i alpha_group -D testDir5": should export the alpha_group managed object into a file named "alpha_group.managed.json" in the directory "testDir5" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_group -D testDir5": should export the alpha_group managed object into a file named "alpha_group.managed.json" in the directory "testDir5" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_group -D testDir5": should export the alpha_group managed object into a file named "alpha_group.managed.json" in the directory "testDir5" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -i alpha_group -D testDir5": should export the alpha_group managed object into a file named "alpha_group.managed.json" in the directory "testDir5": testDir5/alpha_group.managed.json 1`] = ` { @@ -22904,7 +22918,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -i alpha } `; -exports[`frodo idm schema object export "frodo idm schema object export -i alpha_role -f test2.file.json -D testDir4": should export the alpha_role managed object into a file named "test2.file.json" in the directory "testDir4" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_role -f test2.file.json -D testDir4": should export the alpha_role managed object into a file named "test2.file.json" in the directory "testDir4" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_role -f test2.file.json -D testDir4": should export the alpha_role managed object into a file named "test2.file.json" in the directory "testDir4" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -i alpha_role -f test2.file.json -D testDir4": should export the alpha_role managed object into a file named "test2.file.json" in the directory "testDir4": testDir4/test2.file.json 1`] = ` { @@ -23148,7 +23164,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -i alpha } `; -exports[`frodo idm schema object export "frodo idm schema object export -i alpha_user": should export the alpha_user managed object into a file named "alpha_user.managed.json" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_user": should export the alpha_user managed object into a file named "alpha_user.managed.json" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -i alpha_user": should export the alpha_user managed object into a file named "alpha_user.managed.json" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -i alpha_user": should export the alpha_user managed object into a file named "alpha_user.managed.json": alpha_user.managed.json 1`] = ` { @@ -24676,7 +24694,9 @@ exports[`frodo idm schema object export "frodo idm schema object export -i alpha } `; -exports[`frodo idm schema object export "frodo idm schema object export -i bravo_assignment -f test2.file.json": should export the bravo_assignment managed object into a file named "test2.file.json" 1`] = `""`; +exports[`frodo idm schema object export "frodo idm schema object export -i bravo_assignment -f test2.file.json": should export the bravo_assignment managed object into a file named "test2.file.json" 1`] = `0`; + +exports[`frodo idm schema object export "frodo idm schema object export -i bravo_assignment -f test2.file.json": should export the bravo_assignment managed object into a file named "test2.file.json" 2`] = `""`; exports[`frodo idm schema object export "frodo idm schema object export -i bravo_assignment -f test2.file.json": should export the bravo_assignment managed object into a file named "test2.file.json": test2.file.json 1`] = ` { diff --git a/test/e2e/__snapshots__/idp-export.e2e.test.js.snap b/test/e2e/__snapshots__/idp-export.e2e.test.js.snap index f5ab75356..dcb25d914 100644 --- a/test/e2e/__snapshots__/idp-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/idp-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo idp export "frodo idp export --all": should export all idp providers to a single file 1`] = `""`; +exports[`frodo idp export "frodo idp export --all": should export all idp providers to a single file 1`] = `0`; + +exports[`frodo idp export "frodo idp export --all": should export all idp providers to a single file 2`] = `""`; exports[`frodo idp export "frodo idp export --all": should export all idp providers to a single file: allAlphaProviders.idp.json 1`] = ` { @@ -747,7 +749,9 @@ exports[`frodo idp export "frodo idp export --all": should export all idp provid } `; -exports[`frodo idp export "frodo idp export --all-separate --no-metadata --directory idpExportTestDir3": should export all idp providers to separate files in the directory idpExportTestDir3 1`] = `""`; +exports[`frodo idp export "frodo idp export --all-separate --no-metadata --directory idpExportTestDir3": should export all idp providers to separate files in the directory idpExportTestDir3 1`] = `0`; + +exports[`frodo idp export "frodo idp export --all-separate --no-metadata --directory idpExportTestDir3": should export all idp providers to separate files in the directory idpExportTestDir3 2`] = `""`; exports[`frodo idp export "frodo idp export --all-separate --no-metadata --directory idpExportTestDir3": should export all idp providers to separate files in the directory idpExportTestDir3: idpExportTestDir3/adfs.idp.json 1`] = ` { @@ -1091,7 +1095,9 @@ exports[`frodo idp export "frodo idp export --all-separate --no-metadata --direc } `; -exports[`frodo idp export "frodo idp export --idp-id google": should export the idp provider with idp id "google" 1`] = `""`; +exports[`frodo idp export "frodo idp export --idp-id google": should export the idp provider with idp id "google" 1`] = `0`; + +exports[`frodo idp export "frodo idp export --idp-id google": should export the idp provider with idp id "google" 2`] = `""`; exports[`frodo idp export "frodo idp export --idp-id google": should export the idp provider with idp id "google": google.idp.json 1`] = ` { @@ -1189,7 +1195,9 @@ exports[`frodo idp export "frodo idp export --idp-id google": should export the } `; -exports[`frodo idp export "frodo idp export -A": should export all idp providers to separate files 1`] = `""`; +exports[`frodo idp export "frodo idp export -A": should export all idp providers to separate files 1`] = `0`; + +exports[`frodo idp export "frodo idp export -A": should export all idp providers to separate files 2`] = `""`; exports[`frodo idp export "frodo idp export -A": should export all idp providers to separate files: adfs.idp.json 1`] = ` { @@ -2069,7 +2077,9 @@ exports[`frodo idp export "frodo idp export -A": should export all idp providers } `; -exports[`frodo idp export "frodo idp export -NaD idpExportTestDir2": should export all idp providers to a single file in the directory idpExportTestDir2 1`] = `""`; +exports[`frodo idp export "frodo idp export -NaD idpExportTestDir2": should export all idp providers to a single file in the directory idpExportTestDir2 1`] = `0`; + +exports[`frodo idp export "frodo idp export -NaD idpExportTestDir2": should export all idp providers to a single file in the directory idpExportTestDir2 2`] = `""`; exports[`frodo idp export "frodo idp export -NaD idpExportTestDir2": should export all idp providers to a single file in the directory idpExportTestDir2: idpExportTestDir2/allAlphaProviders.idp.json 1`] = ` { @@ -2395,7 +2405,9 @@ exports[`frodo idp export "frodo idp export -NaD idpExportTestDir2": should expo } `; -exports[`frodo idp export "frodo idp export -Ni google -D idpExportTestDir1": should export the idp provider with idp id "google" into the directory idpExportTestDir1 1`] = `""`; +exports[`frodo idp export "frodo idp export -Ni google -D idpExportTestDir1": should export the idp provider with idp id "google" into the directory idpExportTestDir1 1`] = `0`; + +exports[`frodo idp export "frodo idp export -Ni google -D idpExportTestDir1": should export the idp provider with idp id "google" into the directory idpExportTestDir1 2`] = `""`; exports[`frodo idp export "frodo idp export -Ni google -D idpExportTestDir1": should export the idp provider with idp id "google" into the directory idpExportTestDir1: idpExportTestDir1/google.idp.json 1`] = ` { @@ -2492,7 +2504,9 @@ exports[`frodo idp export "frodo idp export -Ni google -D idpExportTestDir1": sh } `; -exports[`frodo idp export "frodo idp export -a --file my-allAlphaProviders.idp.json": should export all idp providers to a single file named my-allAlphaProviders.idp.json 1`] = `""`; +exports[`frodo idp export "frodo idp export -a --file my-allAlphaProviders.idp.json": should export all idp providers to a single file named my-allAlphaProviders.idp.json 1`] = `0`; + +exports[`frodo idp export "frodo idp export -a --file my-allAlphaProviders.idp.json": should export all idp providers to a single file named my-allAlphaProviders.idp.json 2`] = `""`; exports[`frodo idp export "frodo idp export -a --file my-allAlphaProviders.idp.json": should export all idp providers to a single file named my-allAlphaProviders.idp.json: my-allAlphaProviders.idp.json 1`] = ` { @@ -3239,7 +3253,9 @@ exports[`frodo idp export "frodo idp export -a --file my-allAlphaProviders.idp.j } `; -exports[`frodo idp export "frodo idp export -i google -f my-google.idp.json": should export the idp provider with idp id "google" into file named my-google.idp.json 1`] = `""`; +exports[`frodo idp export "frodo idp export -i google -f my-google.idp.json": should export the idp provider with idp id "google" into file named my-google.idp.json 1`] = `0`; + +exports[`frodo idp export "frodo idp export -i google -f my-google.idp.json": should export the idp provider with idp id "google" into file named my-google.idp.json 2`] = `""`; exports[`frodo idp export "frodo idp export -i google -f my-google.idp.json": should export the idp provider with idp id "google" into file named my-google.idp.json: my-google.idp.json 1`] = ` { diff --git a/test/e2e/__snapshots__/journey-export.e2e.test.js.snap b/test/e2e/__snapshots__/journey-export.e2e.test.js.snap index a1ee7530f..db706284f 100644 --- a/test/e2e/__snapshots__/journey-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/journey-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json 1`] = `""`; +exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json 1`] = `0`; + +exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json 2`] = `""`; exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json: my-allAlphaJourneys.journey.json 1`] = ` { @@ -3250,7 +3252,9 @@ exports[`frodo journey export "frodo journey export --all --file my-allAlphaJour } `; -exports[`frodo journey export "frodo journey export --all-separate --no-deps --no-coords --use-string-arrays": should export all journeys to separate files with no dependencies, no coordinates, and using string arrays 1`] = `""`; +exports[`frodo journey export "frodo journey export --all-separate --no-deps --no-coords --use-string-arrays": should export all journeys to separate files with no dependencies, no coordinates, and using string arrays 1`] = `0`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --no-coords --use-string-arrays": should export all journeys to separate files with no dependencies, no coordinates, and using string arrays 2`] = `""`; exports[`frodo journey export "frodo journey export --all-separate --no-deps --no-coords --use-string-arrays": should export all journeys to separate files with no dependencies, no coordinates, and using string arrays: ForgottenUsername.journey.json 1`] = ` { @@ -5694,7 +5698,9 @@ exports[`frodo journey export "frodo journey export --all-separate --no-deps --n } `; -exports[`frodo journey export "frodo journey export --journey-id j02 --no-metadata --no-deps --no-coords --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies or coordinates, and should use string arrays. 1`] = `""`; +exports[`frodo journey export "frodo journey export --journey-id j02 --no-metadata --no-deps --no-coords --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies or coordinates, and should use string arrays. 1`] = `0`; + +exports[`frodo journey export "frodo journey export --journey-id j02 --no-metadata --no-deps --no-coords --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies or coordinates, and should use string arrays. 2`] = `""`; exports[`frodo journey export "frodo journey export --journey-id j02 --no-metadata --no-deps --no-coords --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies or coordinates, and should use string arrays.: journeyTestDirectory1/j02.journey.json 1`] = ` { @@ -5931,9 +5937,11 @@ exports[`frodo journey export "frodo journey export --journey-id j02 --no-metada } `; -exports[`frodo journey export "frodo journey export --verbose -i FrodoTest": should export the journey with journey id "FrodoTest" 1`] = `""`; +exports[`frodo journey export "frodo journey export --verbose -i FrodoTest": should export the journey with journey id "FrodoTest" 1`] = `0`; -exports[`frodo journey export "frodo journey export --verbose -i FrodoTest": should export the journey with journey id "FrodoTest" 2`] = ` +exports[`frodo journey export "frodo journey export --verbose -i FrodoTest": should export the journey with journey id "FrodoTest" 2`] = `""`; + +exports[`frodo journey export "frodo journey export --verbose -i FrodoTest": should export the journey with journey id "FrodoTest" 3`] = ` "Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1701807230743 [b672336b-41ef-428d-ae4a-e0c082875377] Exporting journey... - FrodoTest @@ -7105,7 +7113,9 @@ a{ } `; -exports[`frodo journey export "frodo journey export -NAD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3" 1`] = `""`; +exports[`frodo journey export "frodo journey export -NAD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3" 1`] = `0`; + +exports[`frodo journey export "frodo journey export -NAD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3" 2`] = `""`; exports[`frodo journey export "frodo journey export -NAD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/ForgottenUsername.journey.json 1`] = ` { @@ -10868,7 +10878,9 @@ exports[`frodo journey export "frodo journey export -NAD journeyTestDirectory3": } `; -exports[`frodo journey export "frodo journey export -Na --no-deps --no-coords --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies, no coordinates, and only string arrays in the export. 1`] = `""`; +exports[`frodo journey export "frodo journey export -Na --no-deps --no-coords --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies, no coordinates, and only string arrays in the export. 1`] = `0`; + +exports[`frodo journey export "frodo journey export -Na --no-deps --no-coords --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies, no coordinates, and only string arrays in the export. 2`] = `""`; exports[`frodo journey export "frodo journey export -Na --no-deps --no-coords --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies, no coordinates, and only string arrays in the export.: journeyTestDirectory2/allAlphaJourneys.journey.json 1`] = ` { @@ -13279,7 +13291,9 @@ exports[`frodo journey export "frodo journey export -Na --no-deps --no-coords -- } `; -exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file 1`] = `""`; +exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file 1`] = `0`; + +exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file 2`] = `""`; exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file: allAlphaJourneys.journey.json 1`] = ` { @@ -16529,7 +16543,9 @@ exports[`frodo journey export "frodo journey export -a": should export all journ } `; -exports[`frodo journey export "frodo journey export -i FrodoTest": should export the journey with journey id "FrodoTest" 1`] = `""`; +exports[`frodo journey export "frodo journey export -i FrodoTest": should export the journey with journey id "FrodoTest" 1`] = `0`; + +exports[`frodo journey export "frodo journey export -i FrodoTest": should export the journey with journey id "FrodoTest" 2`] = `""`; exports[`frodo journey export "frodo journey export -i FrodoTest": should export the journey with journey id "FrodoTest": FrodoTest.journey.json 1`] = ` { @@ -17816,7 +17832,9 @@ a{ } `; -exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json 1`] = `""`; +exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json 1`] = `0`; + +exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json 2`] = `""`; exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json: my-j01.json 1`] = ` { diff --git a/test/e2e/__snapshots__/mapping-export.e2e.test.js.snap b/test/e2e/__snapshots__/mapping-export.e2e.test.js.snap index 4c666952c..b1f9e1b99 100644 --- a/test/e2e/__snapshots__/mapping-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/mapping-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo mapping export "frodo mapping export --all": should export all mappings to a single file 1`] = `""`; +exports[`frodo mapping export "frodo mapping export --all": should export all mappings to a single file 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export --all": should export all mappings to a single file 2`] = `""`; exports[`frodo mapping export "frodo mapping export --all": should export all mappings to a single file: allMappings.mapping.json 1`] = ` { @@ -669,7 +671,9 @@ isGoogleEligible; } `; -exports[`frodo mapping export "frodo mapping export --mapping-id sync/managedAlpha_user_managedBravo_user": should export the mapping with mapping id "sync/managedAlpha_user_managedBravo_user" 1`] = `""`; +exports[`frodo mapping export "frodo mapping export --mapping-id sync/managedAlpha_user_managedBravo_user": should export the mapping with mapping id "sync/managedAlpha_user_managedBravo_user" 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export --mapping-id sync/managedAlpha_user_managedBravo_user": should export the mapping with mapping id "sync/managedAlpha_user_managedBravo_user" 2`] = `""`; exports[`frodo mapping export "frodo mapping export --mapping-id sync/managedAlpha_user_managedBravo_user": should export the mapping with mapping id "sync/managedAlpha_user_managedBravo_user": managedAlpha_user_managedBravo_user.sync.json 1`] = ` { @@ -769,7 +773,9 @@ exports[`frodo mapping export "frodo mapping export --mapping-id sync/managedAlp } `; -exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays --connector-id GoogleApps --managed-object-type alpha_user --all-separate --no-metadata --directory mappingExportTestDir3": should export all mappings to separate files in the directory mappingExportTestDir3 1`] = `""`; +exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays --connector-id GoogleApps --managed-object-type alpha_user --all-separate --no-metadata --directory mappingExportTestDir3": should export all mappings to separate files in the directory mappingExportTestDir3 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays --connector-id GoogleApps --managed-object-type alpha_user --all-separate --no-metadata --directory mappingExportTestDir3": should export all mappings to separate files in the directory mappingExportTestDir3 2`] = `""`; exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays --connector-id GoogleApps --managed-object-type alpha_user --all-separate --no-metadata --directory mappingExportTestDir3": should export all mappings to separate files in the directory mappingExportTestDir3: mappingExportTestDir3/sync/AlphaUser2GoogleApps.sync.json 1`] = ` { @@ -1015,7 +1021,9 @@ exports[`frodo mapping export "frodo mapping export --no-deps --use-string-array } `; -exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays -c GoogleApps -t alpha_user -NaD mappingExportTestDir2": should export all mappings to a single file in the directory mappingExportTestDir2 1`] = `""`; +exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays -c GoogleApps -t alpha_user -NaD mappingExportTestDir2": should export all mappings to a single file in the directory mappingExportTestDir2 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays -c GoogleApps -t alpha_user -NaD mappingExportTestDir2": should export all mappings to a single file in the directory mappingExportTestDir2 2`] = `""`; exports[`frodo mapping export "frodo mapping export --no-deps --use-string-arrays -c GoogleApps -t alpha_user -NaD mappingExportTestDir2": should export all mappings to a single file in the directory mappingExportTestDir2: mappingExportTestDir2/allMappings.mapping.json 1`] = ` { @@ -1256,7 +1264,9 @@ isGoogleEligible; } `; -exports[`frodo mapping export "frodo mapping export -AD mappingExportTestDir4": should export all mappings to separate files in the mappingExportTestDir4 directory 1`] = `""`; +exports[`frodo mapping export "frodo mapping export -AD mappingExportTestDir4": should export all mappings to separate files in the mappingExportTestDir4 directory 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export -AD mappingExportTestDir4": should export all mappings to separate files in the mappingExportTestDir4 directory 2`] = `""`; exports[`frodo mapping export "frodo mapping export -AD mappingExportTestDir4": should export all mappings to separate files in the mappingExportTestDir4 directory: mappingExportTestDir4/mapping/managedBravo_group_managedBravo_group.mapping.json 1`] = ` { @@ -1961,7 +1971,9 @@ exports[`frodo mapping export "frodo mapping export -AD mappingExportTestDir4": } `; -exports[`frodo mapping export "frodo mapping export -Ni mapping/managedBravo_group_managedBravo_group --no-deps --use-string-arrays -D mappingExportTestDir1": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into the directory named mappingExportTestDir1 1`] = `""`; +exports[`frodo mapping export "frodo mapping export -Ni mapping/managedBravo_group_managedBravo_group --no-deps --use-string-arrays -D mappingExportTestDir1": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into the directory named mappingExportTestDir1 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export -Ni mapping/managedBravo_group_managedBravo_group --no-deps --use-string-arrays -D mappingExportTestDir1": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into the directory named mappingExportTestDir1 2`] = `""`; exports[`frodo mapping export "frodo mapping export -Ni mapping/managedBravo_group_managedBravo_group --no-deps --use-string-arrays -D mappingExportTestDir1": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into the directory named mappingExportTestDir1: mappingExportTestDir1/managedBravo_group_managedBravo_group.mapping.json 1`] = ` { @@ -2038,7 +2050,9 @@ exports[`frodo mapping export "frodo mapping export -Ni mapping/managedBravo_gro } `; -exports[`frodo mapping export "frodo mapping export -a --file my-allMappings.mapping.json": should export all mappings to a single file named my-allMappings.mapping.json 1`] = `""`; +exports[`frodo mapping export "frodo mapping export -a --file my-allMappings.mapping.json": should export all mappings to a single file named my-allMappings.mapping.json 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export -a --file my-allMappings.mapping.json": should export all mappings to a single file named my-allMappings.mapping.json 2`] = `""`; exports[`frodo mapping export "frodo mapping export -a --file my-allMappings.mapping.json": should export all mappings to a single file named my-allMappings.mapping.json: my-allMappings.mapping.json 1`] = ` { @@ -2707,7 +2721,9 @@ isGoogleEligible; } `; -exports[`frodo mapping export "frodo mapping export -i mapping/managedBravo_group_managedBravo_group -f my-frodo-test-mapping.mapping.json": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into file named my-frodo-test-mapping.mapping.json 1`] = `""`; +exports[`frodo mapping export "frodo mapping export -i mapping/managedBravo_group_managedBravo_group -f my-frodo-test-mapping.mapping.json": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into file named my-frodo-test-mapping.mapping.json 1`] = `0`; + +exports[`frodo mapping export "frodo mapping export -i mapping/managedBravo_group_managedBravo_group -f my-frodo-test-mapping.mapping.json": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into file named my-frodo-test-mapping.mapping.json 2`] = `""`; exports[`frodo mapping export "frodo mapping export -i mapping/managedBravo_group_managedBravo_group -f my-frodo-test-mapping.mapping.json": should export the mapping with mapping id "mapping/managedBravo_group_managedBravo_group" into file named my-frodo-test-mapping.mapping.json: my-frodo-test-mapping.mapping.json 1`] = ` { diff --git a/test/e2e/__snapshots__/oauth-client-export.e2e.test.js.snap b/test/e2e/__snapshots__/oauth-client-export.e2e.test.js.snap index c6c8f09b0..300c1de4d 100644 --- a/test/e2e/__snapshots__/oauth-client-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/oauth-client-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo oauth client export "frodo oauth client export --all --no-deps --file my-nodeps-allAlphaApplications.oauth2.app.json": should export all oauth clients to a single file with no dependencies 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export --all --no-deps --file my-nodeps-allAlphaApplications.oauth2.app.json": should export all oauth clients to a single file with no dependencies 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export --all --no-deps --file my-nodeps-allAlphaApplications.oauth2.app.json": should export all oauth clients to a single file with no dependencies 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export --all --no-deps --file my-nodeps-allAlphaApplications.oauth2.app.json": should export all oauth clients to a single file with no dependencies: my-nodeps-allAlphaApplications.oauth2.app.json 1`] = ` { @@ -4346,7 +4348,9 @@ exports[`frodo oauth client export "frodo oauth client export --all --no-deps -- } `; -exports[`frodo oauth client export "frodo oauth client export --all-separate --no-metadata --directory oauthClientExportTestDir3": should export all oauth clients to separate files in the directory oauthClientExportTestDir3 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export --all-separate --no-metadata --directory oauthClientExportTestDir3": should export all oauth clients to separate files in the directory oauthClientExportTestDir3 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export --all-separate --no-metadata --directory oauthClientExportTestDir3": should export all oauth clients to separate files in the directory oauthClientExportTestDir3 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export --all-separate --no-metadata --directory oauthClientExportTestDir3": should export all oauth clients to separate files in the directory oauthClientExportTestDir3: oauthClientExportTestDir3/0b48992b-a2dd-4ed5-8b07-1fc5d7306da8.oauth2.app.json 1`] = ` { @@ -17859,7 +17863,9 @@ exports[`frodo oauth client export "frodo oauth client export --all-separate --n } `; -exports[`frodo oauth client export "frodo oauth client export --app-id RCSClient --no-deps -f my-nodeps-RCSClient.oauth2.app.json": should export the oauth client with oauth client id "RCSClient" with no dependencies into a file named my-nodeps-RCSClient.oauth2.app.json 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export --app-id RCSClient --no-deps -f my-nodeps-RCSClient.oauth2.app.json": should export the oauth client with oauth client id "RCSClient" with no dependencies into a file named my-nodeps-RCSClient.oauth2.app.json 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export --app-id RCSClient --no-deps -f my-nodeps-RCSClient.oauth2.app.json": should export the oauth client with oauth client id "RCSClient" with no dependencies into a file named my-nodeps-RCSClient.oauth2.app.json 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export --app-id RCSClient --no-deps -f my-nodeps-RCSClient.oauth2.app.json": should export the oauth client with oauth client id "RCSClient" with no dependencies into a file named my-nodeps-RCSClient.oauth2.app.json: my-nodeps-RCSClient.oauth2.app.json 1`] = ` { @@ -18615,7 +18621,9 @@ exports[`frodo oauth client export "frodo oauth client export --app-id RCSClient } `; -exports[`frodo oauth client export "frodo oauth client export -A": should export all oauth clients to separate files 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export -A": should export all oauth clients to separate files 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export -A": should export all oauth clients to separate files 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export -A": should export all oauth clients to separate files: 0b48992b-a2dd-4ed5-8b07-1fc5d7306da8.oauth2.app.json 1`] = ` { @@ -32145,7 +32153,9 @@ exports[`frodo oauth client export "frodo oauth client export -A": should export } `; -exports[`frodo oauth client export "frodo oauth client export -NaD oauthClientExportTestDir2": should export all oauth clients to a single file in the directory oauthClientExportTestDir2 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export -NaD oauthClientExportTestDir2": should export all oauth clients to a single file in the directory oauthClientExportTestDir2 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export -NaD oauthClientExportTestDir2": should export all oauth clients to a single file in the directory oauthClientExportTestDir2 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export -NaD oauthClientExportTestDir2": should export all oauth clients to a single file in the directory oauthClientExportTestDir2: oauthClientExportTestDir2/allAlphaApplications.oauth2.app.json 1`] = ` { @@ -42226,7 +42236,9 @@ exports[`frodo oauth client export "frodo oauth client export -NaD oauthClientEx } `; -exports[`frodo oauth client export "frodo oauth client export -Ni RCSClient -D oauthClientExportTestDir1": should export the oauth client with oauth client id "RCSClient" to the directory oauthClientExportTestDir1 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export -Ni RCSClient -D oauthClientExportTestDir1": should export the oauth client with oauth client id "RCSClient" to the directory oauthClientExportTestDir1 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export -Ni RCSClient -D oauthClientExportTestDir1": should export the oauth client with oauth client id "RCSClient" to the directory oauthClientExportTestDir1 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export -Ni RCSClient -D oauthClientExportTestDir1": should export the oauth client with oauth client id "RCSClient" to the directory oauthClientExportTestDir1: oauthClientExportTestDir1/RCSClient.oauth2.app.json 1`] = ` { @@ -42982,7 +42994,9 @@ exports[`frodo oauth client export "frodo oauth client export -Ni RCSClient -D o } `; -exports[`frodo oauth client export "frodo oauth client export -a": should export all oauth clients to a single file 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export -a": should export all oauth clients to a single file 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export -a": should export all oauth clients to a single file 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export -a": should export all oauth clients to a single file: allAlphaApplications.oauth2.app.json 1`] = ` { @@ -53064,7 +53078,9 @@ exports[`frodo oauth client export "frodo oauth client export -a": should export } `; -exports[`frodo oauth client export "frodo oauth client export -i RCSClient": should export the oauth client with oauth client id "RCSClient" 1`] = `""`; +exports[`frodo oauth client export "frodo oauth client export -i RCSClient": should export the oauth client with oauth client id "RCSClient" 1`] = `0`; + +exports[`frodo oauth client export "frodo oauth client export -i RCSClient": should export the oauth client with oauth client id "RCSClient" 2`] = `""`; exports[`frodo oauth client export "frodo oauth client export -i RCSClient": should export the oauth client with oauth client id "RCSClient": RCSClient.oauth2.app.json 1`] = ` { diff --git a/test/e2e/__snapshots__/promote.e2e.test.js.snap b/test/e2e/__snapshots__/promote.e2e.test.js.snap new file mode 100644 index 000000000..6ea3a09de --- /dev/null +++ b/test/e2e/__snapshots__/promote.e2e.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "authentication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on authentication changes 1`] = `""`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "authentication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on authentication changes 2`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1730238488278 [b672336b-41ef-428d-ae4a-e0c082875377] +- Importing authentication settings... +✔ Imported alpha realm authentication settings. +- Importing authentication settings... +✔ Imported bravo realm authentication settings. +" +`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "managedapplication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on managedapplication changes 1`] = `""`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "managedapplication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on managedapplication changes 2`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1730238488278 [b672336b-41ef-428d-ae4a-e0c082875377] +" +`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "mapping frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on mapping changes 1`] = `""`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "mapping frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on mapping changes 2`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1730238488278 [b672336b-41ef-428d-ae4a-e0c082875377] +Invalid mapping id undefined. Must start with 'sync/' or 'mapping/' +Invalid mapping id undefined. Must start with 'sync/' or 'mapping/' +Error deleting mapping undefined + Invalid mapping id undefined. Must start with 'sync/' or 'mapping/' +[----------------------------------------] 0% | 0/1 | Error importing mapping undefined +[----------------------------------------] 0% | 0/1 | Error importing mapping undefined +" +`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "variable frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on variable changes 1`] = `""`; + +exports[`frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-* "variable frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on variable changes 2`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1730238488278 [b672336b-41ef-428d-ae4a-e0c082875377] +" +`; diff --git a/test/e2e/__snapshots__/realm-export.e2e.test.js.snap b/test/e2e/__snapshots__/realm-export.e2e.test.js.snap index 6e0a65496..cee12cc4b 100644 --- a/test/e2e/__snapshots__/realm-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/realm-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo realm export "frodo realm export --all": should export all realms to a single file 1`] = `""`; +exports[`frodo realm export "frodo realm export --all": should export all realms to a single file 1`] = `0`; + +exports[`frodo realm export "frodo realm export --all": should export all realms to a single file 2`] = `""`; exports[`frodo realm export "frodo realm export --all": should export all realms to a single file: allRealms.realm.json 1`] = ` { @@ -24,7 +26,9 @@ exports[`frodo realm export "frodo realm export --all": should export all realms } `; -exports[`frodo realm export "frodo realm export --all-separate --no-metadata --directory realmExportTestDir3": should export all realms to separate files in the directory realmExportTestDir3 1`] = `""`; +exports[`frodo realm export "frodo realm export --all-separate --no-metadata --directory realmExportTestDir3": should export all realms to separate files in the directory realmExportTestDir3 1`] = `0`; + +exports[`frodo realm export "frodo realm export --all-separate --no-metadata --directory realmExportTestDir3": should export all realms to separate files in the directory realmExportTestDir3 2`] = `""`; exports[`frodo realm export "frodo realm export --all-separate --no-metadata --directory realmExportTestDir3": should export all realms to separate files in the directory realmExportTestDir3: realmExportTestDir3/alpha.realm.json 1`] = ` { @@ -54,7 +58,9 @@ exports[`frodo realm export "frodo realm export --all-separate --no-metadata --d } `; -exports[`frodo realm export "frodo realm export --realm-id L2FscGhh": should export the realm with realm id "L2FscGhh" 1`] = `""`; +exports[`frodo realm export "frodo realm export --realm-id L2FscGhh": should export the realm with realm id "L2FscGhh" 1`] = `0`; + +exports[`frodo realm export "frodo realm export --realm-id L2FscGhh": should export the realm with realm id "L2FscGhh" 2`] = `""`; exports[`frodo realm export "frodo realm export --realm-id L2FscGhh": should export the realm with realm id "L2FscGhh": L2FscGhh.realm.json 1`] = ` { @@ -71,7 +77,9 @@ exports[`frodo realm export "frodo realm export --realm-id L2FscGhh": should exp } `; -exports[`frodo realm export "frodo realm export --realm-name alpha --no-metadata": should export the realm with realm name "alpha" 1`] = `""`; +exports[`frodo realm export "frodo realm export --realm-name alpha --no-metadata": should export the realm with realm name "alpha" 1`] = `0`; + +exports[`frodo realm export "frodo realm export --realm-name alpha --no-metadata": should export the realm with realm name "alpha" 2`] = `""`; exports[`frodo realm export "frodo realm export --realm-name alpha --no-metadata": should export the realm with realm name "alpha": alpha.realm.json 1`] = ` { @@ -87,7 +95,9 @@ exports[`frodo realm export "frodo realm export --realm-name alpha --no-metadata } `; -exports[`frodo realm export "frodo realm export -A": should export all realms to separate files 1`] = `""`; +exports[`frodo realm export "frodo realm export -A": should export all realms to separate files 1`] = `0`; + +exports[`frodo realm export "frodo realm export -A": should export all realms to separate files 2`] = `""`; exports[`frodo realm export "frodo realm export -A": should export all realms to separate files: alpha.realm.json 1`] = ` { @@ -119,7 +129,9 @@ exports[`frodo realm export "frodo realm export -A": should export all realms to } `; -exports[`frodo realm export "frodo realm export -NaD realmExportTestDir2": should export all realms to a single file in the directory realmExportTestDir2 1`] = `""`; +exports[`frodo realm export "frodo realm export -NaD realmExportTestDir2": should export all realms to a single file in the directory realmExportTestDir2 1`] = `0`; + +exports[`frodo realm export "frodo realm export -NaD realmExportTestDir2": should export all realms to a single file in the directory realmExportTestDir2 2`] = `""`; exports[`frodo realm export "frodo realm export -NaD realmExportTestDir2": should export all realms to a single file in the directory realmExportTestDir2: realmExportTestDir2/allRealms.realm.json 1`] = ` { @@ -142,7 +154,9 @@ exports[`frodo realm export "frodo realm export -NaD realmExportTestDir2": shoul } `; -exports[`frodo realm export "frodo realm export -Nn alpha -D realmExportTestDir1": should export the realm with realm name "alpha" into the directory named realmExportTestDir1 1`] = `""`; +exports[`frodo realm export "frodo realm export -Nn alpha -D realmExportTestDir1": should export the realm with realm name "alpha" into the directory named realmExportTestDir1 1`] = `0`; + +exports[`frodo realm export "frodo realm export -Nn alpha -D realmExportTestDir1": should export the realm with realm name "alpha" into the directory named realmExportTestDir1 2`] = `""`; exports[`frodo realm export "frodo realm export -Nn alpha -D realmExportTestDir1": should export the realm with realm name "alpha" into the directory named realmExportTestDir1: realmExportTestDir1/alpha.realm.json 1`] = ` { @@ -158,7 +172,9 @@ exports[`frodo realm export "frodo realm export -Nn alpha -D realmExportTestDir1 } `; -exports[`frodo realm export "frodo realm export -a --file my-allRealms.realm.json": should export all realms to a single file named my-allRealms.realm.json 1`] = `""`; +exports[`frodo realm export "frodo realm export -a --file my-allRealms.realm.json": should export all realms to a single file named my-allRealms.realm.json 1`] = `0`; + +exports[`frodo realm export "frodo realm export -a --file my-allRealms.realm.json": should export all realms to a single file named my-allRealms.realm.json 2`] = `""`; exports[`frodo realm export "frodo realm export -a --file my-allRealms.realm.json": should export all realms to a single file named my-allRealms.realm.json: my-allRealms.realm.json 1`] = ` { @@ -182,7 +198,9 @@ exports[`frodo realm export "frodo realm export -a --file my-allRealms.realm.jso } `; -exports[`frodo realm export "frodo realm export -i L2FscGhh -f my-frodo-L2FscGhh.realm.json": should export the realm with realm id "L2FscGhh" into file named my-frodo-L2FscGhh.realm.json 1`] = `""`; +exports[`frodo realm export "frodo realm export -i L2FscGhh -f my-frodo-L2FscGhh.realm.json": should export the realm with realm id "L2FscGhh" into file named my-frodo-L2FscGhh.realm.json 1`] = `0`; + +exports[`frodo realm export "frodo realm export -i L2FscGhh -f my-frodo-L2FscGhh.realm.json": should export the realm with realm id "L2FscGhh" into file named my-frodo-L2FscGhh.realm.json 2`] = `""`; exports[`frodo realm export "frodo realm export -i L2FscGhh -f my-frodo-L2FscGhh.realm.json": should export the realm with realm id "L2FscGhh" into file named my-frodo-L2FscGhh.realm.json: my-frodo-L2FscGhh.realm.json 1`] = ` { diff --git a/test/e2e/__snapshots__/role-export.e2e.test.js.snap b/test/e2e/__snapshots__/role-export.e2e.test.js.snap index e3170ebea..35f9fe824 100644 --- a/test/e2e/__snapshots__/role-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/role-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo role export "frodo role export --all": should export all roles to a single file. 1`] = `""`; +exports[`frodo role export "frodo role export --all": should export all roles to a single file. 1`] = `0`; + +exports[`frodo role export "frodo role export --all": should export all roles to a single file. 2`] = `""`; exports[`frodo role export "frodo role export --all": should export all roles to a single file.: allInternalRoles.internalRole.json 1`] = ` { @@ -384,7 +386,9 @@ exports[`frodo role export "frodo role export --all": should export all roles to } `; -exports[`frodo role export "frodo role export --all-separate --directory roleExportTestDir2": should export all roles to separate files 1`] = `""`; +exports[`frodo role export "frodo role export --all-separate --directory roleExportTestDir2": should export all roles to separate files 1`] = `0`; + +exports[`frodo role export "frodo role export --all-separate --directory roleExportTestDir2": should export all roles to separate files 2`] = `""`; exports[`frodo role export "frodo role export --all-separate --directory roleExportTestDir2": should export all roles to separate files: roleExportTestDir2/openidm-admin.internalRole.json 1`] = ` { @@ -816,7 +820,9 @@ exports[`frodo role export "frodo role export --all-separate --directory roleExp } `; -exports[`frodo role export "frodo role export --role-id ccb11ba1-333b-4197-95db-89bb08a2ab56": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56". 1`] = `""`; +exports[`frodo role export "frodo role export --role-id ccb11ba1-333b-4197-95db-89bb08a2ab56": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56". 1`] = `0`; + +exports[`frodo role export "frodo role export --role-id ccb11ba1-333b-4197-95db-89bb08a2ab56": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56". 2`] = `""`; exports[`frodo role export "frodo role export --role-id ccb11ba1-333b-4197-95db-89bb08a2ab56": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56".: ccb11ba1-333b-4197-95db-89bb08a2ab56.internalRole.json 1`] = ` { @@ -1152,7 +1158,9 @@ exports[`frodo role export "frodo role export --role-id ccb11ba1-333b-4197-95db- } `; -exports[`frodo role export "frodo role export --role-name test-internal-role --file roleExportTestFile2.json --no-metadata": should export the role with name "test-internal-role". 1`] = `""`; +exports[`frodo role export "frodo role export --role-name test-internal-role --file roleExportTestFile2.json --no-metadata": should export the role with name "test-internal-role". 1`] = `0`; + +exports[`frodo role export "frodo role export --role-name test-internal-role --file roleExportTestFile2.json --no-metadata": should export the role with name "test-internal-role". 2`] = `""`; exports[`frodo role export "frodo role export --role-name test-internal-role --file roleExportTestFile2.json --no-metadata": should export the role with name "test-internal-role".: roleExportTestFile2.json 1`] = ` { @@ -1487,7 +1495,9 @@ exports[`frodo role export "frodo role export --role-name test-internal-role --f } `; -exports[`frodo role export "frodo role export -AND roleExportTestDir1": should export all roles to separate files 1`] = `""`; +exports[`frodo role export "frodo role export -AND roleExportTestDir1": should export all roles to separate files 1`] = `0`; + +exports[`frodo role export "frodo role export -AND roleExportTestDir1": should export all roles to separate files 2`] = `""`; exports[`frodo role export "frodo role export -AND roleExportTestDir1": should export all roles to separate files: roleExportTestDir1/openidm-admin.internalRole.json 1`] = ` { @@ -1912,7 +1922,9 @@ exports[`frodo role export "frodo role export -AND roleExportTestDir1": should e } `; -exports[`frodo role export "frodo role export -aNf roleExportTestFile3.json": should export all roles to a single file. 1`] = `""`; +exports[`frodo role export "frodo role export -aNf roleExportTestFile3.json": should export all roles to a single file. 1`] = `0`; + +exports[`frodo role export "frodo role export -aNf roleExportTestFile3.json": should export all roles to a single file. 2`] = `""`; exports[`frodo role export "frodo role export -aNf roleExportTestFile3.json": should export all roles to a single file.: roleExportTestFile3.json 1`] = ` { @@ -2295,7 +2307,9 @@ exports[`frodo role export "frodo role export -aNf roleExportTestFile3.json": sh } `; -exports[`frodo role export "frodo role export -i ccb11ba1-333b-4197-95db-89bb08a2ab56 -f roleExportTestFile1.json -N": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56" 1`] = `""`; +exports[`frodo role export "frodo role export -i ccb11ba1-333b-4197-95db-89bb08a2ab56 -f roleExportTestFile1.json -N": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56" 1`] = `0`; + +exports[`frodo role export "frodo role export -i ccb11ba1-333b-4197-95db-89bb08a2ab56 -f roleExportTestFile1.json -N": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56" 2`] = `""`; exports[`frodo role export "frodo role export -i ccb11ba1-333b-4197-95db-89bb08a2ab56 -f roleExportTestFile1.json -N": should export the role with role id "ccb11ba1-333b-4197-95db-89bb08a2ab56": roleExportTestFile1.json 1`] = ` { @@ -2630,7 +2644,9 @@ exports[`frodo role export "frodo role export -i ccb11ba1-333b-4197-95db-89bb08a } `; -exports[`frodo role export "frodo role export -n test-internal-role": should export the role with name "test-internal-role". 1`] = `""`; +exports[`frodo role export "frodo role export -n test-internal-role": should export the role with name "test-internal-role". 1`] = `0`; + +exports[`frodo role export "frodo role export -n test-internal-role": should export the role with name "test-internal-role". 2`] = `""`; exports[`frodo role export "frodo role export -n test-internal-role": should export the role with name "test-internal-role".: test-internal-role.internalRole.json 1`] = ` { diff --git a/test/e2e/__snapshots__/saml-cot-export.e2e.test.js.snap b/test/e2e/__snapshots__/saml-cot-export.e2e.test.js.snap index 9fd13ec17..f0703f972 100644 --- a/test/e2e/__snapshots__/saml-cot-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/saml-cot-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo saml cot export "frodo saml cot export --all": should export all saml circles of trust to a single file 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export --all": should export all saml circles of trust to a single file 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export --all": should export all saml circles of trust to a single file 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export --all": should export all saml circles of trust to a single file: allAlphaCirclesOfTrust.cot.saml.json 1`] = ` { @@ -42,7 +44,9 @@ exports[`frodo saml cot export "frodo saml cot export --all": should export all } `; -exports[`frodo saml cot export "frodo saml cot export --all-separate --no-metadata --directory samlCotExportTestDir3": should export all saml circles of trust to separate files in the directory samlCotExportTestDir3 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export --all-separate --no-metadata --directory samlCotExportTestDir3": should export all saml circles of trust to separate files in the directory samlCotExportTestDir3 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export --all-separate --no-metadata --directory samlCotExportTestDir3": should export all saml circles of trust to separate files in the directory samlCotExportTestDir3 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export --all-separate --no-metadata --directory samlCotExportTestDir3": should export all saml circles of trust to separate files in the directory samlCotExportTestDir3: samlCotExportTestDir3/2f04818d-561e-4f8a-82e8-af2426112138.cot.saml.json 1`] = ` { @@ -99,7 +103,9 @@ exports[`frodo saml cot export "frodo saml cot export --all-separate --no-metada } `; -exports[`frodo saml cot export "frodo saml cot export --cot-id AzureCOT": should export the saml circles of trust with id "AzureCOT" 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export --cot-id AzureCOT": should export the saml circles of trust with id "AzureCOT" 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export --cot-id AzureCOT": should export the saml circles of trust with id "AzureCOT" 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export --cot-id AzureCOT": should export the saml circles of trust with id "AzureCOT": AzureCOT.cot.saml.json 1`] = ` { @@ -131,7 +137,9 @@ exports[`frodo saml cot export "frodo saml cot export --cot-id AzureCOT": should } `; -exports[`frodo saml cot export "frodo saml cot export -A": should export all saml circles of trust to separate files 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export -A": should export all saml circles of trust to separate files 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export -A": should export all saml circles of trust to separate files 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export -A": should export all saml circles of trust to separate files: 2f04818d-561e-4f8a-82e8-af2426112138.cot.saml.json 1`] = ` { @@ -187,7 +195,9 @@ exports[`frodo saml cot export "frodo saml cot export -A": should export all sam } `; -exports[`frodo saml cot export "frodo saml cot export -NaD samlCotExportTestDir2": should export all saml circles of trust to a single file in the directory samlCotExportTestDir2 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export -NaD samlCotExportTestDir2": should export all saml circles of trust to a single file in the directory samlCotExportTestDir2 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export -NaD samlCotExportTestDir2": should export all saml circles of trust to a single file in the directory samlCotExportTestDir2 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export -NaD samlCotExportTestDir2": should export all saml circles of trust to a single file in the directory samlCotExportTestDir2: samlCotExportTestDir2/allAlphaCirclesOfTrust.cot.saml.json 1`] = ` { @@ -231,7 +241,9 @@ exports[`frodo saml cot export "frodo saml cot export -NaD samlCotExportTestDir2 } `; -exports[`frodo saml cot export "frodo saml cot export -Ni AzureCOT -D samlCotExportTestDir1": should export the saml circles of trust with id "AzureCOT" into the directory named samlCotExportTestDir1 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export -Ni AzureCOT -D samlCotExportTestDir1": should export the saml circles of trust with id "AzureCOT" into the directory named samlCotExportTestDir1 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export -Ni AzureCOT -D samlCotExportTestDir1": should export the saml circles of trust with id "AzureCOT" into the directory named samlCotExportTestDir1 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export -Ni AzureCOT -D samlCotExportTestDir1": should export the saml circles of trust with id "AzureCOT" into the directory named samlCotExportTestDir1: samlCotExportTestDir1/AzureCOT.cot.saml.json 1`] = ` { @@ -262,7 +274,9 @@ exports[`frodo saml cot export "frodo saml cot export -Ni AzureCOT -D samlCotExp } `; -exports[`frodo saml cot export "frodo saml cot export -a --file my-allAlphaCirclesOfTrust.cot.saml.json": should export all saml circles of trust to a single file named my-allAlphaCirclesOfTrust.cot.saml.json 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export -a --file my-allAlphaCirclesOfTrust.cot.saml.json": should export all saml circles of trust to a single file named my-allAlphaCirclesOfTrust.cot.saml.json 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export -a --file my-allAlphaCirclesOfTrust.cot.saml.json": should export all saml circles of trust to a single file named my-allAlphaCirclesOfTrust.cot.saml.json 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export -a --file my-allAlphaCirclesOfTrust.cot.saml.json": should export all saml circles of trust to a single file named my-allAlphaCirclesOfTrust.cot.saml.json: my-allAlphaCirclesOfTrust.cot.saml.json 1`] = ` { @@ -304,7 +318,9 @@ exports[`frodo saml cot export "frodo saml cot export -a --file my-allAlphaCircl } `; -exports[`frodo saml cot export "frodo saml cot export -i AzureCOT -f my-AzureCOT.cot.saml.json": should export the saml circles of trust with id "AzureCOT" into file named my-AzureCOT.cot.saml.json 1`] = `""`; +exports[`frodo saml cot export "frodo saml cot export -i AzureCOT -f my-AzureCOT.cot.saml.json": should export the saml circles of trust with id "AzureCOT" into file named my-AzureCOT.cot.saml.json 1`] = `0`; + +exports[`frodo saml cot export "frodo saml cot export -i AzureCOT -f my-AzureCOT.cot.saml.json": should export the saml circles of trust with id "AzureCOT" into file named my-AzureCOT.cot.saml.json 2`] = `""`; exports[`frodo saml cot export "frodo saml cot export -i AzureCOT -f my-AzureCOT.cot.saml.json": should export the saml circles of trust with id "AzureCOT" into file named my-AzureCOT.cot.saml.json: my-AzureCOT.cot.saml.json 1`] = ` { diff --git a/test/e2e/__snapshots__/saml-export.e2e.test.js.snap b/test/e2e/__snapshots__/saml-export.e2e.test.js.snap index a77bd6e1b..01f5a230b 100644 --- a/test/e2e/__snapshots__/saml-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/saml-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo saml export "frodo saml export --all --file my-allAlphaProviders.saml.json": should export all saml providers to a single file named my-allAlphaProviders.saml.json 1`] = `""`; +exports[`frodo saml export "frodo saml export --all --file my-allAlphaProviders.saml.json": should export all saml providers to a single file named my-allAlphaProviders.saml.json 1`] = `0`; + +exports[`frodo saml export "frodo saml export --all --file my-allAlphaProviders.saml.json": should export all saml providers to a single file named my-allAlphaProviders.saml.json 2`] = `""`; exports[`frodo saml export "frodo saml export --all --file my-allAlphaProviders.saml.json": should export all saml providers to a single file named my-allAlphaProviders.saml.json: my-allAlphaProviders.saml.json 1`] = ` { @@ -2261,7 +2263,9 @@ exports[`frodo saml export "frodo saml export --all --file my-allAlphaProviders. } `; -exports[`frodo saml export "frodo saml export --all-separate --no-metadata --directory samlExportTestDir3": should export all saml providers to separate files in the directory samlExportTestDir3 1`] = `""`; +exports[`frodo saml export "frodo saml export --all-separate --no-metadata --directory samlExportTestDir3": should export all saml providers to separate files in the directory samlExportTestDir3 1`] = `0`; + +exports[`frodo saml export "frodo saml export --all-separate --no-metadata --directory samlExportTestDir3": should export all saml providers to separate files in the directory samlExportTestDir3 2`] = `""`; exports[`frodo saml export "frodo saml export --all-separate --no-metadata --directory samlExportTestDir3": should export all saml providers to separate files in the directory samlExportTestDir3: samlExportTestDir3/SPAzure.saml.json 1`] = ` { @@ -4626,7 +4630,9 @@ exports[`frodo saml export "frodo saml export --all-separate --no-metadata --dir } `; -exports[`frodo saml export "frodo saml export --entity-id iSPAzure": should export the saml provider with entity id "iSPAzure" 1`] = `""`; +exports[`frodo saml export "frodo saml export --entity-id iSPAzure": should export the saml provider with entity id "iSPAzure" 1`] = `0`; + +exports[`frodo saml export "frodo saml export --entity-id iSPAzure": should export the saml provider with entity id "iSPAzure" 2`] = `""`; exports[`frodo saml export "frodo saml export --entity-id iSPAzure": should export the saml provider with entity id "iSPAzure": iSPAzure.saml.json 1`] = ` { @@ -5110,7 +5116,9 @@ exports[`frodo saml export "frodo saml export --entity-id iSPAzure": should expo } `; -exports[`frodo saml export "frodo saml export -A": should export all saml providers to separate files 1`] = `""`; +exports[`frodo saml export "frodo saml export -A": should export all saml providers to separate files 1`] = `0`; + +exports[`frodo saml export "frodo saml export -A": should export all saml providers to separate files 2`] = `""`; exports[`frodo saml export "frodo saml export -A": should export all saml providers to separate files: SPAzure.saml.json 1`] = ` { @@ -7484,7 +7492,9 @@ exports[`frodo saml export "frodo saml export -A": should export all saml provid } `; -exports[`frodo saml export "frodo saml export -NaD samlExportTestDir2": should export all saml providers to a single file in the directory samlExportTestDir2 1`] = `""`; +exports[`frodo saml export "frodo saml export -NaD samlExportTestDir2": should export all saml providers to a single file in the directory samlExportTestDir2 1`] = `0`; + +exports[`frodo saml export "frodo saml export -NaD samlExportTestDir2": should export all saml providers to a single file in the directory samlExportTestDir2 2`] = `""`; exports[`frodo saml export "frodo saml export -NaD samlExportTestDir2": should export all saml providers to a single file in the directory samlExportTestDir2: samlExportTestDir2/allAlphaProviders.saml.json 1`] = ` { @@ -9744,7 +9754,9 @@ exports[`frodo saml export "frodo saml export -NaD samlExportTestDir2": should e } `; -exports[`frodo saml export "frodo saml export -a": should export all saml providers to a single file 1`] = `""`; +exports[`frodo saml export "frodo saml export -a": should export all saml providers to a single file 1`] = `0`; + +exports[`frodo saml export "frodo saml export -a": should export all saml providers to a single file 2`] = `""`; exports[`frodo saml export "frodo saml export -a": should export all saml providers to a single file: allAlphaProviders.saml.json 1`] = ` { @@ -12005,7 +12017,9 @@ exports[`frodo saml export "frodo saml export -a": should export all saml provid } `; -exports[`frodo saml export "frodo saml export -i iSPAzure -f my-iSPAzure.saml.json": should export the saml provider with entity id "iSPAzure" into file named my-iSPAzure.saml.json 1`] = `""`; +exports[`frodo saml export "frodo saml export -i iSPAzure -f my-iSPAzure.saml.json": should export the saml provider with entity id "iSPAzure" into file named my-iSPAzure.saml.json 1`] = `0`; + +exports[`frodo saml export "frodo saml export -i iSPAzure -f my-iSPAzure.saml.json": should export the saml provider with entity id "iSPAzure" into file named my-iSPAzure.saml.json 2`] = `""`; exports[`frodo saml export "frodo saml export -i iSPAzure -f my-iSPAzure.saml.json": should export the saml provider with entity id "iSPAzure" into file named my-iSPAzure.saml.json: my-iSPAzure.saml.json 1`] = ` { @@ -12489,7 +12503,9 @@ exports[`frodo saml export "frodo saml export -i iSPAzure -f my-iSPAzure.saml.js } `; -exports[`frodo saml export "frodo saml export -i iSPAzure": should export the saml provider with entity id "iSPAzure" 1`] = `""`; +exports[`frodo saml export "frodo saml export -i iSPAzure": should export the saml provider with entity id "iSPAzure" 1`] = `0`; + +exports[`frodo saml export "frodo saml export -i iSPAzure": should export the saml provider with entity id "iSPAzure" 2`] = `""`; exports[`frodo saml export "frodo saml export -i iSPAzure": should export the saml provider with entity id "iSPAzure": iSPAzure.saml.json 1`] = ` { @@ -12973,7 +12989,9 @@ exports[`frodo saml export "frodo saml export -i iSPAzure": should export the sa } `; -exports[`frodo saml export "frodo saml export Ni iSPAzure -D samlExportTestDir1": should export the saml provider with entity id "iSPAzure" into the directory samlExportTestDir1 1`] = `""`; +exports[`frodo saml export "frodo saml export Ni iSPAzure -D samlExportTestDir1": should export the saml provider with entity id "iSPAzure" into the directory samlExportTestDir1 1`] = `0`; + +exports[`frodo saml export "frodo saml export Ni iSPAzure -D samlExportTestDir1": should export the saml provider with entity id "iSPAzure" into the directory samlExportTestDir1 2`] = `""`; exports[`frodo saml export "frodo saml export Ni iSPAzure -D samlExportTestDir1": should export the saml provider with entity id "iSPAzure" into the directory samlExportTestDir1: samlExportTestDir1/iSPAzure.saml.json 1`] = ` { diff --git a/test/e2e/__snapshots__/saml-metadata-export.e2e.test.js.snap b/test/e2e/__snapshots__/saml-metadata-export.e2e.test.js.snap index 869b1e933..6bfab94fe 100644 --- a/test/e2e/__snapshots__/saml-metadata-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/saml-metadata-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure --file test.xml --directory samlMetadataExportTestDir2": should export the saml metadata with entity id "iSPAzure" to the file test.xml in the directory samlMetadataExportTestDir2 1`] = `""`; +exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure --file test.xml --directory samlMetadataExportTestDir2": should export the saml metadata with entity id "iSPAzure" to the file test.xml in the directory samlMetadataExportTestDir2 1`] = `0`; + +exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure --file test.xml --directory samlMetadataExportTestDir2": should export the saml metadata with entity id "iSPAzure" to the file test.xml in the directory samlMetadataExportTestDir2 2`] = `""`; exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure --file test.xml --directory samlMetadataExportTestDir2": should export the saml metadata with entity id "iSPAzure" to the file test.xml in the directory samlMetadataExportTestDir2: samlMetadataExportTestDir2/test.xml 1`] = ` " @@ -81,7 +83,9 @@ mK3zry+aIWav0yj1Pmh2lOgD6rEnOlGZDqrmIqWd0d2jp8Am4iawP0sr9e7etjK/YGCFW4byuCOx " `; -exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure -f my-iSPAzure.metadata.xml": should export the saml metadata with entity id "iSPAzure" to the file my-iSPAzure.metadata.xml 1`] = `""`; +exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure -f my-iSPAzure.metadata.xml": should export the saml metadata with entity id "iSPAzure" to the file my-iSPAzure.metadata.xml 1`] = `0`; + +exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure -f my-iSPAzure.metadata.xml": should export the saml metadata with entity id "iSPAzure" to the file my-iSPAzure.metadata.xml 2`] = `""`; exports[`frodo saml metadata export "frodo saml metadata export --entity-id iSPAzure -f my-iSPAzure.metadata.xml": should export the saml metadata with entity id "iSPAzure" to the file my-iSPAzure.metadata.xml: my-iSPAzure.metadata.xml 1`] = ` " @@ -162,7 +166,9 @@ mK3zry+aIWav0yj1Pmh2lOgD6rEnOlGZDqrmIqWd0d2jp8Am4iawP0sr9e7etjK/YGCFW4byuCOx " `; -exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure -D samlMetadataExportTestDir1": should export the saml metadata with entity id "iSPAzure" to the directory samlMetadataExportTestDir1 1`] = `""`; +exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure -D samlMetadataExportTestDir1": should export the saml metadata with entity id "iSPAzure" to the directory samlMetadataExportTestDir1 1`] = `0`; + +exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure -D samlMetadataExportTestDir1": should export the saml metadata with entity id "iSPAzure" to the directory samlMetadataExportTestDir1 2`] = `""`; exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure -D samlMetadataExportTestDir1": should export the saml metadata with entity id "iSPAzure" to the directory samlMetadataExportTestDir1: samlMetadataExportTestDir1/iSPAzure.metadata.xml 1`] = ` " @@ -243,7 +249,9 @@ mK3zry+aIWav0yj1Pmh2lOgD6rEnOlGZDqrmIqWd0d2jp8Am4iawP0sr9e7etjK/YGCFW4byuCOx " `; -exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure": should export the saml metadata with entity id "iSPAzure" 1`] = `""`; +exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure": should export the saml metadata with entity id "iSPAzure" 1`] = `0`; + +exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure": should export the saml metadata with entity id "iSPAzure" 2`] = `""`; exports[`frodo saml metadata export "frodo saml metadata export -i iSPAzure": should export the saml metadata with entity id "iSPAzure": iSPAzure.metadata.xml 1`] = ` " diff --git a/test/e2e/__snapshots__/script-describe.e2e.test.js.snap b/test/e2e/__snapshots__/script-describe.e2e.test.js.snap index 5a25c0d7d..ff6c787e1 100644 --- a/test/e2e/__snapshots__/script-describe.e2e.test.js.snap +++ b/test/e2e/__snapshots__/script-describe.e2e.test.js.snap @@ -177,6 +177,18 @@ Usage Locations (22 total)│realm.root-alpha.trees.j00.nodes.01d3785f-7fb4-44a7 `; exports[`frodo script describe "frodo script describe -un shared": should describe the script with name "shared" with usage 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo script describe "frodo script describe -un shared": should describe the script with name "shared" with usage 2`] = ` "Id │1b52a7e0-4019-40fa-958a-15a49870e901 Name │shared Language │JavaScript diff --git a/test/e2e/__snapshots__/script-export.e2e.test.js.snap b/test/e2e/__snapshots__/script-export.e2e.test.js.snap index fe8bbf9d4..c8b318a78 100644 --- a/test/e2e/__snapshots__/script-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/script-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo script export "frodo script export --all": should export all scripts to a single file 1`] = `""`; +exports[`frodo script export "frodo script export --all": should export all scripts to a single file 1`] = `0`; + +exports[`frodo script export "frodo script export --all": should export all scripts to a single file 2`] = `""`; exports[`frodo script export "frodo script export --all": should export all scripts to a single file: allAlphaScripts.script.json 1`] = ` { @@ -3507,7 +3509,9 @@ exports[`frodo script export "frodo script export --all": should export all scri } `; -exports[`frodo script export "frodo script export --all-separate --no-metadata --default --extract --directory scriptExportTestDir4": should export all extracted scripts, including default ones, to separate files in the directory scriptExportTestDir4 1`] = `""`; +exports[`frodo script export "frodo script export --all-separate --no-metadata --default --extract --directory scriptExportTestDir4": should export all extracted scripts, including default ones, to separate files in the directory scriptExportTestDir4 1`] = `0`; + +exports[`frodo script export "frodo script export --all-separate --no-metadata --default --extract --directory scriptExportTestDir4": should export all extracted scripts, including default ones, to separate files in the directory scriptExportTestDir4 2`] = `""`; exports[`frodo script export "frodo script export --all-separate --no-metadata --default --extract --directory scriptExportTestDir4": should export all extracted scripts, including default ones, to separate files in the directory scriptExportTestDir4: scriptExportTestDir4/ADFS-Profile-Normalization-(JS).script.js 1`] = ` "/* @@ -12558,7 +12562,9 @@ exports[`frodo script export "frodo script export --all-separate --no-metadata - } `; -exports[`frodo script export "frodo script export --extract --script-id 'bb393d07-a121-47e2-9d24-1a1066f39ec0' --directory scriptExportTestDir5": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" along with libraries 1`] = `""`; +exports[`frodo script export "frodo script export --extract --script-id 'bb393d07-a121-47e2-9d24-1a1066f39ec0' --directory scriptExportTestDir5": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" along with libraries 1`] = `0`; + +exports[`frodo script export "frodo script export --extract --script-id 'bb393d07-a121-47e2-9d24-1a1066f39ec0' --directory scriptExportTestDir5": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" along with libraries 2`] = `""`; exports[`frodo script export "frodo script export --extract --script-id 'bb393d07-a121-47e2-9d24-1a1066f39ec0' --directory scriptExportTestDir5": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" along with libraries: scriptExportTestDir5/2c38c998-aec0-4e56-8d46-bff6e24a704e.script.js 1`] = ` "var i = 0; @@ -12724,7 +12730,9 @@ exports[`frodo script export "frodo script export --extract --script-id 'bb393d0 } `; -exports[`frodo script export "frodo script export --no-deps -i 'bb393d07-a121-47e2-9d24-1a1066f39ec0'": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" 1`] = `""`; +exports[`frodo script export "frodo script export --no-deps -i 'bb393d07-a121-47e2-9d24-1a1066f39ec0'": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" 1`] = `0`; + +exports[`frodo script export "frodo script export --no-deps -i 'bb393d07-a121-47e2-9d24-1a1066f39ec0'": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0" 2`] = `""`; exports[`frodo script export "frodo script export --no-deps -i 'bb393d07-a121-47e2-9d24-1a1066f39ec0'": should export the script with id "bb393d07-a121-47e2-9d24-1a1066f39ec0": bb393d07-a121-47e2-9d24-1a1066f39ec0.script.json 1`] = ` { @@ -12762,7 +12770,9 @@ exports[`frodo script export "frodo script export --no-deps -i 'bb393d07-a121-47 } `; -exports[`frodo script export "frodo script export --script-name 'GitHub Profile Normalization'": should export the script named "GitHub Profile Normalization" 1`] = `""`; +exports[`frodo script export "frodo script export --script-name 'GitHub Profile Normalization'": should export the script named "GitHub Profile Normalization" 1`] = `0`; + +exports[`frodo script export "frodo script export --script-name 'GitHub Profile Normalization'": should export the script named "GitHub Profile Normalization" 2`] = `""`; exports[`frodo script export "frodo script export --script-name 'GitHub Profile Normalization'": should export the script named "GitHub Profile Normalization": GitHub-Profile-Normalization.script.json 1`] = ` { @@ -12803,7 +12813,9 @@ exports[`frodo script export "frodo script export --script-name 'GitHub Profile } `; -exports[`frodo script export "frodo script export -A": should export all scripts to separate files 1`] = `""`; +exports[`frodo script export "frodo script export -A": should export all scripts to separate files 1`] = `0`; + +exports[`frodo script export "frodo script export -A": should export all scripts to separate files 2`] = `""`; exports[`frodo script export "frodo script export -A": should export all scripts to separate files: ADFS-Profile-Normalization-(JS).script.json 1`] = ` { @@ -16558,7 +16570,9 @@ exports[`frodo script export "frodo script export -A": should export all scripts } `; -exports[`frodo script export "frodo script export -NAxD scriptExportTestDir3": should export all extracted scripts to separate files in the directory scriptExportTestDir3 1`] = `""`; +exports[`frodo script export "frodo script export -NAxD scriptExportTestDir3": should export all extracted scripts to separate files in the directory scriptExportTestDir3 1`] = `0`; + +exports[`frodo script export "frodo script export -NAxD scriptExportTestDir3": should export all extracted scripts to separate files in the directory scriptExportTestDir3 2`] = `""`; exports[`frodo script export "frodo script export -NAxD scriptExportTestDir3": should export all extracted scripts to separate files in the directory scriptExportTestDir3: scriptExportTestDir3/ADFS-Profile-Normalization-(JS).script.js 1`] = ` "/* @@ -20371,7 +20385,9 @@ exports[`frodo script export "frodo script export -NAxD scriptExportTestDir3": s } `; -exports[`frodo script export "frodo script export -NaD scriptExportTestDir2": should export all scripts to a single file in the directory scriptExportTestDir2 1`] = `""`; +exports[`frodo script export "frodo script export -NaD scriptExportTestDir2": should export all scripts to a single file in the directory scriptExportTestDir2 1`] = `0`; + +exports[`frodo script export "frodo script export -NaD scriptExportTestDir2": should export all scripts to a single file in the directory scriptExportTestDir2 2`] = `""`; exports[`frodo script export "frodo script export -NaD scriptExportTestDir2": should export all scripts to a single file in the directory scriptExportTestDir2: scriptExportTestDir2/allAlphaScripts.script.json 1`] = ` { @@ -23877,7 +23893,9 @@ exports[`frodo script export "frodo script export -NaD scriptExportTestDir2": sh } `; -exports[`frodo script export "frodo script export -Nxn 'GitHub Profile Normalization' -D scriptExportTestDir1": should export the script named "GitHub Profile Normalization" into the directory scriptExportTestDir1 1`] = `""`; +exports[`frodo script export "frodo script export -Nxn 'GitHub Profile Normalization' -D scriptExportTestDir1": should export the script named "GitHub Profile Normalization" into the directory scriptExportTestDir1 1`] = `0`; + +exports[`frodo script export "frodo script export -Nxn 'GitHub Profile Normalization' -D scriptExportTestDir1": should export the script named "GitHub Profile Normalization" into the directory scriptExportTestDir1 2`] = `""`; exports[`frodo script export "frodo script export -Nxn 'GitHub Profile Normalization' -D scriptExportTestDir1": should export the script named "GitHub Profile Normalization" into the directory scriptExportTestDir1: scriptExportTestDir1/GitHub-Profile-Normalization.script.groovy 1`] = ` "/* @@ -23920,7 +23938,9 @@ exports[`frodo script export "frodo script export -Nxn 'GitHub Profile Normaliza } `; -exports[`frodo script export "frodo script export -ad --file my-allAlphaScripts.script.json": should export all scripts, including default ones, to a single file named my-allAlphaScripts.script.json 1`] = `""`; +exports[`frodo script export "frodo script export -ad --file my-allAlphaScripts.script.json": should export all scripts, including default ones, to a single file named my-allAlphaScripts.script.json 1`] = `0`; + +exports[`frodo script export "frodo script export -ad --file my-allAlphaScripts.script.json": should export all scripts, including default ones, to a single file named my-allAlphaScripts.script.json 2`] = `""`; exports[`frodo script export "frodo script export -ad --file my-allAlphaScripts.script.json": should export all scripts, including default ones, to a single file named my-allAlphaScripts.script.json: my-allAlphaScripts.script.json 1`] = ` { @@ -32303,7 +32323,9 @@ exports[`frodo script export "frodo script export -ad --file my-allAlphaScripts. } `; -exports[`frodo script export "frodo script export -n 'GitHub Profile Normalization' -f my-GitHub-Profile-Normalization.script.json": should export the script named "GitHub Profile Normalization" into file named my-GitHub-Profile-Normalization.script.json 1`] = `""`; +exports[`frodo script export "frodo script export -n 'GitHub Profile Normalization' -f my-GitHub-Profile-Normalization.script.json": should export the script named "GitHub Profile Normalization" into file named my-GitHub-Profile-Normalization.script.json 1`] = `0`; + +exports[`frodo script export "frodo script export -n 'GitHub Profile Normalization' -f my-GitHub-Profile-Normalization.script.json": should export the script named "GitHub Profile Normalization" into file named my-GitHub-Profile-Normalization.script.json 2`] = `""`; exports[`frodo script export "frodo script export -n 'GitHub Profile Normalization' -f my-GitHub-Profile-Normalization.script.json": should export the script named "GitHub Profile Normalization" into file named my-GitHub-Profile-Normalization.script.json: my-GitHub-Profile-Normalization.script.json 1`] = ` { diff --git a/test/e2e/__snapshots__/script-list.e2e.test.js.snap b/test/e2e/__snapshots__/script-list.e2e.test.js.snap index ae94d284b..850737c43 100644 --- a/test/e2e/__snapshots__/script-list.e2e.test.js.snap +++ b/test/e2e/__snapshots__/script-list.e2e.test.js.snap @@ -887,6 +887,20 @@ Yahoo Profile │424da748-82cc-4b54-be6f-82bd64d82a74│Groovy │S `; exports[`frodo script list "frodo script list -lu": should list the names, uuids, languages, contexts, usage, and descriptions of the scripts 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading scripts... +✔ Successfully read 67 scripts. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo script list "frodo script list -lu": should list the names, uuids, languages, contexts, usage, and descriptions of the scripts 2`] = ` "Name │UUID │Language │Context │Description │Used ADFS Profile │dbe0bf9a-72aa-49d5-8483-9db147985a47│JavaScript│Social Idp Profile │Normalizes raw profile data │yes (at realm.root-alpha.idp.adfs.transform) Normalization (JS) │ │ │Transformation │from ADFS │ @@ -1038,6 +1052,20 @@ Yahoo Profile │424da748-82cc-4b54-be6f-82bd64d82a74│Groovy │S `; exports[`frodo script list "frodo script list -u": should list the usage of the scripts 1`] = ` +"Connected to https://openam-frodo-dev.forgeblocks.com/am [alpha] as service account Frodo-SA-1720799681233 [b672336b-41ef-428d-ae4a-e0c082875377] +- Reading scripts... +✔ Successfully read 67 scripts. +Error exporting idm config entity fidc/federation-EntraID + Error reading config entity fidc/federation-EntraID + HTTP client error + Code: ERR_BAD_REQUEST + Status: 403 + Reason: Forbidden + Message: Access denied +" +`; + +exports[`frodo script list "frodo script list -u": should list the usage of the scripts 2`] = ` "Name │Used ADFS Profile │yes (at realm.root-alpha.idp.adfs.transform) Normalization (JS) │ diff --git a/test/e2e/__snapshots__/server-export.e2e.test.js.snap b/test/e2e/__snapshots__/server-export.e2e.test.js.snap index ff7919ef5..054565bd0 100644 --- a/test/e2e/__snapshots__/server-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/server-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo server export "frodo server export --all": should export all servers to a single file 1`] = `""`; +exports[`frodo server export "frodo server export --all": should export all servers to a single file 1`] = `0`; + +exports[`frodo server export "frodo server export --all": should export all servers to a single file 2`] = `""`; exports[`frodo server export "frodo server export --all": should export all servers to a single file: allServers.server.json 1`] = ` { @@ -1740,7 +1742,9 @@ exports[`frodo server export "frodo server export --all": should export all serv } `; -exports[`frodo server export "frodo server export --all-separate --directory serverExportTestDir5": should export all servers to separate files in the directory serverExportTestDir5 1`] = `""`; +exports[`frodo server export "frodo server export --all-separate --directory serverExportTestDir5": should export all servers to separate files in the directory serverExportTestDir5 1`] = `0`; + +exports[`frodo server export "frodo server export --all-separate --directory serverExportTestDir5": should export all servers to separate files in the directory serverExportTestDir5 2`] = `""`; exports[`frodo server export "frodo server export --all-separate --directory serverExportTestDir5": should export all servers to separate files in the directory serverExportTestDir5: serverExportTestDir5/01.server.json 1`] = ` { @@ -3498,7 +3502,9 @@ exports[`frodo server export "frodo server export --all-separate --directory ser } `; -exports[`frodo server export "frodo server export --server-id 01": should export the server with server id "01". 1`] = `""`; +exports[`frodo server export "frodo server export --server-id 01": should export the server with server id "01". 1`] = `0`; + +exports[`frodo server export "frodo server export --server-id 01": should export the server with server id "01". 2`] = `""`; exports[`frodo server export "frodo server export --server-id 01": should export the server with server id "01".: 01.server.json 1`] = ` { @@ -4092,7 +4098,9 @@ exports[`frodo server export "frodo server export --server-id 01": should export } `; -exports[`frodo server export "frodo server export --server-url http://localhost:8081/am --extract --directory serverExportTestDir2": should export the server with url "http://localhost:8081/am" along with extracted properties. 1`] = `""`; +exports[`frodo server export "frodo server export --server-url http://localhost:8081/am --extract --directory serverExportTestDir2": should export the server with url "http://localhost:8081/am" along with extracted properties. 1`] = `0`; + +exports[`frodo server export "frodo server export --server-url http://localhost:8081/am --extract --directory serverExportTestDir2": should export the server with url "http://localhost:8081/am" along with extracted properties. 2`] = `""`; exports[`frodo server export "frodo server export --server-url http://localhost:8081/am --extract --directory serverExportTestDir2": should export the server with url "http://localhost:8081/am" along with extracted properties.: serverExportTestDir2/03.server.json 1`] = ` { @@ -4708,7 +4716,9 @@ exports[`frodo server export "frodo server export --server-url http://localhost: } `; -exports[`frodo server export "frodo server export -AxNdD serverExportTestDir4": should export all servers to separate files along with extracted and default properties 1`] = `""`; +exports[`frodo server export "frodo server export -AxNdD serverExportTestDir4": should export all servers to separate files along with extracted and default properties 1`] = `0`; + +exports[`frodo server export "frodo server export -AxNdD serverExportTestDir4": should export all servers to separate files along with extracted and default properties 2`] = `""`; exports[`frodo server export "frodo server export -AxNdD serverExportTestDir4": should export all servers to separate files along with extracted and default properties: serverExportTestDir4/01.server.json 1`] = ` { @@ -6946,7 +6956,9 @@ exports[`frodo server export "frodo server export -AxNdD serverExportTestDir4": } `; -exports[`frodo server export "frodo server export -axNdf serverExportTestFile3.json -D serverExportTestDir3": should export all servers to a single file in the directory serverExportTestDir3 along with extracted and default properties. 1`] = `""`; +exports[`frodo server export "frodo server export -axNdf serverExportTestFile3.json -D serverExportTestDir3": should export all servers to a single file in the directory serverExportTestDir3 along with extracted and default properties. 1`] = `0`; + +exports[`frodo server export "frodo server export -axNdf serverExportTestFile3.json -D serverExportTestDir3": should export all servers to a single file in the directory serverExportTestDir3 along with extracted and default properties. 2`] = `""`; exports[`frodo server export "frodo server export -axNdf serverExportTestFile3.json -D serverExportTestDir3": should export all servers to a single file in the directory serverExportTestDir3 along with extracted and default properties.: serverExportTestDir3/01/advanced.properties.server.json 1`] = ` { @@ -9091,7 +9103,9 @@ exports[`frodo server export "frodo server export -axNdf serverExportTestFile3.j } `; -exports[`frodo server export "frodo server export -i 01 -f serverExportTestFile1.json -xNdD serverExportTestDir1": should export the server with server id "01" along with extracted properties and default properties. 1`] = `""`; +exports[`frodo server export "frodo server export -i 01 -f serverExportTestFile1.json -xNdD serverExportTestDir1": should export the server with server id "01" along with extracted properties and default properties. 1`] = `0`; + +exports[`frodo server export "frodo server export -i 01 -f serverExportTestFile1.json -xNdD serverExportTestDir1": should export the server with server id "01" along with extracted properties and default properties. 2`] = `""`; exports[`frodo server export "frodo server export -i 01 -f serverExportTestFile1.json -xNdD serverExportTestDir1": should export the server with server id "01" along with extracted properties and default properties.: serverExportTestDir1/01/advanced.properties.server.json 1`] = ` { @@ -10056,7 +10070,9 @@ exports[`frodo server export "frodo server export -i 01 -f serverExportTestFile1 } `; -exports[`frodo server export "frodo server export -u 8081 --file serverExportTestFile2.json --default --no-metadata": should export the server with url containing "8081" along with default properties. 1`] = `""`; +exports[`frodo server export "frodo server export -u 8081 --file serverExportTestFile2.json --default --no-metadata": should export the server with url containing "8081" along with default properties. 1`] = `0`; + +exports[`frodo server export "frodo server export -u 8081 --file serverExportTestFile2.json --default --no-metadata": should export the server with url containing "8081" along with default properties. 2`] = `""`; exports[`frodo server export "frodo server export -u 8081 --file serverExportTestFile2.json --default --no-metadata": should export the server with url containing "8081" along with default properties.: serverExportTestFile2.json 1`] = ` { diff --git a/test/e2e/__snapshots__/service-export.e2e.test.js.snap b/test/e2e/__snapshots__/service-export.e2e.test.js.snap index 40ee5d2ce..24f048be4 100644 --- a/test/e2e/__snapshots__/service-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/service-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo service export "frodo service export --all --file my-allAlphaServices.service.json": should export all services to a single file named my-allAlphaServices.service.json 1`] = `""`; +exports[`frodo service export "frodo service export --all --file my-allAlphaServices.service.json": should export all services to a single file named my-allAlphaServices.service.json 1`] = `0`; + +exports[`frodo service export "frodo service export --all --file my-allAlphaServices.service.json": should export all services to a single file named my-allAlphaServices.service.json 2`] = `""`; exports[`frodo service export "frodo service export --all --file my-allAlphaServices.service.json": should export all services to a single file named my-allAlphaServices.service.json: my-allAlphaServices.service.json 1`] = ` { @@ -829,7 +831,9 @@ exports[`frodo service export "frodo service export --all --file my-allAlphaServ } `; -exports[`frodo service export "frodo service export --global --all -f my-allGlobalServices.service.json": should export all global services to a single file named my-allGlobalServices.service.json 1`] = `""`; +exports[`frodo service export "frodo service export --global --all -f my-allGlobalServices.service.json": should export all global services to a single file named my-allGlobalServices.service.json 1`] = `0`; + +exports[`frodo service export "frodo service export --global --all -f my-allGlobalServices.service.json": should export all global services to a single file named my-allGlobalServices.service.json 2`] = `""`; exports[`frodo service export "frodo service export --global --all -f my-allGlobalServices.service.json": should export all global services to a single file named my-allGlobalServices.service.json: my-allGlobalServices.service.json 1`] = ` { @@ -906,7 +910,9 @@ exports[`frodo service export "frodo service export --global --all -f my-allGlob } `; -exports[`frodo service export "frodo service export --global --service-id dashboard -f my-dashboard.service.json": should export the global service with id "dashboard" to the file my-dashboard.service.json 1`] = `""`; +exports[`frodo service export "frodo service export --global --service-id dashboard -f my-dashboard.service.json": should export the global service with id "dashboard" to the file my-dashboard.service.json 1`] = `0`; + +exports[`frodo service export "frodo service export --global --service-id dashboard -f my-dashboard.service.json": should export the global service with id "dashboard" to the file my-dashboard.service.json 2`] = `""`; exports[`frodo service export "frodo service export --global --service-id dashboard -f my-dashboard.service.json": should export the global service with id "dashboard" to the file my-dashboard.service.json: my-dashboard.service.json 1`] = ` { @@ -972,7 +978,9 @@ exports[`frodo service export "frodo service export --global --service-id dashbo } `; -exports[`frodo service export "frodo service export --service-id policyconfiguration -f my-policyconfiguration.service.json": should export the service with id "policyconfiguration" to the file my-policyconfiguration.service.json 1`] = `""`; +exports[`frodo service export "frodo service export --service-id policyconfiguration -f my-policyconfiguration.service.json": should export the service with id "policyconfiguration" to the file my-policyconfiguration.service.json 1`] = `0`; + +exports[`frodo service export "frodo service export --service-id policyconfiguration -f my-policyconfiguration.service.json": should export the service with id "policyconfiguration" to the file my-policyconfiguration.service.json 2`] = `""`; exports[`frodo service export "frodo service export --service-id policyconfiguration -f my-policyconfiguration.service.json": should export the service with id "policyconfiguration" to the file my-policyconfiguration.service.json: my-policyconfiguration.service.json 1`] = ` { @@ -1019,7 +1027,9 @@ exports[`frodo service export "frodo service export --service-id policyconfigura } `; -exports[`frodo service export "frodo service export -A --no-metadata --directory serviceExportTestDir4": should export all services to separate files in the directory serviceExportTestDir4 1`] = `""`; +exports[`frodo service export "frodo service export -A --no-metadata --directory serviceExportTestDir4": should export all services to separate files in the directory serviceExportTestDir4 1`] = `0`; + +exports[`frodo service export "frodo service export -A --no-metadata --directory serviceExportTestDir4": should export all services to separate files in the directory serviceExportTestDir4 2`] = `""`; exports[`frodo service export "frodo service export -A --no-metadata --directory serviceExportTestDir4": should export all services to separate files in the directory serviceExportTestDir4: serviceExportTestDir4/SocialIdentityProviders.service.json 1`] = ` { @@ -1894,7 +1904,9 @@ exports[`frodo service export "frodo service export -A --no-metadata --directory } `; -exports[`frodo service export "frodo service export -A": should export all services to separate files 1`] = `""`; +exports[`frodo service export "frodo service export -A": should export all services to separate files 1`] = `0`; + +exports[`frodo service export "frodo service export -A": should export all services to separate files 2`] = `""`; exports[`frodo service export "frodo service export -A": should export all services to separate files: SocialIdentityProviders.service.json 1`] = ` { @@ -2778,7 +2790,9 @@ exports[`frodo service export "frodo service export -A": should export all servi } `; -exports[`frodo service export "frodo service export -NaD serviceExportTestDir3": should export all services to a single file in the directory serviceExportTestDir3 1`] = `""`; +exports[`frodo service export "frodo service export -NaD serviceExportTestDir3": should export all services to a single file in the directory serviceExportTestDir3 1`] = `0`; + +exports[`frodo service export "frodo service export -NaD serviceExportTestDir3": should export all services to a single file in the directory serviceExportTestDir3 2`] = `""`; exports[`frodo service export "frodo service export -NaD serviceExportTestDir3": should export all services to a single file in the directory serviceExportTestDir3: serviceExportTestDir3/allAlphaServices.service.json 1`] = ` { @@ -3606,7 +3620,9 @@ exports[`frodo service export "frodo service export -NaD serviceExportTestDir3": } `; -exports[`frodo service export "frodo service export -Ngi dashboard -D serviceExportTestDir2": should export the global service with id "dashboard" to the directory serviceExportTestDir2 1`] = `""`; +exports[`frodo service export "frodo service export -Ngi dashboard -D serviceExportTestDir2": should export the global service with id "dashboard" to the directory serviceExportTestDir2 1`] = `0`; + +exports[`frodo service export "frodo service export -Ngi dashboard -D serviceExportTestDir2": should export the global service with id "dashboard" to the directory serviceExportTestDir2 2`] = `""`; exports[`frodo service export "frodo service export -Ngi dashboard -D serviceExportTestDir2": should export the global service with id "dashboard" to the directory serviceExportTestDir2: serviceExportTestDir2/dashboard.service.json 1`] = ` { @@ -3671,7 +3687,9 @@ exports[`frodo service export "frodo service export -Ngi dashboard -D serviceExp } `; -exports[`frodo service export "frodo service export -Ni policyconfiguration -D serviceExportTestDir1": should export the service with id "policyconfiguration" to the directory serviceExportTestDir1 1`] = `""`; +exports[`frodo service export "frodo service export -Ni policyconfiguration -D serviceExportTestDir1": should export the service with id "policyconfiguration" to the directory serviceExportTestDir1 1`] = `0`; + +exports[`frodo service export "frodo service export -Ni policyconfiguration -D serviceExportTestDir1": should export the service with id "policyconfiguration" to the directory serviceExportTestDir1 2`] = `""`; exports[`frodo service export "frodo service export -Ni policyconfiguration -D serviceExportTestDir1": should export the service with id "policyconfiguration" to the directory serviceExportTestDir1: serviceExportTestDir1/policyconfiguration.service.json 1`] = ` { @@ -3717,7 +3735,9 @@ exports[`frodo service export "frodo service export -Ni policyconfiguration -D s } `; -exports[`frodo service export "frodo service export -a": should export all services to a single file 1`] = `""`; +exports[`frodo service export "frodo service export -a": should export all services to a single file 1`] = `0`; + +exports[`frodo service export "frodo service export -a": should export all services to a single file 2`] = `""`; exports[`frodo service export "frodo service export -a": should export all services to a single file: allAlphaServices.service.json 1`] = ` { @@ -4546,7 +4566,9 @@ exports[`frodo service export "frodo service export -a": should export all servi } `; -exports[`frodo service export "frodo service export -g --all-separate": should export all global services to separate files 1`] = `""`; +exports[`frodo service export "frodo service export -g --all-separate": should export all global services to separate files 1`] = `0`; + +exports[`frodo service export "frodo service export -g --all-separate": should export all global services to separate files 2`] = `""`; exports[`frodo service export "frodo service export -g --all-separate": should export all global services to separate files: CorsService.service.json 1`] = ` { @@ -4629,7 +4651,9 @@ exports[`frodo service export "frodo service export -g --all-separate": should e } `; -exports[`frodo service export "frodo service export -ga": should export all global services to a single file 1`] = `""`; +exports[`frodo service export "frodo service export -ga": should export all global services to a single file 1`] = `0`; + +exports[`frodo service export "frodo service export -ga": should export all global services to a single file 2`] = `""`; exports[`frodo service export "frodo service export -ga": should export all global services to a single file: allGlobalServices.service.json 1`] = ` { @@ -4706,7 +4730,9 @@ exports[`frodo service export "frodo service export -ga": should export all glob } `; -exports[`frodo service export "frodo service export -gi dashboard": should export the global service with id "dashboard" 1`] = `""`; +exports[`frodo service export "frodo service export -gi dashboard": should export the global service with id "dashboard" 1`] = `0`; + +exports[`frodo service export "frodo service export -gi dashboard": should export the global service with id "dashboard" 2`] = `""`; exports[`frodo service export "frodo service export -gi dashboard": should export the global service with id "dashboard": dashboard.service.json 1`] = ` { @@ -4772,7 +4798,9 @@ exports[`frodo service export "frodo service export -gi dashboard": should expor } `; -exports[`frodo service export "frodo service export -i policyconfiguration": should export the service with id "policyconfiguration" 1`] = `""`; +exports[`frodo service export "frodo service export -i policyconfiguration": should export the service with id "policyconfiguration" 1`] = `0`; + +exports[`frodo service export "frodo service export -i policyconfiguration": should export the service with id "policyconfiguration" 2`] = `""`; exports[`frodo service export "frodo service export -i policyconfiguration": should export the service with id "policyconfiguration": policyconfiguration.service.json 1`] = ` { diff --git a/test/e2e/__snapshots__/theme-export.e2e.test.js.snap b/test/e2e/__snapshots__/theme-export.e2e.test.js.snap index 471e1eb3e..b2d465c07 100644 --- a/test/e2e/__snapshots__/theme-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/theme-export.e2e.test.js.snap @@ -1,6 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`frodo theme export "frodo theme export --all": should export all themes to a single file 1`] = `""`; +exports[`frodo theme export "frodo theme export --all": should export all themes to a single file 1`] = `0`; + +exports[`frodo theme export "frodo theme export --all": should export all themes to a single file 2`] = `""`; exports[`frodo theme export "frodo theme export --all": should export all themes to a single file: allAlphaThemes.theme.json 1`] = ` { @@ -795,7 +797,9 @@ exports[`frodo theme export "frodo theme export --all": should export all themes } `; -exports[`frodo theme export "frodo theme export --all-separate --no-metadata --directory themeExportTestDir4": should export all themes to separate files in the directory themeExportTestDir4 1`] = `""`; +exports[`frodo theme export "frodo theme export --all-separate --no-metadata --directory themeExportTestDir4": should export all themes to separate files in the directory themeExportTestDir4 1`] = `0`; + +exports[`frodo theme export "frodo theme export --all-separate --no-metadata --directory themeExportTestDir4": should export all themes to separate files in the directory themeExportTestDir4 2`] = `""`; exports[`frodo theme export "frodo theme export --all-separate --no-metadata --directory themeExportTestDir4": should export all themes to separate files in the directory themeExportTestDir4: themeExportTestDir4/Contrast.theme.json 1`] = ` { @@ -1614,7 +1618,9 @@ exports[`frodo theme export "frodo theme export --all-separate --no-metadata --d } `; -exports[`frodo theme export "frodo theme export --theme-id 86ce2f64-586d-44fe-8593-b12a85aac68d": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" 1`] = `""`; +exports[`frodo theme export "frodo theme export --theme-id 86ce2f64-586d-44fe-8593-b12a85aac68d": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" 1`] = `0`; + +exports[`frodo theme export "frodo theme export --theme-id 86ce2f64-586d-44fe-8593-b12a85aac68d": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" 2`] = `""`; exports[`frodo theme export "frodo theme export --theme-id 86ce2f64-586d-44fe-8593-b12a85aac68d": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d": 86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 1`] = ` { @@ -1709,7 +1715,9 @@ exports[`frodo theme export "frodo theme export --theme-id 86ce2f64-586d-44fe-85 } `; -exports[`frodo theme export "frodo theme export --theme-name 'Starter Theme'": should export the theme named "Starter Theme" 1`] = `""`; +exports[`frodo theme export "frodo theme export --theme-name 'Starter Theme'": should export the theme named "Starter Theme" 1`] = `0`; + +exports[`frodo theme export "frodo theme export --theme-name 'Starter Theme'": should export the theme named "Starter Theme" 2`] = `""`; exports[`frodo theme export "frodo theme export --theme-name 'Starter Theme'": should export the theme named "Starter Theme": Starter-Theme.theme.json 1`] = ` { @@ -1807,7 +1815,9 @@ exports[`frodo theme export "frodo theme export --theme-name 'Starter Theme'": s } `; -exports[`frodo theme export "frodo theme export -A": should export all themes to separate files 1`] = `""`; +exports[`frodo theme export "frodo theme export -A": should export all themes to separate files 1`] = `0`; + +exports[`frodo theme export "frodo theme export -A": should export all themes to separate files 2`] = `""`; exports[`frodo theme export "frodo theme export -A": should export all themes to separate files: Contrast.theme.json 1`] = ` { @@ -2634,7 +2644,9 @@ exports[`frodo theme export "frodo theme export -A": should export all themes to } `; -exports[`frodo theme export "frodo theme export -NaD themeExportTestDir3": should export all themes to a single file in the directory themeExportTestDir3 1`] = `""`; +exports[`frodo theme export "frodo theme export -NaD themeExportTestDir3": should export all themes to a single file in the directory themeExportTestDir3 1`] = `0`; + +exports[`frodo theme export "frodo theme export -NaD themeExportTestDir3": should export all themes to a single file in the directory themeExportTestDir3 2`] = `""`; exports[`frodo theme export "frodo theme export -NaD themeExportTestDir3": should export all themes to a single file in the directory themeExportTestDir3: themeExportTestDir3/allAlphaThemes.theme.json 1`] = ` { @@ -3425,7 +3437,9 @@ exports[`frodo theme export "frodo theme export -NaD themeExportTestDir3": shoul } `; -exports[`frodo theme export "frodo theme export -Ni 86ce2f64-586d-44fe-8593-b12a85aac68d -D themeExportTestDir2": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into a file in the directory themeExportTestDir2 1`] = `""`; +exports[`frodo theme export "frodo theme export -Ni 86ce2f64-586d-44fe-8593-b12a85aac68d -D themeExportTestDir2": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into a file in the directory themeExportTestDir2 1`] = `0`; + +exports[`frodo theme export "frodo theme export -Ni 86ce2f64-586d-44fe-8593-b12a85aac68d -D themeExportTestDir2": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into a file in the directory themeExportTestDir2 2`] = `""`; exports[`frodo theme export "frodo theme export -Ni 86ce2f64-586d-44fe-8593-b12a85aac68d -D themeExportTestDir2": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into a file in the directory themeExportTestDir2: themeExportTestDir2/86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 1`] = ` { @@ -3519,7 +3533,9 @@ exports[`frodo theme export "frodo theme export -Ni 86ce2f64-586d-44fe-8593-b12a } `; -exports[`frodo theme export "frodo theme export -Nn 'Starter Theme' -D themeExportTestDir1": should export the theme named "Starter Theme" into a file in the directory themeExportTestDir1 1`] = `""`; +exports[`frodo theme export "frodo theme export -Nn 'Starter Theme' -D themeExportTestDir1": should export the theme named "Starter Theme" into a file in the directory themeExportTestDir1 1`] = `0`; + +exports[`frodo theme export "frodo theme export -Nn 'Starter Theme' -D themeExportTestDir1": should export the theme named "Starter Theme" into a file in the directory themeExportTestDir1 2`] = `""`; exports[`frodo theme export "frodo theme export -Nn 'Starter Theme' -D themeExportTestDir1": should export the theme named "Starter Theme" into a file in the directory themeExportTestDir1: themeExportTestDir1/Starter-Theme.theme.json 1`] = ` { @@ -3613,7 +3629,9 @@ exports[`frodo theme export "frodo theme export -Nn 'Starter Theme' -D themeExpo } `; -exports[`frodo theme export "frodo theme export -a --file my-allAlphaThemes.theme.json": should export all themes to a single file named my-allAlphaThemes.theme.json 1`] = `""`; +exports[`frodo theme export "frodo theme export -a --file my-allAlphaThemes.theme.json": should export all themes to a single file named my-allAlphaThemes.theme.json 1`] = `0`; + +exports[`frodo theme export "frodo theme export -a --file my-allAlphaThemes.theme.json": should export all themes to a single file named my-allAlphaThemes.theme.json 2`] = `""`; exports[`frodo theme export "frodo theme export -a --file my-allAlphaThemes.theme.json": should export all themes to a single file named my-allAlphaThemes.theme.json: my-allAlphaThemes.theme.json 1`] = ` { @@ -4408,7 +4426,9 @@ exports[`frodo theme export "frodo theme export -a --file my-allAlphaThemes.them } `; -exports[`frodo theme export "frodo theme export -i 86ce2f64-586d-44fe-8593-b12a85aac68d -f my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into file named my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 1`] = `""`; +exports[`frodo theme export "frodo theme export -i 86ce2f64-586d-44fe-8593-b12a85aac68d -f my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into file named my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 1`] = `0`; + +exports[`frodo theme export "frodo theme export -i 86ce2f64-586d-44fe-8593-b12a85aac68d -f my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into file named my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 2`] = `""`; exports[`frodo theme export "frodo theme export -i 86ce2f64-586d-44fe-8593-b12a85aac68d -f my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json": should export the theme with id "86ce2f64-586d-44fe-8593-b12a85aac68d" into file named my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json: my-86ce2f64-586d-44fe-8593-b12a85aac68d.theme.json 1`] = ` { @@ -4503,7 +4523,9 @@ exports[`frodo theme export "frodo theme export -i 86ce2f64-586d-44fe-8593-b12a8 } `; -exports[`frodo theme export "frodo theme export -n 'Starter Theme' -f my-Starter-Theme.theme.json": should export the theme named "Starter Theme" into file named my-Starter-Theme.theme.json 1`] = `""`; +exports[`frodo theme export "frodo theme export -n 'Starter Theme' -f my-Starter-Theme.theme.json": should export the theme named "Starter Theme" into file named my-Starter-Theme.theme.json 1`] = `0`; + +exports[`frodo theme export "frodo theme export -n 'Starter Theme' -f my-Starter-Theme.theme.json": should export the theme named "Starter Theme" into file named my-Starter-Theme.theme.json 2`] = `""`; exports[`frodo theme export "frodo theme export -n 'Starter Theme' -f my-Starter-Theme.theme.json": should export the theme named "Starter Theme" into file named my-Starter-Theme.theme.json: my-tarter-Theme.theme.json 1`] = ` { diff --git a/test/e2e/esv-secret-describe.e2e.test.js b/test/e2e/esv-secret-describe.e2e.test.js index 4822e7814..54b7a6284 100644 --- a/test/e2e/esv-secret-describe.e2e.test.js +++ b/test/e2e/esv-secret-describe.e2e.test.js @@ -56,7 +56,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -76,8 +76,13 @@ describe('frodo esv secret describe', () => { test(`"frodo esv secret describe -ui esv-test-secret-pi": should describe the esv secret "esv-test-secret-pi" with usage`, async () => { const CMD = `frodo esv secret describe -ui esv-test-secret-pi`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo esv secret describe -ui esv-test-secret-pi -f ${allConfigFile}": should describe the esv secret "esv-test-secret-pi" with usage from file ${allConfigFile}`, async () => { diff --git a/test/e2e/esv-secret-list.e2e.test.js b/test/e2e/esv-secret-list.e2e.test.js index 1cb729167..a8d1199dc 100644 --- a/test/e2e/esv-secret-list.e2e.test.js +++ b/test/e2e/esv-secret-list.e2e.test.js @@ -58,7 +58,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -84,14 +84,24 @@ describe('frodo esv secret list', () => { test('"frodo esv secret list -u": should list the usage of the esv secrets', async () => { const CMD = `frodo esv secret list -u`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test('"frodo esv secret list -lu": should list the ids, active/loaded versions, statuses, descriptions, modifiers, modified times, and usage of the esv secrets', async () => { const CMD = `frodo esv secret list -lu`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo esv secret list -uf ${allConfigFile}": should list the usage of the esv secrets in the ${allConfigFile} file`, async () => { diff --git a/test/e2e/esv-variable-describe.e2e.test.js b/test/e2e/esv-variable-describe.e2e.test.js index bb1afbc21..cf4e28744 100644 --- a/test/e2e/esv-variable-describe.e2e.test.js +++ b/test/e2e/esv-variable-describe.e2e.test.js @@ -56,7 +56,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -76,8 +76,13 @@ describe('frodo esv variable describe', () => { test(`"frodo esv variable describe -ui esv-test-var-pi": should describe the esv variable "esv-test-var-pi" with usage`, async () => { const CMD = `frodo esv variable describe -ui esv-test-var-pi`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo esv variable describe -ui esv-test-var-pi -f ${allConfigFile}": should describe the esv variable "esv-test-var-pi" with usage from file ${allConfigFile}`, async () => { diff --git a/test/e2e/esv-variable-list.e2e.test.js b/test/e2e/esv-variable-list.e2e.test.js index d78914ad5..0cce627b2 100644 --- a/test/e2e/esv-variable-list.e2e.test.js +++ b/test/e2e/esv-variable-list.e2e.test.js @@ -58,7 +58,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -84,14 +84,24 @@ describe('frodo esv variable list', () => { test('"frodo esv variable list -u": should list the usage of the esv variables', async () => { const CMD = `frodo esv variable list -u`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test('"frodo esv variable list -lu": should list the ids, values, statuses, descriptions, modifiers, usage, and modified times of the esv variables', async () => { const CMD = `frodo esv variable list -lu`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo esv variable list -uf ${allConfigFile}": should list the usage of the esv variables in the ${allConfigFile} file`, async () => { diff --git a/test/e2e/promote.e2e.test.js b/test/e2e/promote.e2e.test.js index a26419498..3bdf389e7 100644 --- a/test/e2e/promote.e2e.test.js +++ b/test/e2e/promote.e2e.test.js @@ -67,34 +67,28 @@ FRODO_MOCK=record FRODO_TEST_NAME='mapping' FRODO_NO_CACHE=1 FRODO_HOST=https:// FRODO_MOCK=record FRODO_TEST_NAME='service' FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo promote -M ./test/e2e/exports/full-export-separate -E [put dir where you have the export] FRODO_MOCK=record FRODO_TEST_NAME='journeyPromoteNoPrompt' FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo promote --prune-no-prompt -M ./test/e2e/exports/full-export-separate -E [put dir where you have the export] */ -import cp from 'child_process'; -import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes, testPromote} from './utils/TestUtils'; +import { getEnv, testPromote } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; -const exec = promisify(cp.exec); - process.env['FRODO_MOCK'] = '1'; const env = getEnv(c); const sourceDir = `./test/e2e/exports/full-export-separate` -const type = 'oauth2.app'; - describe('frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*', () => { - test('"emailtemplate frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on email template changes', async () => { + test.skip('"emailtemplate frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on email template changes', async () => { let name = 'emailtemplate'; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ['./global/emailTemplate', './global/idm/emailTemplate'] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 1) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"journey frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on journey changes', async () => { + test.skip('"journey frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on journey changes', async () => { let name = "journey"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/journey", "./realm/root-bravo/journey"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 2) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); test('"authentication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on authentication changes', async () => { @@ -102,55 +96,55 @@ describe('frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp- env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/authentication", "./realm/root-bravo/authentication"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 3) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"resourcetype frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on resourcetype changes', async () => { + test.skip('"resourcetype frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on resourcetype changes', async () => { let name = "resourcetype"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/resourcetype", "./realm/root-bravo/resourcetype"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 4) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"script frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on script changes', async () => { + test.skip('"script frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on script changes', async () => { let name = "script"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/script"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 5) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"idm frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on idm changes', async () => { + test.skip('"idm frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on idm changes', async () => { let name = "idm"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./global/idm/endpoint"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 6) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"idp frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on idp changes', async () => { + test.skip('"idp frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on idp changes', async () => { let name = "idp"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/idp", "./realm/root-alpha/service"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 7) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"agent frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on agent changes', async () => { + test.skip('"agent frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on agent changes', async () => { let name = "agent"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/agent", "./realm/root-bravo/agent"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 8) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"policy frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on policy changes', async () => { + test.skip('"policy frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on policy changes', async () => { let name = "policy"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/policy"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 9) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); test('"managedapplication frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on managedapplication changes', async () => { @@ -158,23 +152,23 @@ describe('frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp- env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-alpha/managedapplication", "./realm/root-bravo/managedapplication"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 10) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"theme frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on theme changes', async () => { + test.skip('"theme frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on theme changes', async () => { let name = "theme"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./global/idm/ui", "./realm/root-bravo/theme"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 11) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"application frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on application changes', async () => { + test.skip('"application frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on application changes', async () => { let name = "application"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-bravo/application", "./realm/root-bravo/managedapplication"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 12) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); test('"variable frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on variable changes', async () => { @@ -182,15 +176,15 @@ describe('frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp- env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./global/variable"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 13) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"sync frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on sync changes', async () => { + test.skip('"sync frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on sync changes', async () => { let name = "sync"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./global/sync"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 14) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); test('"mapping frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on mapping changes', async () => { @@ -198,14 +192,14 @@ describe('frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp- env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./global/mapping", "./realm/root-bravo/journey"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 1) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); - test('"service frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on service changes', async () => { + test.skip('"service frodo promote -M ./test/e2e/exports/full-export-separate -E ./tmp/tmp-*": this should run a promote on service changes', async () => { let name = "service"; env.env.FRODO_TEST_NAME = name let modifiedDir = `./test/e2e/exports/promote/${name}`; let referenceSubDirs = ["./realm/root-bravo/service", "./realm/root-alpha/service"] - await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name, 16) + await testPromote(sourceDir, modifiedDir, referenceSubDirs, env, name) }); }); \ No newline at end of file diff --git a/test/e2e/script-describe.e2e.test.js b/test/e2e/script-describe.e2e.test.js index e2de20eea..287e2ddee 100644 --- a/test/e2e/script-describe.e2e.test.js +++ b/test/e2e/script-describe.e2e.test.js @@ -56,7 +56,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -76,8 +76,13 @@ describe('frodo script describe', () => { test(`"frodo script describe -un shared": should describe the script with name "shared" with usage`, async () => { const CMD = `frodo script describe -un shared`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo script describe -un shared -f ${allConfigFile}": should describe the script with name "shared" with usage from file ${allConfigFile}`, async () => { diff --git a/test/e2e/script-list.e2e.test.js b/test/e2e/script-list.e2e.test.js index 714508d23..d836295b2 100644 --- a/test/e2e/script-list.e2e.test.js +++ b/test/e2e/script-list.e2e.test.js @@ -58,7 +58,7 @@ FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgebloc */ import cp from 'child_process'; import { promisify } from 'util'; -import { getEnv, removeAnsiEscapeCodes } from './utils/TestUtils'; +import { getEnv, removeAnsiEscapeCodes, removeProgressBarOutput } from './utils/TestUtils'; import { connection as c } from './utils/TestConfig'; const exec = promisify(cp.exec); @@ -84,14 +84,24 @@ describe('frodo script list', () => { test('"frodo script list -u": should list the usage of the scripts', async () => { const CMD = `frodo script list -u`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test('"frodo script list -lu": should list the names, uuids, languages, contexts, usage, and descriptions of the scripts', async () => { const CMD = `frodo script list -lu`; - const { stdout } = await exec(CMD, env); - expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + try { + await exec(CMD, env); + fail("Command should've failed") + } catch (e) { + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stderr))).toMatchSnapshot(); + expect(removeProgressBarOutput(removeAnsiEscapeCodes(e.stdout))).toMatchSnapshot(); + } }); test(`"frodo script list -uf ${allConfigFile}": should list the usage of the scripts in the ${allConfigFile} file`, async () => { diff --git a/test/e2e/utils/TestUtils.js b/test/e2e/utils/TestUtils.js index 1e23b9fe4..371c3131b 100644 --- a/test/e2e/utils/TestUtils.js +++ b/test/e2e/utils/TestUtils.js @@ -56,7 +56,19 @@ export async function testExport( checkStderr = false ) { const isCurrentDirectory = directory === './' || directory === '.'; - const { stdout, stderr } = await exec(command, env); + let stdout; + let stderr; + let exitCode = 0; + try { + const output = await exec(command, env); + stdout = output.stdout; + stderr = output.stderr; + } catch (e) { + stdout = e.stdout; + stderr = e.stderr; + exitCode = e.code; + } + expect(exitCode).toMatchSnapshot(); // console.error(`stdout:\n${stdout}`); // console.error(`stderr:\n${stderr}`); const regex = new RegExp( @@ -161,17 +173,14 @@ export async function testPromote( modifiedFilesDir, referenceSubDirs, env, - name, - number, + name ) { env.env.FRODO_TEST_NAME = name const tempDir = await copyAndModifyDirectory(sourceDir, modifiedFilesDir, referenceSubDirs) const CMD = `frodo promote -M ${sourceDir} -E ${tempDir}`; const { stdout, stderr } = await exec(CMD, env); - // const exportDirectory = 'promoteTestDir'; - // const CMD2 = `frodo config export -AxND ${exportDirectory}`; - // await testExport(CMD2, env, undefined, undefined, exportDirectory, false); - + expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); + expect(removeAnsiEscapeCodes(stderr)).toMatchSnapshot(); } async function copyAndModifyDirectory(sourceDir, modifiedFilesDir, referenceSubDirs) {