@centreon/js-config 24.10.18 → 24.10.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/commands.ts +6 -0
- package/cypress/e2e/tasks.ts +16 -6
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -450,6 +450,8 @@ Cypress.Commands.add(
|
|
|
450
450
|
interface StartContainersProps {
|
|
451
451
|
composeFile?: string;
|
|
452
452
|
databaseImage?: string;
|
|
453
|
+
dbConfiguration?: string;
|
|
454
|
+
dbStorage?: string;
|
|
453
455
|
moduleName?: string;
|
|
454
456
|
openidImage?: string;
|
|
455
457
|
profiles?: Array<string>;
|
|
@@ -464,6 +466,8 @@ Cypress.Commands.add(
|
|
|
464
466
|
({
|
|
465
467
|
composeFile,
|
|
466
468
|
databaseImage = Cypress.env('DATABASE_IMAGE'),
|
|
469
|
+
dbConfiguration = Cypress.env('MYSQL_DB_CONFIGURATION'),
|
|
470
|
+
dbStorage = Cypress.env('MYSQL_DB_STORAGE'),
|
|
467
471
|
moduleName = 'centreon-web',
|
|
468
472
|
openidImage = `ghcr.io/centreon/centreon/keycloak:${Cypress.env(
|
|
469
473
|
'OPENID_IMAGE_VERSION'
|
|
@@ -494,6 +498,8 @@ Cypress.Commands.add(
|
|
|
494
498
|
{
|
|
495
499
|
composeFile: composeFilePath,
|
|
496
500
|
databaseImage,
|
|
501
|
+
dbConfiguration,
|
|
502
|
+
dbStorage,
|
|
497
503
|
openidImage,
|
|
498
504
|
profiles,
|
|
499
505
|
samlImage,
|
package/cypress/e2e/tasks.ts
CHANGED
|
@@ -210,6 +210,8 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
210
210
|
startContainers: async ({
|
|
211
211
|
composeFile,
|
|
212
212
|
databaseImage,
|
|
213
|
+
dbConfiguration,
|
|
214
|
+
dbStorage,
|
|
213
215
|
openidImage,
|
|
214
216
|
profiles,
|
|
215
217
|
samlImage,
|
|
@@ -219,16 +221,24 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
219
221
|
const composeFileDir = path.dirname(composeFile);
|
|
220
222
|
const composeFileName = path.basename(composeFile);
|
|
221
223
|
|
|
224
|
+
const environment: Record<string, string> = {
|
|
225
|
+
MYSQL_IMAGE: databaseImage,
|
|
226
|
+
OPENID_IMAGE: openidImage,
|
|
227
|
+
SAML_IMAGE: samlImage,
|
|
228
|
+
WEB_IMAGE: webImage,
|
|
229
|
+
};
|
|
230
|
+
if (dbConfiguration) {
|
|
231
|
+
environment.MYSQL_DB_CONFIGURATION = dbConfiguration;
|
|
232
|
+
}
|
|
233
|
+
if (dbStorage) {
|
|
234
|
+
environment.MYSQL_DB_STORAGE = dbStorage;
|
|
235
|
+
}
|
|
236
|
+
|
|
222
237
|
dockerEnvironment = await new DockerComposeEnvironment(
|
|
223
238
|
composeFileDir,
|
|
224
239
|
composeFileName
|
|
225
240
|
)
|
|
226
|
-
.withEnvironment(
|
|
227
|
-
MYSQL_IMAGE: databaseImage,
|
|
228
|
-
OPENID_IMAGE: openidImage,
|
|
229
|
-
SAML_IMAGE: samlImage,
|
|
230
|
-
WEB_IMAGE: webImage
|
|
231
|
-
})
|
|
241
|
+
.withEnvironment(environment)
|
|
232
242
|
.withProfiles(...profiles)
|
|
233
243
|
.withStartupTimeout(120000)
|
|
234
244
|
.withWaitStrategy(
|
package/package.json
CHANGED