Unverified Commit 5ece662b authored by Tom Moulard's avatar Tom Moulard
Browse files

test: adding a patch when config is not good

parent ea97fe26
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -18,5 +18,7 @@ jobs:
      - uses: actions/upload-artifact@v1
        if: failure()
        with:
          name: logs
          path: log.log
 No newline at end of file
          name: test-artifacts
          path: |
            log.log
            test_patch.patch
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@ blog/nginx/conf/www
gitlab/logs
portainer/data
.env
*.patch
+8 −1
Original line number Diff line number Diff line
@@ -28,7 +28,14 @@ test ()

test dc config -q

file=$(mktemp) && dc config > $file 2>$log_file && test diff test_config.yml $file && rm $file
file=$(mktemp)
dc config > $file 2>$log_file
test diff test_config.yml $file
rm $file

# Creating a patch to fix test_config.yml
dc config > test_config.yml
git diff > test_patch.patch

[ $errors -gt 0 ] && echo "There were $errors errors found" && exit 1