diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-27 21:15:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-27 21:15:03 +0300 |
commit | 3538972a0a6417e01f8e44c716d061520841cbce (patch) | |
tree | 32f13d48f0c18858dade1f260e49208ad26f4c40 /spec/frontend/editor | |
parent | 1403e9bc459bcf37c9fdfb61aadd268d11b0abfd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/editor')
3 files changed, 17 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 c9010fbec0c..f9f0e56d30c 100644 --- a/spec/frontend/editor/schema/ci/ci_schema_spec.js +++ b/spec/frontend/editor/schema/ci/ci_schema_spec.js @@ -29,12 +29,14 @@ 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'; +import VariablesYaml from './yaml_tests/positive_tests/variables.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'; import RulesNegativeYaml from './yaml_tests/negative_tests/rules.yml'; +import VariablesNegativeYaml from './yaml_tests/negative_tests/variables.yml'; const ajv = new Ajv({ strictTypes: false, @@ -67,6 +69,7 @@ describe('positive tests', () => { FilterYaml, IncludeYaml, RulesYaml, + VariablesYaml, }), )('schema validates %s', (_, input) => { expect(input).toValidateJsonSchema(schema); @@ -90,6 +93,7 @@ describe('negative tests', () => { CacheNegativeYaml, IncludeNegativeYaml, RulesNegativeYaml, + VariablesNegativeYaml, }), )('schema validates %s', (_, input) => { expect(input).not.toValidateJsonSchema(schema); diff --git a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/variables.yml b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/variables.yml new file mode 100644 index 00000000000..a7f23cf0d73 --- /dev/null +++ b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/variables.yml @@ -0,0 +1,5 @@ +# invalid variable (unknown keyword is used) +variables: + FOO: + value: BAR + desc: A single value variable diff --git a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/variables.yml b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/variables.yml new file mode 100644 index 00000000000..ee71087a72e --- /dev/null +++ b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/variables.yml @@ -0,0 +1,8 @@ +variables: + TEST_VAR: "hello world!" + 123456: "123456" + FOO: + value: "BAR" + description: "A single value variable" + DEPLOY_ENVIRONMENT: + description: "A multi-value variable" |