diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-12 00:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-12 00:09:14 +0300 |
commit | 0f079aa28d93f40ad7fda398fb2280c3e358098d (patch) | |
tree | bc67abda12fd05a9712cd0bd97f82e33eb6c927f /spec/frontend/editor | |
parent | 603ee53dbdbd3adaced752e1a119eb40d64e9979 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/editor')
3 files changed, 47 insertions, 0 deletions
diff --git a/spec/frontend/editor/schema/ci/ci_schema_spec.js b/spec/frontend/editor/schema/ci/ci_schema_spec.js index c59806a5d60..b9d2426c33d 100644 --- a/spec/frontend/editor/schema/ci/ci_schema_spec.js +++ b/spec/frontend/editor/schema/ci/ci_schema_spec.js @@ -24,12 +24,14 @@ import ReleaseAssetsLinksMissingJson from './json_tests/negative_tests/release_a import RetryUnknownWhenJson from './json_tests/negative_tests/retry_unknown_when.json'; // YAML POSITIVE TEST +import ArtifactsYaml from './yaml_tests/positive_tests/artifacts.yml'; import CacheYaml from './yaml_tests/positive_tests/cache.yml'; import FilterYaml from './yaml_tests/positive_tests/filter.yml'; import IncludeYaml from './yaml_tests/positive_tests/include.yml'; import RulesYaml from './yaml_tests/positive_tests/rules.yml'; // YAML NEGATIVE TEST +import ArtifactsNegativeYaml from './yaml_tests/negative_tests/artifacts.yml'; import CacheNegativeYaml from './yaml_tests/negative_tests/cache.yml'; import IncludeNegativeYaml from './yaml_tests/negative_tests/include.yml'; @@ -63,6 +65,7 @@ describe('positive tests', () => { FilterYaml, IncludeYaml, RulesYaml, + ArtifactsYaml, }), )('schema validates %s', (_, input) => { expect(input).toValidateJsonSchema(schema); @@ -84,6 +87,7 @@ describe('negative tests', () => { // YAML CacheNegativeYaml, IncludeNegativeYaml, + ArtifactsNegativeYaml, }), )('schema validates %s', (_, input) => { expect(input).not.toValidateJsonSchema(schema); diff --git a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml new file mode 100644 index 00000000000..f5670376efc --- /dev/null +++ b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml @@ -0,0 +1,18 @@ +# invalid artifact:reports:cyclonedx + +cyclonedx no paths: + artifacts: + reports: + cyclonedx: + +cyclonedx not a report: + artifacts: + cyclonedx: foo + +cyclonedx not an array or string: + artifacts: + reports: + cyclonedx: + paths: + - foo + - bar diff --git a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml new file mode 100644 index 00000000000..20c1fc2c50f --- /dev/null +++ b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml @@ -0,0 +1,25 @@ +# valid artifact:reports:cyclonedx + +cyclonedx string path: + artifacts: + reports: + cyclonedx: foo + +cyclonedx glob path: + artifacts: + reports: + cyclonedx: "*.foo" + +cylonedx list of string paths: + artifacts: + reports: + cyclonedx: + - foo + - ./bar/baz + +cylonedx mixed list of string paths and globs: + artifacts: + reports: + cyclonedx: + - ./foo + - "bar/*.baz" |