@centreon/js-config 23.10.20 → 23.10.22
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 +27 -17
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -103,12 +103,15 @@ interface CopyFromContainerProps {
|
|
|
103
103
|
|
|
104
104
|
Cypress.Commands.add(
|
|
105
105
|
'copyFromContainer',
|
|
106
|
-
(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
(
|
|
107
|
+
{
|
|
108
|
+
name = Cypress.env('dockerName'),
|
|
109
|
+
source,
|
|
110
|
+
destination
|
|
111
|
+
}: CopyFromContainerProps,
|
|
112
|
+
options
|
|
113
|
+
) => {
|
|
114
|
+
return cy.exec(`docker cp ${name}:${source} "${destination}"`, options);
|
|
112
115
|
}
|
|
113
116
|
);
|
|
114
117
|
|
|
@@ -120,12 +123,15 @@ interface CopyToContainerProps {
|
|
|
120
123
|
|
|
121
124
|
Cypress.Commands.add(
|
|
122
125
|
'copyToContainer',
|
|
123
|
-
(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
(
|
|
127
|
+
{
|
|
128
|
+
name = Cypress.env('dockerName'),
|
|
129
|
+
source,
|
|
130
|
+
destination
|
|
131
|
+
}: CopyToContainerProps,
|
|
132
|
+
options
|
|
133
|
+
) => {
|
|
134
|
+
return cy.exec(`docker cp ${source} ${name}:${destination}`, options);
|
|
129
135
|
}
|
|
130
136
|
);
|
|
131
137
|
|
|
@@ -324,12 +330,16 @@ Cypress.Commands.add(
|
|
|
324
330
|
});
|
|
325
331
|
}
|
|
326
332
|
|
|
327
|
-
return cy.copyFromContainer(
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
333
|
+
return cy.copyFromContainer(
|
|
334
|
+
{
|
|
335
|
+
destination: `${logDirectory}/php8.1-fpm-centreon-error.log`,
|
|
336
|
+
name,
|
|
337
|
+
source: '/var/log/php8.1-fpm-centreon-error.log'
|
|
338
|
+
},
|
|
339
|
+
{ failOnNonZeroExit: false }
|
|
340
|
+
);
|
|
332
341
|
})
|
|
342
|
+
.exec(`chmod -R 755 "${logDirectory}"`)
|
|
333
343
|
.stopContainer({ name });
|
|
334
344
|
}
|
|
335
345
|
);
|
package/package.json
CHANGED