@centreon/js-config 25.10.17 → 25.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 +19 -7
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -451,6 +451,8 @@ Cypress.Commands.add(
|
|
|
451
451
|
interface StartContainersProps {
|
|
452
452
|
composeFile?: string;
|
|
453
453
|
databaseImage?: string;
|
|
454
|
+
dbConfiguration?: string;
|
|
455
|
+
dbStorage?: string;
|
|
454
456
|
moduleName?: string;
|
|
455
457
|
openidImage?: string;
|
|
456
458
|
profiles?: Array<string>;
|
|
@@ -465,6 +467,8 @@ Cypress.Commands.add(
|
|
|
465
467
|
({
|
|
466
468
|
composeFile,
|
|
467
469
|
databaseImage = Cypress.env('DATABASE_IMAGE'),
|
|
470
|
+
dbConfiguration = Cypress.env('MYSQL_DB_CONFIGURATION'),
|
|
471
|
+
dbStorage = Cypress.env('MYSQL_DB_STORAGE'),
|
|
468
472
|
moduleName = 'centreon-web',
|
|
469
473
|
openidImage = `ghcr.io/centreon/centreon/keycloak:${Cypress.env(
|
|
470
474
|
'OPENID_IMAGE_VERSION'
|
|
@@ -495,6 +499,8 @@ Cypress.Commands.add(
|
|
|
495
499
|
{
|
|
496
500
|
composeFile: composeFilePath,
|
|
497
501
|
databaseImage,
|
|
502
|
+
dbConfiguration,
|
|
503
|
+
dbStorage,
|
|
498
504
|
openidImage,
|
|
499
505
|
profiles,
|
|
500
506
|
samlImage,
|
package/cypress/e2e/tasks.ts
CHANGED
|
@@ -206,7 +206,9 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
206
206
|
name,
|
|
207
207
|
portBindings = [],
|
|
208
208
|
}: StartContainerProps) => {
|
|
209
|
-
let container = await new GenericContainer(image)
|
|
209
|
+
let container = await new GenericContainer(image)
|
|
210
|
+
.withName(name)
|
|
211
|
+
.withAddedCapabilities('SYS_NICE');
|
|
210
212
|
|
|
211
213
|
portBindings.forEach(({ source, destination }) => {
|
|
212
214
|
container = container.withExposedPorts({
|
|
@@ -228,6 +230,8 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
228
230
|
startContainers: async ({
|
|
229
231
|
composeFile,
|
|
230
232
|
databaseImage,
|
|
233
|
+
dbConfiguration,
|
|
234
|
+
dbStorage,
|
|
231
235
|
openidImage,
|
|
232
236
|
profiles,
|
|
233
237
|
samlImage,
|
|
@@ -237,16 +241,24 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
237
241
|
const composeFileDir = path.dirname(composeFile);
|
|
238
242
|
const composeFileName = path.basename(composeFile);
|
|
239
243
|
|
|
244
|
+
const environment: Record<string, string> = {
|
|
245
|
+
MYSQL_IMAGE: databaseImage,
|
|
246
|
+
OPENID_IMAGE: openidImage,
|
|
247
|
+
SAML_IMAGE: samlImage,
|
|
248
|
+
WEB_IMAGE: webImage,
|
|
249
|
+
};
|
|
250
|
+
if (dbConfiguration) {
|
|
251
|
+
environment.MYSQL_DB_CONFIGURATION = dbConfiguration;
|
|
252
|
+
}
|
|
253
|
+
if (dbStorage) {
|
|
254
|
+
environment.MYSQL_DB_STORAGE = dbStorage;
|
|
255
|
+
}
|
|
256
|
+
|
|
240
257
|
dockerEnvironment = await new DockerComposeEnvironment(
|
|
241
258
|
composeFileDir,
|
|
242
259
|
composeFileName,
|
|
243
260
|
)
|
|
244
|
-
.withEnvironment(
|
|
245
|
-
MYSQL_IMAGE: databaseImage,
|
|
246
|
-
OPENID_IMAGE: openidImage,
|
|
247
|
-
SAML_IMAGE: samlImage,
|
|
248
|
-
WEB_IMAGE: webImage,
|
|
249
|
-
})
|
|
261
|
+
.withEnvironment(environment)
|
|
250
262
|
.withProfiles(...profiles)
|
|
251
263
|
.withStartupTimeout(120000)
|
|
252
264
|
.withWaitStrategy(
|
package/package.json
CHANGED