diff --git a/.github/workflows/docker-goss.yaml b/.github/workflows/docker-goss.yaml index 198dcb558..3df31839c 100644 --- a/.github/workflows/docker-goss.yaml +++ b/.github/workflows/docker-goss.yaml @@ -18,7 +18,7 @@ jobs: permissions: packages: write contents: read - security-events: write # To upload Trivy sarif files + security-events: write # To upload Trivy sarif files steps: - name: Checkout diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 000000000..802c0eeef --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,17 @@ +name: Validate YAML + +on: + push: + branches: + - master + pull_request: + paths: + - "**/*.ya?ml" + +jobs: + validate-yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Validate YAML file + run: make lint-yaml diff --git a/.yamllint b/.yamllint index 8aeea49b0..d575ab3fb 100644 --- a/.yamllint +++ b/.yamllint @@ -1,8 +1,27 @@ --- extends: default +ignore: + # uses go templates (these are invalid yaml files) + - integration-tests/goss/goss-service.yaml + - integration-tests/goss/goss-shared.yaml + - docs/goss.yaml + rules: + braces: + min-spaces-inside: 0 + max-spaces-inside: 1 # required for schema.yaml + brackets: + min-spaces-inside: 0 + max-spaces-inside: 1 # required for schema.yaml + comments-indentation: disable + indentation: + spaces: consistent + indent-sequences: consistent line-length: disable + document-start: disable truthy: allowed-values: - - on + - "on" # required for github workflows + - "false" + - "true" diff --git a/Makefile b/Makefile index 724e66187..ee89dabcb 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,11 @@ dcgoss-sha256: kgoss-sha256: cd extras/kgoss/ && sha256sum kgoss > kgoss.sha256 +.PHONY: lint-yaml +lint-yaml: + $(info INFO: Starting $@) + yamllint -c .yamllint . + $(PYTHON): $(info Creating virtualenv in $(VENV)) @python -m venv $(VENV) diff --git a/docs/goss.yaml b/docs/goss.yaml index 61b47f508..a155c67dd 100644 --- a/docs/goss.yaml +++ b/docs/goss.yaml @@ -16,7 +16,7 @@ command: stdout: - go version go1.6 linux/amd64 stderr: [] - timeout: 10000 # in milliseconds + timeout: 10000 # in milliseconds skip: false dns: @@ -64,7 +64,7 @@ group: gid: 65534 nobody: exists: true - + http: https://www.google.com: @@ -190,14 +190,14 @@ user: home: /var/lib/nfs shell: /sbin/nologin skip: false - + nobody: exists: true uid: lt: 500 groups: consist-of: [nobody] - + sshd: title: UID must be between 50-100, GID doesn't matter. home is flexible meta: @@ -216,7 +216,3 @@ user: - /var/run/sshd # https://github.com/goss-org/goss/blob/master/README.md#manually-editing-goss-files - - - - diff --git a/docs/myapp_gossfile.yaml b/docs/myapp_gossfile.yaml index c5d79f5d9..74e42d2f1 100644 --- a/docs/myapp_gossfile.yaml +++ b/docs/myapp_gossfile.yaml @@ -1,2 +1,2 @@ # This is a sample file referenced by goss.yaml -# Used for render test and Json schema validation. \ No newline at end of file +# Used for render test and Json schema validation. diff --git a/docs/schema.yaml b/docs/schema.yaml index 4a5ac7310..661ae527d 100644 --- a/docs/schema.yaml +++ b/docs/schema.yaml @@ -242,12 +242,12 @@ definitions: key-file: type: string default: "" - description: | + description: | private-key file to use for authentication (used with cert-file) proxy: type: string default: "" - description: | + description: | proxy server to proxy traffic through. Proxy can also be set with environment variables http_proxy. skip: type: boolean @@ -256,8 +256,8 @@ definitions: type: string default: PUT description: http method - enum: # See https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods - # Note: not yet clear whether goss supports all methods + enum: # See https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods + # Note: not yet clear whether goss supports all methods - GET - PUT - HEAD @@ -281,8 +281,8 @@ definitions: items: type: string default: - - 172.17.0.2/16 - - fe80::42:acff:fe11:2/64 + - 172.17.0.2/16 + - fe80::42:acff:fe11:2/64 mtu: type: integer default: 1500 @@ -303,15 +303,15 @@ definitions: meta: { "$ref":"#/definitions/meta" } content: anyOf: - - type: string - default: "some string" - - type: array - default: - - 2 - - type: object - default: - foo: bar - baz: ring + - type: string + default: "some string" + - type: array + default: + - 2 + - type: object + default: + foo: bar + baz: ring matches: anyOf: - type: integer @@ -333,8 +333,8 @@ definitions: items: type: string default: - - rw - - relatime + - rw + - relatime source: type: string default: /dev/mapper/fedora-home @@ -360,12 +360,12 @@ definitions: default: true versions: oneOf: - - type: object # matcher + - type: object # matcher - type: array items: type: string default: - - 2.2.15 + - 2.2.15 skip: type: boolean default: false @@ -384,7 +384,7 @@ definitions: items: type: string default: - - 0.0.0.0 + - 0.0.0.0 skip: type: boolean default: false @@ -419,7 +419,7 @@ definitions: - exists properties: title: { "$ref": "#/definitions/title" } - meta: { "$ref": "#/definitions/meta" } + meta: { "$ref": "#/definitions/meta" } exists: type: boolean default: true @@ -442,7 +442,7 @@ definitions: items: type: string default: - - nfsnobody + - nfsnobody home: anyOf: - { "$ref": "#/definitions/matchingTest" } @@ -460,15 +460,15 @@ type: "object" properties: addr: - type: object - description: "Validates if a remote address:port are accessible." - examples: - - tcp://ip-address-or-domain-name:80: - reachable: true - timeout: 500 - local-address: 127.0.0.1 - additionalProperties: - $ref: "#/definitions/addrTest" + type: object + description: "Validates if a remote address:port are accessible." + examples: + - tcp://ip-address-or-domain-name:80: + reachable: true + timeout: 500 + local-address: 127.0.0.1 + additionalProperties: + $ref: "#/definitions/addrTest" command: type: object @@ -477,348 +477,345 @@ properties: $ref: "#/definitions/commandTest" dns: - type: object - description: "Validates that the provided address is resolvable and the addrs it resolves to." - x-intellij-html-description: | -
Validates that the provided address is resolvable and the addrs it resolves to.
-dns:
- localhost:
- # required attributes
- resolvable: true
- # optional attributes
- addrs:
- - 127.0.0.1
- - ::1
- server: 8.8.8.8 # Also supports server:port
- timeout: 500 # in milliseconds (Only used when server attribute is provided)
dns:
+ localhost:
+ # required attributes
+ resolvable: true
+ # optional attributes
+ addrs:
+ - 127.0.0.1
+ - ::1
+ server: 8.8.8.8 # Also supports server:port
+ timeout: 500 # in milliseconds (Only used when server attribute is provided)
It is possible to validate the following types of DNS records, but requires the server
attribute be set:
To validate specific DNS address types, prepend the hostname with the type and a colon, a few examples:
-dns:
- # Validate a CNAME record
- CNAME:c.dnstest.io:
- resolvable: true
- server: 208.67.222.222
- addrs:
- - "a.dnstest.io."
-
- # Validate a PTR record
- PTR:8.8.8.8:
- resolvable: true
- server: 8.8.8.8
- addrs:
- - "dns.google."
-
- # Validate and SRV record
- SRV:_https._tcp.dnstest.io:
- resolvable: true
- server: 208.67.222.222
- addrs:
- - "0 5 443 a.dnstest.io."
- - "10 10 443 b.dnstest.io."
Please note that if you want localhost
to only resolve 127.0.0.1
you'll need to use Advanced Matchers
dns:
- localhost:
- resolvable: true
- addrs:
- consist-of: [127.0.0.1]
- timeout: 500 # in milliseconds
- additionalProperties:
- $ref: "#/definitions/dnsTest"
+ server: 8.8.8.8 # Also supports server:port
+ timeout: 500 # in milliseconds (Only used when server attribute is provided)" tabindex="0" role="button" style="display: none;">
+
+
+
+
It is possible to validate the following types of DNS records, but requires the server
attribute be set:
To validate specific DNS address types, prepend the hostname with the type and a colon, a few examples:
+dns:
+ # Validate a CNAME record
+ CNAME:c.dnstest.io:
+ resolvable: true
+ server: 208.67.222.222
+ addrs:
+ - "a.dnstest.io."
+
+ # Validate a PTR record
+ PTR:8.8.8.8:
+ resolvable: true
+ server: 8.8.8.8
+ addrs:
+ - "dns.google."
+
+ # Validate and SRV record
+ SRV:_https._tcp.dnstest.io:
+ resolvable: true
+ server: 208.67.222.222
+ addrs:
+ - "0 5 443 a.dnstest.io."
+ - "10 10 443 b.dnstest.io."
Please note that if you want localhost
to only resolve 127.0.0.1
you'll need to use Advanced Matchers
dns:
+ localhost:
+ resolvable: true
+ addrs:
+ consist-of: [127.0.0.1]
+ timeout: 500 # in milliseconds
+ additionalProperties:
+ $ref: "#/definitions/dnsTest"
file:
- type: object
- description: "Validates the state of a file, directory, or symbolic link"
- additionalProperties:
- $ref: "#/definitions/fileTest"
+ type: object
+ description: "Validates the state of a file, directory, or symbolic link"
+ additionalProperties:
+ $ref: "#/definitions/fileTest"
gossfile:
- type: object
- description: |
- Import other gossfiles from this one. This is the best way to maintain a large number of tests, and/or create profiles. See render for more examples. Glob patterns can be also be used to specify matching gossfiles.
- You can specify the gossfile(s) either as the resource key, or using the 'file' attribute.
-
- If the 'skip' attribute is true, then the file is not processed. If the filename is a glob pattern, then none of the matching files are processed. Note that this is not the same as skipping the contained resources; any overrides in the referenced gossfile will not be processed, and the resource count will not be incremented. Skipping a gossfile include is the same as omitting the gossfile resource entirely.
- x-intellij-html-description: |
- Import other gossfiles from this one. This is the best way to maintain a large number of tests, and/or create profiles. See render for more examples. Glob patterns can be also be used to specify matching gossfiles.
- gossfile:
- myapplication:
- file: myapp_gossfile.yaml
- skip: false
- *.yaml:
- skip: true
- goss_httpd.yaml: {}
- /etc/goss.d/*.yaml: {}
-
-
- You can specify the gossfile(s) either as the resource key, or using the 'file' attribute.
- If the 'skip' attribute is true, then the file is not processed. If the filename is a glob pattern, then none of the matching files are processed. Note that this is not the same as skipping the contained resources; any overrides in the referenced gossfile will not be processed, and the resource count will not be incremented. Skipping a gossfile include is the same as omitting the gossfile resource entirely.
- additionalProperties:
- $ref: "#/definitions/gossfileTest"
+ type: object
+ description: |
+ Import other gossfiles from this one. This is the best way to maintain a large number of tests, and/or create profiles. See render for more examples. Glob patterns can be also be used to specify matching gossfiles.
+ You can specify the gossfile(s) either as the resource key, or using the 'file' attribute.
+
+ If the 'skip' attribute is true, then the file is not processed. If the filename is a glob pattern, then none of the matching files are processed. Note that this is not the same as skipping the contained resources; any overrides in the referenced gossfile will not be processed, and the resource count will not be incremented. Skipping a gossfile include is the same as omitting the gossfile resource entirely.
+ x-intellij-html-description: |
+ Import other gossfiles from this one. This is the best way to maintain a large number of tests, and/or create profiles. See render for more examples. Glob patterns can be also be used to specify matching gossfiles.
+ gossfile:
+ myapplication:
+ file: myapp_gossfile.yaml
+ skip: false
+ *.yaml:
+ skip: true
+ goss_httpd.yaml: {}
+ /etc/goss.d/*.yaml: {}
+
+
+ You can specify the gossfile(s) either as the resource key, or using the 'file' attribute.
+ If the 'skip' attribute is true, then the file is not processed. If the filename is a glob pattern, then none of the matching files are processed. Note that this is not the same as skipping the contained resources; any overrides in the referenced gossfile will not be processed, and the resource count will not be incremented. Skipping a gossfile include is the same as omitting the gossfile resource entirely.
+ additionalProperties:
+ $ref: "#/definitions/gossfileTest"
group:
- type: object
- description: "Validates the state of a group"
- additionalProperties:
- $ref: "#/definitions/groupTest"
+ type: object
+ description: "Validates the state of a group"
+ additionalProperties:
+ $ref: "#/definitions/groupTest"
http:
- type: object
- description: "description: Validates network interface values"
- additionalProperties:
- $ref: "#/definitions/httpTest"
+ type: object
+ description: "description: Validates network interface values"
+ additionalProperties:
+ $ref: "#/definitions/httpTest"
interface:
- type: object
- description: "test "
- additionalProperties:
- $ref: "#/definitions/interfaceTest"
+ type: object
+ description: "test "
+ additionalProperties:
+ $ref: "#/definitions/interfaceTest"
kernel-param:
- type: object
- description: "test "
- additionalProperties:
- $ref: "#/definitions/kernelParamTest"
+ type: object
+ description: "test "
+ additionalProperties:
+ $ref: "#/definitions/kernelParamTest"
matching:
- type: object
- description: "Validates specified content against a matcher. Best used with Templates."
- x-intellij-html-description: |
- Validates specified content against a matcher. Best used with Templates.
- Templates:
- With Let's say we have a data.json
file that gets generated as part of some testing pipeline:
- {
- "instance_count": 14,
- "failures": 3,
- "status": "FAIL"
- }
-
-
-
-
-
- This could then be passed into goss: goss --vars data.json validate
- And then validated against:
- matching:
- check_instance_count: # Make sure there is at least one instance
- content: {{ .Vars.instance_count }}
- matches:
- gt: 0
-
- check_failure_count_from_all_instance: # expect no failures
- content: {{ .Vars.failures }}
- matches: 0
-
- check_status:
- content: {{ .Vars.status }}
- matches:
- - not: FAIL
-
-
- Templates:
- Without matching:
- has_substr: # friendly test name
- content: some string
- matches:
- match-regexp: some str
- has_2:
- content:
- - 2
- matches:
- contain-element: 2
- has_foo_bar_and_baz:
- content:
- foo: bar
- baz: bing
- matches:
- and:
- - have-key-with-value:
- foo: bar
- - have-key: baz
-
-
+ type: object
+ description: "Validates specified content against a matcher. Best used with Templates."
+ x-intellij-html-description: |
+ Validates specified content against a matcher. Best used with Templates.
+ Templates:
+ With Let's say we have a data.json
file that gets generated as part of some testing pipeline:
+ {
+ "instance_count": 14,
+ "failures": 3,
+ "status": "FAIL"
+ }
+
+
+
+
+
+ This could then be passed into goss: goss --vars data.json validate
+ And then validated against:
+ matching:
+ check_instance_count: # Make sure there is at least one instance
+ content: {{ .Vars.instance_count }}
+ matches:
+ gt: 0
+
+ check_failure_count_from_all_instance: # expect no failures
+ content: {{ .Vars.failures }}
+ matches: 0
+
+ check_status:
+ content: {{ .Vars.status }}
+ matches:
+ - not: FAIL
+
+
+ Templates:
+ Without matching:
+ has_substr: # friendly test name
+ content: some string
+ matches:
+ match-regexp: some str
+ has_2:
+ content:
+ - 2
+ matches:
+ contain-element: 2
+ has_foo_bar_and_baz:
+ content:
+ foo: bar
+ baz: bing
+ matches:
+ and:
+ - have-key-with-value:
+ foo: bar
+ - have-key: baz
+
+
- additionalProperties:
+ additionalProperties:
$ref: "#/definitions/matchTest"
mount:
- type: object
- description: "Validates mount point attributes."
- additionalProperties:
- $ref: "#/definitions/mountTest"
+ type: object
+ description: "Validates mount point attributes."
+ additionalProperties:
+ $ref: "#/definitions/mountTest"
package:
- type: object
- description: |
- Validates the state of a package"
- NOTE: this check uses the --package parameter passed on the command line.
- additionalProperties:
- $ref: "#/definitions/packageTest"
+ type: object
+ description: |
+ Validates the state of a package"
+ NOTE: this check uses the --package parameter passed on the command line.
+ additionalProperties:
+ $ref: "#/definitions/packageTest"
port:
- type: object
- description: |
- Validates the state of a local port.
-
- Note: Goss might consider your port to be listening on tcp6 rather than tcp, try running goss add port .. to see how goss detects it. (explanation)
- x-intellij-html-description: |
- Validates the state of a local port.
- Note: Goss might consider your port to be listening on tcp6
rather than tcp
, try running goss add port ..
to see how goss detects it. (explanation)
- port:
- # {tcp,tcp6,udp,udp6}:port_num
- tcp:22:
- # required attributes
- listening: true
- # optional attributes
- ip: # what IP(s) is it listening on
- - 0.0.0.0
- skip: false
- additionalProperties:
- $ref: "#/definitions/portTest"
+ type: object
+ description: |
+ Validates the state of a local port.
+
+ Note: Goss might consider your port to be listening on tcp6 rather than tcp, try running goss add port .. to see how goss detects it. (explanation)
+ x-intellij-html-description: |
+ Validates the state of a local port.
+ Note: Goss might consider your port to be listening on tcp6
rather than tcp
, try running goss add port ..
to see how goss detects it. (explanation)
+ port:
+ # {tcp,tcp6,udp,udp6}:port_num
+ tcp:22:
+ # required attributes
+ listening: true
+ # optional attributes
+ ip: # what IP(s) is it listening on
+ - 0.0.0.0
+ skip: false
+ additionalProperties:
+ $ref: "#/definitions/portTest"
process:
- type: object
- description: "Validates if a process is running."
- additionalProperties:
- $ref: "#/definitions/processTest"
+ type: object
+ description: "Validates if a process is running."
+ additionalProperties:
+ $ref: "#/definitions/processTest"
service:
- type: object
- description: "Validates the state of a service."
- additionalProperties:
- $ref: "#/definitions/serviceTest"
+ type: object
+ description: "Validates the state of a service."
+ additionalProperties:
+ $ref: "#/definitions/serviceTest"
user:
- type: object
- description: |
- Validates the state of a user"
- NOTE: This check is inspecting the contents of local passwd file /etc/passwd, this does not validate remote users (e.g. LDAP).
- additionalProperties:
- $ref: "#/definitions/userTest"
-
-
+ type: object
+ description: |
+ Validates the state of a user"
+ NOTE: This check is inspecting the contents of local passwd file /etc/passwd, this does not validate remote users (e.g. LDAP).
+ additionalProperties:
+ $ref: "#/definitions/userTest"
diff --git a/docs/vars.yaml b/docs/vars.yaml
index 19e03b8aa..d8e6cdd6e 100644
--- a/docs/vars.yaml
+++ b/docs/vars.yaml
@@ -2,4 +2,4 @@
# Used for render test and Json schema validation.
instance_count: 1
failures: 0
-status: "PASS"
\ No newline at end of file
+status: "PASS"
diff --git a/examples/goss_awesome_gomega.yaml b/examples/goss_awesome_gomega.yaml
index 1a9a54aa8..e59f4b0f8 100644
--- a/examples/goss_awesome_gomega.yaml
+++ b/examples/goss_awesome_gomega.yaml
@@ -95,9 +95,9 @@ matching:
- contain-element:
have-prefix: 'moo'
- contain-elements:
- - not: 'this_doesnt_exist'
- - lt: 20
- - have-prefix: 'moo'
+ - not: 'this_doesnt_exist'
+ - lt: 20
+ - have-prefix: 'moo'
test_reader_as_single_string:
@@ -110,8 +110,8 @@ matching:
as-reader: true
matches:
and:
- - le: 250
- - ge: 20
+ - le: 250
+ - ge: 20
test_gjson_transform:
diff --git a/extras/dcgoss/docker-compose.yml b/extras/dcgoss/docker-compose.yml
index 90813cbdc..62aba21c8 100644
--- a/extras/dcgoss/docker-compose.yml
+++ b/extras/dcgoss/docker-compose.yml
@@ -1,28 +1,28 @@
version: '3.3'
services:
- db:
- image: mysql:5.7
- volumes:
- - db_data:/var/lib/mysql
- restart: always
- environment:
- MYSQL_ROOT_PASSWORD: somewordpress
- MYSQL_DATABASE: wordpress
- MYSQL_USER: wordpress
- MYSQL_PASSWORD: wordpress
+ db:
+ image: mysql:5.7
+ volumes:
+ - db_data:/var/lib/mysql
+ restart: always
+ environment:
+ MYSQL_ROOT_PASSWORD: somewordpress
+ MYSQL_DATABASE: wordpress
+ MYSQL_USER: wordpress
+ MYSQL_PASSWORD: wordpress
- wordpress:
- depends_on:
- - db
- image: wordpress:latest
- ports:
- - "8000:80"
- restart: always
- environment:
- WORDPRESS_DB_HOST: db:3306
- WORDPRESS_DB_USER: wordpress
- WORDPRESS_DB_PASSWORD: wordpress
- WORDPRESS_DB_NAME: wordpress
+ wordpress:
+ depends_on:
+ - db
+ image: wordpress:latest
+ ports:
+ - "8000:80"
+ restart: always
+ environment:
+ WORDPRESS_DB_HOST: db:3306
+ WORDPRESS_DB_USER: wordpress
+ WORDPRESS_DB_PASSWORD: wordpress
+ WORDPRESS_DB_NAME: wordpress
volumes:
- db_data: {}
+ db_data: {}
diff --git a/integration-tests/goss/alpine3/goss.yaml b/integration-tests/goss/alpine3/goss.yaml
index 2a19e2e45..57b689bb1 100644
--- a/integration-tests/goss/alpine3/goss.yaml
+++ b/integration-tests/goss/alpine3/goss.yaml
@@ -32,4 +32,3 @@ gossfile:
"../goss-s*.yaml": {}
bypath:
file: "../goss-dummy.yaml"
-
diff --git a/integration-tests/goss/arch/goss.yaml b/integration-tests/goss/arch/goss.yaml
index 50fad0d0c..c03c07bc8 100644
--- a/integration-tests/goss/arch/goss.yaml
+++ b/integration-tests/goss/arch/goss.yaml
@@ -20,4 +20,3 @@ gossfile:
"../goss-shared.yaml": {}
bypath:
file: "../goss-dummy.yaml"
-
diff --git a/integration-tests/goss/goss-dummy.yaml b/integration-tests/goss/goss-dummy.yaml
index 241f9ef5e..339d255b2 100644
--- a/integration-tests/goss/goss-dummy.yaml
+++ b/integration-tests/goss/goss-dummy.yaml
@@ -1,4 +1,3 @@
-
---
command:
includetest:
diff --git a/integration-tests/goss/goss-shared.yaml b/integration-tests/goss/goss-shared.yaml
index 42e8a5e75..d0a993276 100644
--- a/integration-tests/goss/goss-shared.yaml
+++ b/integration-tests/goss/goss-shared.yaml
@@ -293,4 +293,3 @@ gossfile:
skip: true
bypath:
file: "goss-dummy.yaml"
-
diff --git a/integration-tests/goss/trusty/goss.yaml b/integration-tests/goss/trusty/goss.yaml
index ef6931160..97738c926 100644
--- a/integration-tests/goss/trusty/goss.yaml
+++ b/integration-tests/goss/trusty/goss.yaml
@@ -32,4 +32,3 @@ gossfile:
"../goss-s*.yaml": {}
bypath:
file: "../goss-dummy.yaml"
-
diff --git a/integration-tests/goss/wheezy/goss.yaml b/integration-tests/goss/wheezy/goss.yaml
index c83ed1d0e..23cad4045 100644
--- a/integration-tests/goss/wheezy/goss.yaml
+++ b/integration-tests/goss/wheezy/goss.yaml
@@ -32,4 +32,3 @@ gossfile:
"../goss-s*.yaml": {}
bypath:
file: "../goss-dummy.yaml"
-
diff --git a/integration-tests/goss/windows/commands/add.goss.yaml b/integration-tests/goss/windows/commands/add.goss.yaml
index d65d1899f..3df6e627c 100644
--- a/integration-tests/goss/windows/commands/add.goss.yaml
+++ b/integration-tests/goss/windows/commands/add.goss.yaml
@@ -8,4 +8,3 @@ command:
- "timeout: 500"
stderr: []
timeout: 5000
-
diff --git a/mkdocs.yml b/mkdocs.yml
index 7156db5e6..3110deda9 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -47,8 +47,8 @@ plugins:
- macros:
render_by_default: false
- exclude:
- glob:
- - requirements.txt
+ glob:
+ - requirements.txt
markdown_extensions:
- abbr
diff --git a/testdata/matching_basic.yaml b/testdata/matching_basic.yaml
index 67af512ad..b58f93be5 100644
--- a/testdata/matching_basic.yaml
+++ b/testdata/matching_basic.yaml
@@ -53,9 +53,9 @@ matching:
matches:
and:
- contain-elements: [foo, bar]
- - [foo, bar] # same as above
- - equal: [foo, bar, moo] # order matters, exact match
- - consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
+ - [foo, bar] # same as above
+ - equal: [foo, bar, moo] # order matters, exact match
+ - consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
- contain-element:
have-prefix: b
- contain-element:
@@ -107,11 +107,11 @@ matching:
and:
- not:
contain-elements: [fox, box]
- - not: [fox, bax] # same as above
+ - not: [fox, bax] # same as above
- not:
- equal: [fox, bax, mox] # order matters, exact match
+ equal: [fox, bax, mox] # order matters, exact match
- not:
- consist-of: [have-suffix: x, have-prefix: t, box] # order doesn't matter, can use matchers
+ consist-of: [have-suffix: x, have-prefix: t, box] # order doesn't matter, can use matchers
- not:
contain-element:
have-prefix: x
diff --git a/testdata/matching_basic_failing.yaml b/testdata/matching_basic_failing.yaml
index 1d2351149..d201fbe8c 100644
--- a/testdata/matching_basic_failing.yaml
+++ b/testdata/matching_basic_failing.yaml
@@ -44,13 +44,13 @@ matching:
content: '1.2.3'
matches:
or:
- - semver-constraint: '>=9.9.0'
+ - semver-constraint: '>=9.9.0'
basic_len:
content: "123"
matches:
or:
- - have-len: 2
+ - have-len: 2
basic_int:
content: 42
@@ -72,9 +72,9 @@ matching:
matches:
or:
- contain-elements: [fox, box]
- - [fox, bax] # same as above
- - equal: [fox, bax, mox] # order matters, exact match
- - consist-of: [fox, have-prefix: t, box] # order doesn't matter, can use matchers
+ - [fox, bax] # same as above
+ - equal: [fox, bax, mox] # order matters, exact match
+ - consist-of: [fox, have-prefix: t, box] # order doesn't matter, can use matchers
- contain-element:
have-prefix: x
- contain-element:
@@ -83,7 +83,7 @@ matching:
basic_array_consists_of:
content: [foo, bar, moo]
matches:
- consist-of: [fox, have-prefix: t, box] # order doesn't matter, can use matchers
+ consist-of: [fox, have-prefix: t, box] # order doesn't matter, can use matchers
basic_reader:
as-reader: true
@@ -163,11 +163,11 @@ matching:
- not:
contain-elements: [foo, bar]
- not:
- [foo, bar] # same as above
+ [foo, bar] # same as above
- not:
- equal: [foo, bar, moo] # order matters, exact match
+ equal: [foo, bar, moo] # order matters, exact match
- not:
- consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
+ consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
- not:
contain-element:
have-prefix: b
@@ -182,7 +182,7 @@ matching:
content: [foo, bar, moo]
matches:
not:
- consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
+ consist-of: [foo, have-prefix: m, bar] # order doesn't matter, can use matchers
negated_basic_reader:
as-reader: true
diff --git a/testdata/matching_transformers.yaml b/testdata/matching_transformers.yaml
index e30100714..56a4fe08a 100644
--- a/testdata/matching_transformers.yaml
+++ b/testdata/matching_transformers.yaml
@@ -65,9 +65,9 @@ matching:
- contain-element:
have-prefix: 'moo'
- contain-elements:
- - not: 'this_doesnt_exist'
- - lt: 20
- - have-prefix: 'moo'
+ - not: 'this_doesnt_exist'
+ - lt: 20
+ - have-prefix: 'moo'
test_reader_using_array:
content: |
@@ -91,8 +91,8 @@ matching:
as-reader: true
matches:
and:
- - le: 250
- - ge: 20
+ - le: 250
+ - ge: 20
test_gjson_transform:
@@ -126,4 +126,4 @@ matching:
# or tests MarshalJSON
or:
- contain-elements:
- - have-key: 'nested'
+ - have-key: 'nested'
diff --git a/testdata/matching_transformers_failing.yaml b/testdata/matching_transformers_failing.yaml
index f49482ba0..1e216b5d8 100644
--- a/testdata/matching_transformers_failing.yaml
+++ b/testdata/matching_transformers_failing.yaml
@@ -65,9 +65,9 @@ matching:
- contain-element:
have-prefix: 'too'
- contain-elements:
- - not: 'moo cow'
- - lt: 10
- - have-prefix: 'tow'
+ - not: 'moo cow'
+ - lt: 10
+ - have-prefix: 'tow'
test_reader_as_single_string:
@@ -80,8 +80,8 @@ matching:
as-reader: true
matches:
and:
- - le: 20
- - ge: 50
+ - le: 20
+ - ge: 50
test_gjson_transform_simple:
@@ -159,4 +159,4 @@ matching:
matches:
gjson:
'@this':
- - have-key: "arr"
+ - have-key: "arr"