From 247e1ab03dca1af6891d4b86718751541a2d9d82 Mon Sep 17 00:00:00 2001 From: ssube Date: Sat, 2 Nov 2019 10:59:10 -0500 Subject: [PATCH] fix(tests): add gitlab CI test snippet, move test snippets into test dir --- scripts/test-examples.sh | 2 +- test/examples/gitlab-ci-some.yml | 28 +++++++++++++++++++ .../examples}/kubernetes-resources-high.yml | 0 .../examples}/kubernetes-resources-low.yml | 0 .../examples}/kubernetes-resources-med.yml | 0 .../examples}/kubernetes-resources-none.yml | 0 .../examples}/kubernetes-resources-some.yml | 0 7 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 test/examples/gitlab-ci-some.yml rename {examples => test/examples}/kubernetes-resources-high.yml (100%) rename {examples => test/examples}/kubernetes-resources-low.yml (100%) rename {examples => test/examples}/kubernetes-resources-med.yml (100%) rename {examples => test/examples}/kubernetes-resources-none.yml (100%) rename {examples => test/examples}/kubernetes-resources-some.yml (100%) diff --git a/scripts/test-examples.sh b/scripts/test-examples.sh index 165f8e5..1eab956 100755 --- a/scripts/test-examples.sh +++ b/scripts/test-examples.sh @@ -1,6 +1,6 @@ #! /bin/sh -EXAMPLES="$(find ./examples -name '*.yml')" +EXAMPLES="$(find ./test/examples -name '*.yml')" for example in ${EXAMPLES}; do diff --git a/test/examples/gitlab-ci-some.yml b/test/examples/gitlab-ci-some.yml new file mode 100644 index 0000000..9afcb58 --- /dev/null +++ b/test/examples/gitlab-ci-some.yml @@ -0,0 +1,28 @@ +# test rules gitlab-ci +# test tags gitlab +# test exit-status 2 + +stages: + - build + - package + +before_script: + - echo "this is a terrible idea!" + +--- + +stages: + - build + - package + +build-node: + stage: build + script: [] + +image-alpine: + stage: package + # missing script + +image-stretch: + stage: package + script: [] \ No newline at end of file diff --git a/examples/kubernetes-resources-high.yml b/test/examples/kubernetes-resources-high.yml similarity index 100% rename from examples/kubernetes-resources-high.yml rename to test/examples/kubernetes-resources-high.yml diff --git a/examples/kubernetes-resources-low.yml b/test/examples/kubernetes-resources-low.yml similarity index 100% rename from examples/kubernetes-resources-low.yml rename to test/examples/kubernetes-resources-low.yml diff --git a/examples/kubernetes-resources-med.yml b/test/examples/kubernetes-resources-med.yml similarity index 100% rename from examples/kubernetes-resources-med.yml rename to test/examples/kubernetes-resources-med.yml diff --git a/examples/kubernetes-resources-none.yml b/test/examples/kubernetes-resources-none.yml similarity index 100% rename from examples/kubernetes-resources-none.yml rename to test/examples/kubernetes-resources-none.yml diff --git a/examples/kubernetes-resources-some.yml b/test/examples/kubernetes-resources-some.yml similarity index 100% rename from examples/kubernetes-resources-some.yml rename to test/examples/kubernetes-resources-some.yml