@centreon/js-config 23.10.13 → 23.10.14
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 +20 -9
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -92,29 +92,35 @@ Cypress.Commands.add(
|
|
|
92
92
|
|
|
93
93
|
interface CopyFromContainerProps {
|
|
94
94
|
destination: string;
|
|
95
|
+
name?: string;
|
|
95
96
|
source: string;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
Cypress.Commands.add(
|
|
99
100
|
'copyFromContainer',
|
|
100
|
-
({
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
({
|
|
102
|
+
name = Cypress.env('dockerName'),
|
|
103
|
+
source,
|
|
104
|
+
destination
|
|
105
|
+
}: CopyFromContainerProps) => {
|
|
106
|
+
return cy.exec(`docker cp ${name}:${source} "${destination}"`);
|
|
104
107
|
}
|
|
105
108
|
);
|
|
106
109
|
|
|
107
110
|
interface CopyToContainerProps {
|
|
108
111
|
destination: string;
|
|
112
|
+
name?: string;
|
|
109
113
|
source: string;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
Cypress.Commands.add(
|
|
113
117
|
'copyToContainer',
|
|
114
|
-
({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
({
|
|
119
|
+
name = Cypress.env('dockerName'),
|
|
120
|
+
source,
|
|
121
|
+
destination
|
|
122
|
+
}: CopyToContainerProps) => {
|
|
123
|
+
return cy.exec(`docker cp ${source} ${name}:${destination}`);
|
|
118
124
|
}
|
|
119
125
|
);
|
|
120
126
|
|
|
@@ -273,26 +279,31 @@ Cypress.Commands.add(
|
|
|
273
279
|
.exec(`mkdir -p "${logDirectory}"`)
|
|
274
280
|
.copyFromContainer({
|
|
275
281
|
destination: `${logDirectory}/broker`,
|
|
282
|
+
name,
|
|
276
283
|
source: '/var/log/centreon-broker'
|
|
277
284
|
})
|
|
278
285
|
.copyFromContainer({
|
|
279
286
|
destination: `${logDirectory}/engine`,
|
|
287
|
+
name,
|
|
280
288
|
source: '/var/log/centreon-engine'
|
|
281
289
|
})
|
|
282
290
|
.copyFromContainer({
|
|
283
291
|
destination: `${logDirectory}/centreon`,
|
|
292
|
+
name,
|
|
284
293
|
source: '/var/log/centreon'
|
|
285
294
|
})
|
|
286
295
|
.then(() => {
|
|
287
296
|
if (Cypress.env('WEB_IMAGE_OS').includes('alma')) {
|
|
288
297
|
return cy.copyFromContainer({
|
|
289
298
|
destination: `${logDirectory}/php`,
|
|
299
|
+
name,
|
|
290
300
|
source: '/var/log/php-fpm'
|
|
291
301
|
});
|
|
292
302
|
}
|
|
293
303
|
|
|
294
304
|
return cy.copyFromContainer({
|
|
295
|
-
destination: `${logDirectory}/
|
|
305
|
+
destination: `${logDirectory}/php8.1-fpm-centreon-error.log`,
|
|
306
|
+
name,
|
|
296
307
|
source: '/var/log/php8.1-fpm-centreon-error.log'
|
|
297
308
|
});
|
|
298
309
|
})
|
package/package.json
CHANGED