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/requests/api/graphql/ci/config_spec.rb')
-rw-r--r--spec/requests/api/graphql/ci/config_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/requests/api/graphql/ci/config_spec.rb b/spec/requests/api/graphql/ci/config_spec.rb
index 8ede6e1538c..755585f8e0e 100644
--- a/spec/requests/api/graphql/ci/config_spec.rb
+++ b/spec/requests/api/graphql/ci/config_spec.rb
@@ -20,6 +20,7 @@ RSpec.describe 'Query.ciConfig' do
ciConfig(projectPath: "#{project.full_path}", content: "#{content}", dryRun: false) {
status
errors
+ warnings
stages {
nodes {
name
@@ -73,6 +74,7 @@ RSpec.describe 'Query.ciConfig' do
expect(graphql_data['ciConfig']).to eq(
"status" => "VALID",
"errors" => [],
+ "warnings" => [],
"stages" =>
{
"nodes" =>
@@ -220,6 +222,21 @@ RSpec.describe 'Query.ciConfig' do
)
end
+ context 'when using deprecated keywords' do
+ let_it_be(:content) do
+ YAML.dump(
+ rspec: { script: 'ls' },
+ types: ['test']
+ )
+ end
+
+ it 'returns a warning' do
+ post_graphql_query
+
+ expect(graphql_data['ciConfig']['warnings']).to include('root `types` is deprecated in 9.0 and will be removed in 15.0.')
+ end
+ end
+
context 'when the config file includes other files' do
let_it_be(:content) do
YAML.dump(
@@ -250,6 +267,7 @@ RSpec.describe 'Query.ciConfig' do
expect(graphql_data['ciConfig']).to eq(
"status" => "VALID",
"errors" => [],
+ "warnings" => [],
"stages" =>
{
"nodes" =>