From 81d4db02133fce97349468750cbc77f3d7a09d29 Mon Sep 17 00:00:00 2001 From: Elie CHARRA Date: Fri, 23 Jun 2017 15:36:18 +0200 Subject: [PATCH] Add label test --- tests/goss.yaml | 9 +++++++++ tests/units/nginx.yml | 2 ++ 2 files changed, 11 insertions(+) diff --git a/tests/goss.yaml b/tests/goss.yaml index e5b7955..85c7b89 100644 --- a/tests/goss.yaml +++ b/tests/goss.yaml @@ -4,3 +4,12 @@ http: timeout: 5000 body: - Welcome to nginx! +command: + docker inspect nginx: + # required attributes + exit-status: 0 + # optional attributes + stdout: + - "\"test_label\": \"foo1234\"" + stderr: [] + timeout: 10000 # in milliseconds diff --git a/tests/units/nginx.yml b/tests/units/nginx.yml index 813c918..20b7917 100644 --- a/tests/units/nginx.yml +++ b/tests/units/nginx.yml @@ -2,6 +2,8 @@ systemd_units: - name: nginx template_name: templates/test-systemd image: nginx:1.11 + labels: + - test_label=foo1234 host_copy: - src: units/data/test.conf dest: