projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18284: Make vm cypress test users unique to avoid race conditions
[arvados-workbench2.git]
/
cypress
/
support
/
commands.js
diff --git
a/cypress/support/commands.js
b/cypress/support/commands.js
index 07290e550aa3b6beceba61559a477216ef220435..cfdfa9ecffb0e94c2262d0f580b8222f3d7b2c72 100644
(file)
--- a/
cypress/support/commands.js
+++ b/
cypress/support/commands.js
@@
-150,6
+150,15
@@
Cypress.Commands.add(
}
)
}
)
+Cypress.Commands.add(
+ "createVirtualMachine", (token, data) => {
+ return cy.createResource(token, 'virtual_machines', {
+ virtual_machine: JSON.stringify(data),
+ ensure_unique_name: true
+ })
+ }
+)
+
Cypress.Commands.add(
"createResource", (token, suffix, data) => {
return cy.doRequest('POST', '/arvados/v1/' + suffix, data, null, token, true)
Cypress.Commands.add(
"createResource", (token, suffix, data) => {
return cy.doRequest('POST', '/arvados/v1/' + suffix, data, null, token, true)
@@
-318,4
+327,4
@@
function b64toBlob(b64Data, contentType = '', sliceSize = 512) {
const blob = new Blob(byteArrays, { type: contentType });
return blob
const blob = new Blob(byteArrays, { type: contentType });
return blob
-}
\ No newline at end of file
+}