@centreon/js-config 26.9.0 → 26.9.1
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
|
@@ -532,6 +532,8 @@ Cypress.Commands.add(
|
|
|
532
532
|
interface StartContainersProps {
|
|
533
533
|
composeFile?: string;
|
|
534
534
|
databaseImage?: string;
|
|
535
|
+
dbConfiguration?: string;
|
|
536
|
+
dbStorage?: string;
|
|
535
537
|
moduleName?: string;
|
|
536
538
|
openidImage?: string;
|
|
537
539
|
profiles?: Array<string>;
|
|
@@ -546,6 +548,8 @@ Cypress.Commands.add(
|
|
|
546
548
|
({
|
|
547
549
|
composeFile,
|
|
548
550
|
databaseImage = Cypress.env('DATABASE_IMAGE'),
|
|
551
|
+
dbConfiguration = Cypress.env('MYSQL_DB_CONFIGURATION'),
|
|
552
|
+
dbStorage = Cypress.env('MYSQL_DB_STORAGE'),
|
|
549
553
|
moduleName = 'centreon-web',
|
|
550
554
|
openidImage = `ghcr.io/centreon/centreon/keycloak:${Cypress.env(
|
|
551
555
|
'OPENID_IMAGE_VERSION'
|
|
@@ -579,6 +583,8 @@ Cypress.Commands.add(
|
|
|
579
583
|
{
|
|
580
584
|
composeFile: composeFilePath,
|
|
581
585
|
databaseImage,
|
|
586
|
+
dbConfiguration,
|
|
587
|
+
dbStorage,
|
|
582
588
|
openidImage,
|
|
583
589
|
profiles,
|
|
584
590
|
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(900_000) // 15 minutes
|
|
234
244
|
.withWaitStrategy(
|