From faef3d093ab75ab8353fa148b5b288f6cfd8626e Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 2 May 2020 14:03:34 +0200 Subject: [PATCH] Add test fixtures --- tests/fixtures/alpine/alpine/build.yaml | 2 ++ tests/fixtures/alpine/alpine/definition.yaml | 3 +++ tests/fixtures/upgrade_new_repo/c/build.yaml | 10 ++++++++++ tests/fixtures/upgrade_new_repo/c/definition.yaml | 3 +++ tests/fixtures/upgrade_new_repo/cat/a/a/build.yaml | 11 +++++++++++ .../fixtures/upgrade_new_repo/cat/a/a/definition.yaml | 8 ++++++++ tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml | 9 +++++++++ .../upgrade_new_repo/cat/b-1.1/definition.yaml | 3 +++ tests/fixtures/upgrade_new_repo/cat/b-1.1/generate.sh | 1 + tests/fixtures/upgrade_old_repo/c/build.yaml | 10 ++++++++++ tests/fixtures/upgrade_old_repo/c/definition.yaml | 3 +++ tests/fixtures/upgrade_old_repo/cat/a/a/build.yaml | 11 +++++++++++ .../fixtures/upgrade_old_repo/cat/a/a/definition.yaml | 8 ++++++++ tests/fixtures/upgrade_old_repo/cat/b/build.yaml | 9 +++++++++ tests/fixtures/upgrade_old_repo/cat/b/definition.yaml | 3 +++ tests/fixtures/upgrade_old_repo/cat/b/generate.sh | 1 + 16 files changed, 95 insertions(+) create mode 100644 tests/fixtures/alpine/alpine/build.yaml create mode 100644 tests/fixtures/alpine/alpine/definition.yaml create mode 100644 tests/fixtures/upgrade_new_repo/c/build.yaml create mode 100644 tests/fixtures/upgrade_new_repo/c/definition.yaml create mode 100644 tests/fixtures/upgrade_new_repo/cat/a/a/build.yaml create mode 100644 tests/fixtures/upgrade_new_repo/cat/a/a/definition.yaml create mode 100644 tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml create mode 100644 tests/fixtures/upgrade_new_repo/cat/b-1.1/definition.yaml create mode 100644 tests/fixtures/upgrade_new_repo/cat/b-1.1/generate.sh create mode 100644 tests/fixtures/upgrade_old_repo/c/build.yaml create mode 100644 tests/fixtures/upgrade_old_repo/c/definition.yaml create mode 100644 tests/fixtures/upgrade_old_repo/cat/a/a/build.yaml create mode 100644 tests/fixtures/upgrade_old_repo/cat/a/a/definition.yaml create mode 100644 tests/fixtures/upgrade_old_repo/cat/b/build.yaml create mode 100644 tests/fixtures/upgrade_old_repo/cat/b/definition.yaml create mode 100644 tests/fixtures/upgrade_old_repo/cat/b/generate.sh diff --git a/tests/fixtures/alpine/alpine/build.yaml b/tests/fixtures/alpine/alpine/build.yaml new file mode 100644 index 00000000..19a2ec56 --- /dev/null +++ b/tests/fixtures/alpine/alpine/build.yaml @@ -0,0 +1,2 @@ +image: "alpine" +unpack: true diff --git a/tests/fixtures/alpine/alpine/definition.yaml b/tests/fixtures/alpine/alpine/definition.yaml new file mode 100644 index 00000000..cf8247ba --- /dev/null +++ b/tests/fixtures/alpine/alpine/definition.yaml @@ -0,0 +1,3 @@ +category: "seed" +name: "alpine" +version: "1.0" diff --git a/tests/fixtures/upgrade_new_repo/c/build.yaml b/tests/fixtures/upgrade_new_repo/c/build.yaml new file mode 100644 index 00000000..dc3fba0a --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/c/build.yaml @@ -0,0 +1,10 @@ +prelude: + - echo foo > /test + - echo bar > /test2 +steps: + - echo c > /c + - echo c > /cd +requires: +- category: "test" + name: "a" + version: ">=1.0" diff --git a/tests/fixtures/upgrade_new_repo/c/definition.yaml b/tests/fixtures/upgrade_new_repo/c/definition.yaml new file mode 100644 index 00000000..348454f7 --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/c/definition.yaml @@ -0,0 +1,3 @@ +category: "test" +name: "c" +version: "1.0" diff --git a/tests/fixtures/upgrade_new_repo/cat/a/a/build.yaml b/tests/fixtures/upgrade_new_repo/cat/a/a/build.yaml new file mode 100644 index 00000000..b9fe4c1d --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/cat/a/a/build.yaml @@ -0,0 +1,11 @@ +image: "alpine" +prelude: + - echo foo > /test + - echo bar > /test2 +steps: + - echo artifact3 > /test3 + - echo artifact4 > /test4 +requires: +- category: "test" + name: "b" + version: "1.0" diff --git a/tests/fixtures/upgrade_new_repo/cat/a/a/definition.yaml b/tests/fixtures/upgrade_new_repo/cat/a/a/definition.yaml new file mode 100644 index 00000000..a419363d --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/cat/a/a/definition.yaml @@ -0,0 +1,8 @@ +category: "test" +name: "a" +version: "1.1" +requires: +- category: "test2" + name: "b" + version: "1.0" + diff --git a/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml b/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml new file mode 100644 index 00000000..3e3f98a4 --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml @@ -0,0 +1,9 @@ +image: "alpine" +prelude: + - echo foo > /test + - echo bar > /test2 + - chmod +x generate.sh +steps: + - echo artifact5 > /newc + - echo artifact6 > /newnewc + - ./generate.sh diff --git a/tests/fixtures/upgrade_new_repo/cat/b-1.1/definition.yaml b/tests/fixtures/upgrade_new_repo/cat/b-1.1/definition.yaml new file mode 100644 index 00000000..e695c6c9 --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/cat/b-1.1/definition.yaml @@ -0,0 +1,3 @@ +category: "test" +name: "b" +version: "1.1" diff --git a/tests/fixtures/upgrade_new_repo/cat/b-1.1/generate.sh b/tests/fixtures/upgrade_new_repo/cat/b-1.1/generate.sh new file mode 100644 index 00000000..3b2dc1b2 --- /dev/null +++ b/tests/fixtures/upgrade_new_repo/cat/b-1.1/generate.sh @@ -0,0 +1 @@ +echo generated > /sonewc diff --git a/tests/fixtures/upgrade_old_repo/c/build.yaml b/tests/fixtures/upgrade_old_repo/c/build.yaml new file mode 100644 index 00000000..dc3fba0a --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/c/build.yaml @@ -0,0 +1,10 @@ +prelude: + - echo foo > /test + - echo bar > /test2 +steps: + - echo c > /c + - echo c > /cd +requires: +- category: "test" + name: "a" + version: ">=1.0" diff --git a/tests/fixtures/upgrade_old_repo/c/definition.yaml b/tests/fixtures/upgrade_old_repo/c/definition.yaml new file mode 100644 index 00000000..348454f7 --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/c/definition.yaml @@ -0,0 +1,3 @@ +category: "test" +name: "c" +version: "1.0" diff --git a/tests/fixtures/upgrade_old_repo/cat/a/a/build.yaml b/tests/fixtures/upgrade_old_repo/cat/a/a/build.yaml new file mode 100644 index 00000000..b9fe4c1d --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/cat/a/a/build.yaml @@ -0,0 +1,11 @@ +image: "alpine" +prelude: + - echo foo > /test + - echo bar > /test2 +steps: + - echo artifact3 > /test3 + - echo artifact4 > /test4 +requires: +- category: "test" + name: "b" + version: "1.0" diff --git a/tests/fixtures/upgrade_old_repo/cat/a/a/definition.yaml b/tests/fixtures/upgrade_old_repo/cat/a/a/definition.yaml new file mode 100644 index 00000000..a419363d --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/cat/a/a/definition.yaml @@ -0,0 +1,8 @@ +category: "test" +name: "a" +version: "1.1" +requires: +- category: "test2" + name: "b" + version: "1.0" + diff --git a/tests/fixtures/upgrade_old_repo/cat/b/build.yaml b/tests/fixtures/upgrade_old_repo/cat/b/build.yaml new file mode 100644 index 00000000..05a81578 --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/cat/b/build.yaml @@ -0,0 +1,9 @@ +image: "alpine" +prelude: + - echo foo > /test + - echo bar > /test2 + - chmod +x generate.sh +steps: + - echo artifact5 > /test5 + - echo artifact6 > /test6 + - ./generate.sh \ No newline at end of file diff --git a/tests/fixtures/upgrade_old_repo/cat/b/definition.yaml b/tests/fixtures/upgrade_old_repo/cat/b/definition.yaml new file mode 100644 index 00000000..b02a44e8 --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/cat/b/definition.yaml @@ -0,0 +1,3 @@ +category: "test" +name: "b" +version: "1.0" diff --git a/tests/fixtures/upgrade_old_repo/cat/b/generate.sh b/tests/fixtures/upgrade_old_repo/cat/b/generate.sh new file mode 100644 index 00000000..b67417f6 --- /dev/null +++ b/tests/fixtures/upgrade_old_repo/cat/b/generate.sh @@ -0,0 +1 @@ +echo generated > /artifact42