diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:58 +0000 |
commit | ba233a0cbad76b4783a03893e7bf4716fbc0f0ec (patch) | |
tree | ad369728c1edbe3631c8150585659078ae5d7d0b /test/schemas/negative_test/roles | |
parent | Releasing progress-linux version 6.17.2-3~progress7.99u1. (diff) | |
download | ansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.tar.xz ansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.zip |
Merging upstream version 24.6.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/schemas/negative_test/roles')
7 files changed, 87 insertions, 16 deletions
diff --git a/test/schemas/negative_test/roles/meta/argument_specs.yml.md b/test/schemas/negative_test/roles/meta/argument_specs.yml.md index 34da932..e06b00d 100644 --- a/test/schemas/negative_test/roles/meta/argument_specs.yml.md +++ b/test/schemas/negative_test/roles/meta/argument_specs.yml.md @@ -21,6 +21,7 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/meta/argument_specs.yml", diff --git a/test/schemas/negative_test/roles/meta/main.yml.md b/test/schemas/negative_test/roles/meta/main.yml.md index 2c9e99b..5ed52bf 100644 --- a/test/schemas/negative_test/roles/meta/main.yml.md +++ b/test/schemas/negative_test/roles/meta/main.yml.md @@ -39,6 +39,7 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/meta/main.yml", diff --git a/test/schemas/negative_test/roles/meta_invalid_collection/meta/main.yml.md b/test/schemas/negative_test/roles/meta_invalid_collection/meta/main.yml.md index 1b8dcd0..bea80be 100644 --- a/test/schemas/negative_test/roles/meta_invalid_collection/meta/main.yml.md +++ b/test/schemas/negative_test/roles/meta_invalid_collection/meta/main.yml.md @@ -21,6 +21,7 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/meta_invalid_collection/meta/main.yml", diff --git a/test/schemas/negative_test/roles/meta_invalid_collections/meta/main.yml.md b/test/schemas/negative_test/roles/meta_invalid_collections/meta/main.yml.md index 5d775f0..722b549 100644 --- a/test/schemas/negative_test/roles/meta_invalid_collections/meta/main.yml.md +++ b/test/schemas/negative_test/roles/meta_invalid_collections/meta/main.yml.md @@ -21,6 +21,7 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/meta_invalid_collections/meta/main.yml", diff --git a/test/schemas/negative_test/roles/meta_invalid_role_namespace/meta/main.yml.md b/test/schemas/negative_test/roles/meta_invalid_role_namespace/meta/main.yml.md index ad7e9d3..73369a2 100644 --- a/test/schemas/negative_test/roles/meta_invalid_role_namespace/meta/main.yml.md +++ b/test/schemas/negative_test/roles/meta_invalid_role_namespace/meta/main.yml.md @@ -19,15 +19,6 @@ "failingKeyword": "then" }, "schemaPath": "#/allOf/0/if" - }, - { - "instancePath": "/galaxy_info/namespace", - "keyword": "pattern", - "message": "must match pattern \"^[a-z][a-z0-9_]+$\"", - "params": { - "pattern": "^[a-z][a-z0-9_]+$" - }, - "schemaPath": "#/properties/namespace/pattern" } ] ``` @@ -39,18 +30,13 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/meta_invalid_role_namespace/meta/main.yml", "path": "$.galaxy_info", "message": "'author' is a required property", "has_sub_errors": false - }, - { - "filename": "negative_test/roles/meta_invalid_role_namespace/meta/main.yml", - "path": "$.galaxy_info.namespace", - "message": "'foo-bar' does not match '^[a-z][a-z0-9_]+$'", - "has_sub_errors": false } ], "parse_errors": [] diff --git a/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml b/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml index 81d4d3d..0e94325 100644 --- a/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml +++ b/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml @@ -11,3 +11,4 @@ galaxy_info: dependencies: - version: foo # invalid, should have at least name, role or src properties + - 1234 # invalid, needs to be a string diff --git a/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml.md b/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml.md index f09b1ac..a518b18 100644 --- a/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml.md +++ b/test/schemas/negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml.md @@ -4,6 +4,15 @@ [ { "instancePath": "/dependencies/0", + "keyword": "type", + "message": "must be string", + "params": { + "type": "string" + }, + "schemaPath": "#/properties/dependencies/items/anyOf/0/type" + }, + { + "instancePath": "/dependencies/0", "keyword": "required", "message": "must have required property 'role'", "params": { @@ -37,6 +46,38 @@ "schemaPath": "#/anyOf" }, { + "instancePath": "/dependencies/0", + "keyword": "anyOf", + "message": "must match a schema in anyOf", + "params": {}, + "schemaPath": "#/properties/dependencies/items/anyOf" + }, + { + "instancePath": "/dependencies/1", + "keyword": "type", + "message": "must be string", + "params": { + "type": "string" + }, + "schemaPath": "#/properties/dependencies/items/anyOf/0/type" + }, + { + "instancePath": "/dependencies/1", + "keyword": "type", + "message": "must be object", + "params": { + "type": "object" + }, + "schemaPath": "#/type" + }, + { + "instancePath": "/dependencies/1", + "keyword": "anyOf", + "message": "must match a schema in anyOf", + "params": {}, + "schemaPath": "#/properties/dependencies/items/anyOf" + }, + { "instancePath": "/galaxy_info", "keyword": "required", "message": "must have required property 'author'", @@ -64,6 +105,7 @@ stdout: ```json { "status": "fail", + "successes": [], "errors": [ { "filename": "negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml", @@ -72,11 +114,24 @@ stdout: "has_sub_errors": true, "best_match": { "path": "$.dependencies[0]", - "message": "'role' is a required property" + "message": "{'version': 'foo'} is not of type 'string'" + }, + "best_deep_match": { + "path": "$.dependencies[0]", + "message": "{'version': 'foo'} is not of type 'string'" }, + "num_sub_errors": 4, "sub_errors": [ { "path": "$.dependencies[0]", + "message": "{'version': 'foo'} is not of type 'string'" + }, + { + "path": "$.dependencies[0]", + "message": "{'version': 'foo'} is not valid under any of the given schemas" + }, + { + "path": "$.dependencies[0]", "message": "'role' is a required property" }, { @@ -91,6 +146,31 @@ stdout: }, { "filename": "negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml", + "path": "$.dependencies[1]", + "message": "1234 is not valid under any of the given schemas", + "has_sub_errors": true, + "best_match": { + "path": "$.dependencies[1]", + "message": "1234 is not of type 'string'" + }, + "best_deep_match": { + "path": "$.dependencies[1]", + "message": "1234 is not of type 'string'" + }, + "num_sub_errors": 1, + "sub_errors": [ + { + "path": "$.dependencies[1]", + "message": "1234 is not of type 'string'" + }, + { + "path": "$.dependencies[1]", + "message": "1234 is not of type 'object'" + } + ] + }, + { + "filename": "negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml", "path": "$.galaxy_info", "message": "'author' is a required property", "has_sub_errors": false |