Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/editor')
-rw-r--r--spec/frontend/editor/schema/ci/json_tests/positive_tests/gitlab-ci.json2
-rw-r--r--spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml40
-rw-r--r--spec/frontend/editor/schema/ci/yaml_tests/negative_tests/rules.yml5
-rw-r--r--spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml20
-rw-r--r--spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml4
5 files changed, 67 insertions, 4 deletions
diff --git a/spec/frontend/editor/schema/ci/json_tests/positive_tests/gitlab-ci.json b/spec/frontend/editor/schema/ci/json_tests/positive_tests/gitlab-ci.json
index 666a4852957..17a1b4474b6 100644
--- a/spec/frontend/editor/schema/ci/json_tests/positive_tests/gitlab-ci.json
+++ b/spec/frontend/editor/schema/ci/json_tests/positive_tests/gitlab-ci.json
@@ -107,7 +107,6 @@
"container_scanning": "scan2.json",
"dast": "dast.json",
"license_management": "license.json",
- "performance": "performance.json",
"metrics": "metrics.txt"
}
},
@@ -160,7 +159,6 @@
"container_scanning": ["scan2.json"],
"dast": ["dast.json"],
"license_management": ["license.json"],
- "performance": ["performance.json"],
"metrics": ["metrics.txt"]
}
},
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
index 29f4a0cd76d..996a48f7bc6 100644
--- a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml
+++ b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/artifacts.yml
@@ -1,5 +1,30 @@
-# invalid artifact:reports:cyclonedx
+# invalid artifact:reports:browser_performance
+browser_performance no paths:
+ artifacts:
+ reports:
+ browser_performance:
+
+## Lists (or globs) are not allowed!
+browser_performance list of string paths:
+ artifacts:
+ reports:
+ browser_performance:
+ - foo
+ - ./bar/baz
+
+browser_performance mixed list of string paths and globs:
+ artifacts:
+ reports:
+ browser_performance:
+ - ./foo
+ - "bar/*.baz"
+
+browser_performance string array:
+ artifacts:
+ reports:
+ browser_performance: ["foo", "blah"]
+# invalid artifact:reports:cyclonedx
cyclonedx no paths:
artifacts:
reports:
@@ -17,6 +42,19 @@ cyclonedx not an array or string:
- foo
- bar
+# invalid artifacts:reports:coverage_report
+coverage-report-is-string:
+ artifacts:
+ reports:
+ coverage_report: cobertura
+
+# invalid artifact:reports:performance
+# Superceded by: artifact:reports:browser_performance
+performance string path:
+ artifacts:
+ reports:
+ performance: foo
+
# invalid artifacts:when
artifacts-when-unknown:
artifacts:
diff --git a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/rules.yml b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/rules.yml
index d74a681b23b..f4a08492574 100644
--- a/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/rules.yml
+++ b/spec/frontend/editor/schema/ci/yaml_tests/negative_tests/rules.yml
@@ -12,3 +12,8 @@ wrong path declaration:
rules:
- changes:
paths: { file: 'DOCKER' }
+
+# invalid rules:if
+rules-if-empty:
+ rules:
+ - if: \ No newline at end of file
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
index a5c9153ee13..70761a09b58 100644
--- a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml
+++ b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/artifacts.yml
@@ -1,5 +1,10 @@
-# valid artifact:reports:cyclonedx
+# valid artifact:reports:browser_performance
+browser_performance string path:
+ artifacts:
+ reports:
+ browser_performance: foo
+# valid artifact:reports:cyclonedx
cyclonedx string path:
artifacts:
reports:
@@ -24,6 +29,19 @@ cylonedx mixed list of string paths and globs:
- ./foo
- "bar/*.baz"
+# valid artifacts:reports:coverage_report
+coverage-report-cobertura:
+ artifacts:
+ reports:
+ coverage_report:
+ coverage_format: cobertura
+ path: coverage/cobertura-coverage.xml
+
+coverage-report-null:
+ artifacts:
+ reports:
+ coverage_report: null
+
# valid artifacts:when
artifacts-when-on-failure:
artifacts:
diff --git a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml
index ef604f707b5..5dfaf323b22 100644
--- a/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml
+++ b/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml
@@ -28,3 +28,7 @@ workflow:
variables:
IS_A_FEATURE: 'true'
when: always
+
+# valid rules:null
+rules-null:
+ rules: null