container-structure-test icon indicating copy to clipboard operation
container-structure-test copied to clipboard

Setup in command test fails to create dir or touch file

Open vishalsangave opened this issue 6 years ago • 1 comments

I tried setup to create an file which is required to be present or mapped from outside while running the docker image. I tired touch and mkdir but the file is not created. Can you please help me.

- name: "cli command with Config map"
  setup: [[ "mkdir", "/data/vishal" ]]
  command: "ls"
  args: ["-a"]
  expectedError: [""]
  expectedOutput: ["vishal"]

--- FAIL
stdout: .
..
Error: Expected string 'vishal' not found in output '.
..
'

vishalsangave avatar Aug 01 '19 17:08 vishalsangave

More info about this, /data is volume in Image that can be mounted from outside. /data is the current working directory for all commands we send.

vishalsangave avatar Aug 07 '19 08:08 vishalsangave