diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/asset/artifact/minici.yaml | 17 | ||||
| -rw-r--r-- | test/script/artifact.et | 27 | 
2 files changed, 44 insertions, 0 deletions
| diff --git a/test/asset/artifact/minici.yaml b/test/asset/artifact/minici.yaml new file mode 100644 index 0000000..065ae84 --- /dev/null +++ b/test/asset/artifact/minici.yaml @@ -0,0 +1,17 @@ +job generate: +  checkout: null + +  shell: +    - echo "content 1" > f1 +    - mkdir subdir +    - echo "content 2" > subdir/f2 +    - echo "content 3" > f3 + +  artifact first: +    path: f1 + +  artifact second: +    path: subdir/f2 + +  artifact third: +    path: f3 diff --git a/test/script/artifact.et b/test/script/artifact.et new file mode 100644 index 0000000..f1fc74e --- /dev/null +++ b/test/script/artifact.et @@ -0,0 +1,27 @@ +module artifact + +asset scripts: +    path: ../asset/artifact + + +test ExtractArtifact: +    node n +    local: +        spawn on n as p args [ "${scripts.path}/minici.yaml", "run", "generate" ] +        expect /job-finish generate done/ from p + +    local: +        spawn on n as p args [ "${scripts.path}/minici.yaml", "extract", "generate.first", "extracted" ] +    local: +        shell on n as s: +            cat ./extracted +        expect /content 1/ from s + +    local: +        spawn on n as p args [ "${scripts.path}/minici.yaml", "extract", "generate.second", "generate.third", "." ] +    local: +        shell on n as s: +            cat ./f2 +            cat ./f3 +        expect /content 2/ from s +        expect /content 3/ from s |