From c5f325e580540d81903360920094aafcc6ad4008 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sun, 31 Dec 2023 00:49:58 +0100 Subject: add goss --- tests/command.yaml | 13 +++++++++++++ tests/http.yaml | 34 ++++++++++++++++++++++++++++++++++ tests/package.yaml | 6 ++++++ tests/process.yaml | 4 ++++ tests/user.yaml | 8 ++++++++ 5 files changed, 65 insertions(+) create mode 100644 tests/command.yaml create mode 100644 tests/http.yaml create mode 100644 tests/package.yaml create mode 100644 tests/process.yaml create mode 100644 tests/user.yaml (limited to 'tests') diff --git a/tests/command.yaml b/tests/command.yaml new file mode 100644 index 0000000..69133ef --- /dev/null +++ b/tests/command.yaml @@ -0,0 +1,13 @@ +--- +command: + 'curl --version': + exit-status: 0 + stderr: [] + stdout: + - curl + + 'bsdtar --version': + exit-status: 0 + stderr: [] + stdout: + - bsdtar diff --git a/tests/http.yaml b/tests/http.yaml new file mode 100644 index 0000000..45aa2bb --- /dev/null +++ b/tests/http.yaml @@ -0,0 +1,34 @@ +--- +http: + http://0.0.0.0:8010/v2/info: + status: 200 + url: http://0.0.0.0:8010/v2/info + no-follow-redirects: true + timeout: 10000 + method: GET + body: + - '{"software":{"name":"LanguageTool"' + + http://0.0.0.0:8010/v2/languages: + status: 200 + url: http://0.0.0.0:8010/v2/languages + no-follow-redirects: true + timeout: 10000 + method: GET + request-headers: + - "accept: application/json" + body: + - '{"name":"Arabic","code":"ar","longCode":"ar"}' + + http://0.0.0.0:8010/v2/check: + status: 200 + url: http://0.0.0.0:8010/v2/check + no-follow-redirects: true + timeout: 10000 + method: POST + request-headers: + - "accept: application/json" + - "content-type: application/x-www-form-urlencoded" + request-body: 'text=hello%20woorld&language=en-US&motherTongue=de-DE&enabledOnly=false' + body: + - This sentence does not start with an uppercase letter diff --git a/tests/package.yaml b/tests/package.yaml new file mode 100644 index 0000000..bcc88f7 --- /dev/null +++ b/tests/package.yaml @@ -0,0 +1,6 @@ +--- +package: + curl: + installed: true + libarchive-tools: + installed: true diff --git a/tests/process.yaml b/tests/process.yaml new file mode 100644 index 0000000..2d08c86 --- /dev/null +++ b/tests/process.yaml @@ -0,0 +1,4 @@ +--- +process: + java: + running: true diff --git a/tests/user.yaml b/tests/user.yaml new file mode 100644 index 0000000..5da4197 --- /dev/null +++ b/tests/user.yaml @@ -0,0 +1,8 @@ +--- +user: + languagetool: + exists: true + groups: + - languagetool + home: /home/languagetool + shell: /bin/bash -- cgit v1.2.3