return;
}
cy.log(`Cleaning ${createdResources.length} previously created resource(s).`);
- createdResources.forEach(function ({ suffix, uuid }) {
+ // delete them in FIFO order because later created resources may
+ // be linked to the earlier ones.
+ createdResources.reverse().forEach(function ({ suffix, uuid }) {
// Don't fail when a resource isn't already there, some objects may have
// been removed, directly or indirectly, from the test that created them.
cy.deleteResource(systemToken, suffix, uuid, false);
import { ContainerRequestResource } from "./container-request";
import { MountType, MountKind } from 'models/mount-types';
-import { WorkflowResource, parseWorkflowDefinition, getWorkflow } from 'models/workflow';
+import { WorkflowResource, parseWorkflowDefinition, getWorkflow, CwlSecrets } from 'models/workflow';
import { WorkflowInputsData } from './workflow';
export type ProcessResource = ContainerRequestResource;
export const MOUNT_PATH_CWL_WORKFLOW = '/var/lib/cwl/workflow.json';
export const MOUNT_PATH_CWL_INPUT = '/var/lib/cwl/cwl.input.json';
-export interface CwlSecrets {
- class: 'http://commonwl.org/cwltool#Secrets';
- secrets: string[];
-}
export const createWorkflowMounts = (workflow: WorkflowResource, inputs: WorkflowInputsData): { [path: string]: MountType } => {
import { Resource, ResourceKind } from "./resource";
import { safeLoad } from 'js-yaml';
import { CommandOutputParameter } from "cwlts/mappings/v1.0/CommandOutputParameter";
-import { CwlSecrets } from 'models/process';
export interface WorkflowResource extends Resource {
kind: ResourceKind.WORKFLOW;
: undefined;
};
+export interface CwlSecrets {
+ class: 'http://commonwl.org/cwltool#Secrets';
+ secrets: string[];
+}
+
export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition) => {
if (!workflowDefinition) { return undefined; }
const wf = getWorkflow(workflowDefinition);
jest.mock("models/process", () => ({
createWorkflowMounts: jest.fn(),
+ createWorkflowSecretMounts: jest.fn(),
}));
jest.mock("redux-form", () => ({
expect(services.containerRequestService.create).toHaveBeenCalledWith({
command: [
"arvados-cwl-runner",
- "--api=containers",
"--local",
+ "--api=containers",
+ "--no-log-timestamps",
+ "--disable-color",
"--project-uuid=zzzzz-tpzed-yid70bw31f51234",
"/var/lib/cwl/workflow.json#main",
"/var/lib/cwl/cwl.input.json",
cwd: "/var/spool/cwl",
description: "basicFormTestDescription",
mounts: undefined,
+ secret_mounts: undefined,
name: "basicFormTestName",
outputName: "Output from basicFormTestName",
outputPath: "/var/spool/cwl",