@centreon/js-config 23.10.44 → 23.10.45
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 +14 -1
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -211,7 +211,20 @@ interface ExecInContainerProps {
|
|
|
211
211
|
Cypress.Commands.add(
|
|
212
212
|
'execInContainer',
|
|
213
213
|
({ command, name }: ExecInContainerProps): Cypress.Chainable => {
|
|
214
|
-
return cy
|
|
214
|
+
return cy
|
|
215
|
+
.exec(`docker exec -i ${name} ${command}`, { failOnNonZeroExit: false })
|
|
216
|
+
.then((result) => {
|
|
217
|
+
if (result.code) {
|
|
218
|
+
// output will not be truncated
|
|
219
|
+
throw new Error(`
|
|
220
|
+
Execution of "${command}" failed
|
|
221
|
+
Exit code: ${result.code}
|
|
222
|
+
Stdout:\n${result.stdout}
|
|
223
|
+
Stderr:\n${result.stderr}`);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return cy.wrap(result);
|
|
227
|
+
});
|
|
215
228
|
}
|
|
216
229
|
);
|
|
217
230
|
|
package/package.json
CHANGED