-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a949ea
commit 9f3e7be
Showing
5 changed files
with
47 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ export const applyOpenShiftYaml = (yamlContent: string) => { | |
} | ||
return result; | ||
}); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 23 additions & 23 deletions
46
frontend/src/__tests__/cypress/cypress/utils/oc_commands/dspa.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
import { replacePlaceholdersInYaml } from "../yaml_files"; | ||
import { applyOpenShiftYaml } from "./baseCommands"; | ||
import { replacePlaceholdersInYaml } from '~/__tests__/cypress/cypress/utils/yaml_files'; | ||
import { applyOpenShiftYaml } from './baseCommands'; | ||
|
||
/** | ||
* Try to create a DSPA Secret based on the dspaSecretReplacements config | ||
* @param dspaSecretReplacements Dictionary with the config values | ||
* Dict Structure: | ||
* Dict Structure: | ||
* dspaSecretReplacements = { | ||
* DSPA_SECRET_NAME: <DSPA SECRET NAME>, | ||
* NAMESPACE: <PROJECT NAME>, | ||
* AWS_ACCESS_KEY_ID: <AWS ACCESS KEY ID>, | ||
* AWS_SECRET_ACCESS_KEY: <AWS SECRET>, | ||
* } | ||
* @param yamlFilePath | ||
* @param yamlFilePath | ||
*/ | ||
export const createDSPASecret = ( | ||
dspaSecretReplacements: { [key: string]: string }, | ||
yamlFilePath: string = 'resources/yaml/dspa_secret.yml' | ||
) => { | ||
cy.fixture(yamlFilePath).then((yamlContent) => { | ||
const modifiedYamlContent = replacePlaceholdersInYaml(yamlContent, dspaSecretReplacements); | ||
applyOpenShiftYaml(modifiedYamlContent).then((result) => { | ||
return result; | ||
}); | ||
dspaSecretReplacements: { [key: string]: string }, | ||
yamlFilePath = 'resources/yaml/dspa_secret.yml', | ||
) => { | ||
cy.fixture(yamlFilePath).then((yamlContent) => { | ||
const modifiedYamlContent = replacePlaceholdersInYaml(yamlContent, dspaSecretReplacements); | ||
applyOpenShiftYaml(modifiedYamlContent).then((result) => { | ||
return result; | ||
}); | ||
}); | ||
}; | ||
|
||
/** | ||
* Try to create a DSPA based on the dspaReplacements config | ||
* @param dspaReplacements Dictionary with the config values | ||
* Dict Structure: | ||
* Dict Structure: | ||
* dspaSecretReplacements = { | ||
* DSPA_SECRET_NAME: <DSPA SECRET NAME>, | ||
* NAMESPACE: <PROJECT NAME>, | ||
* AWS_S3_BUCKET: <AWS BUCKET NAME> | ||
* } | ||
* @param yamlFilePath | ||
* @param yamlFilePath | ||
*/ | ||
export const createDSPA = ( | ||
dspaReplacements: { [key: string]: string }, | ||
yamlFilePath: string = 'resources/yaml/dspa.yml' | ||
) => { | ||
cy.fixture(yamlFilePath).then((yamlContent) => { | ||
const modifiedYamlContent = replacePlaceholdersInYaml(yamlContent, dspaReplacements); | ||
applyOpenShiftYaml(modifiedYamlContent).then((result) => { | ||
return result; | ||
}); | ||
dspaReplacements: { [key: string]: string }, | ||
yamlFilePath = 'resources/yaml/dspa.yml', | ||
) => { | ||
cy.fixture(yamlFilePath).then((yamlContent) => { | ||
const modifiedYamlContent = replacePlaceholdersInYaml(yamlContent, dspaReplacements); | ||
applyOpenShiftYaml(modifiedYamlContent).then((result) => { | ||
return result; | ||
}); | ||
}; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters