diff options
Diffstat (limited to 'spec/graphql/types/ci')
5 files changed, 48 insertions, 2 deletions
diff --git a/spec/graphql/types/ci/config/config_type_spec.rb b/spec/graphql/types/ci/config/config_type_spec.rb index 0012ae9f51f..78dd5afc1d8 100644 --- a/spec/graphql/types/ci/config/config_type_spec.rb +++ b/spec/graphql/types/ci/config/config_type_spec.rb @@ -8,6 +8,7 @@ RSpec.describe Types::Ci::Config::ConfigType do it 'exposes the expected fields' do expected_fields = %i[ errors + includes mergedYaml stages status diff --git a/spec/graphql/types/ci/config/include_type_enum_spec.rb b/spec/graphql/types/ci/config/include_type_enum_spec.rb new file mode 100644 index 00000000000..a88316ae6f2 --- /dev/null +++ b/spec/graphql/types/ci/config/include_type_enum_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['CiConfigIncludeType'] do + it { expect(described_class.graphql_name).to eq('CiConfigIncludeType') } + + it 'exposes all the existing include types' do + expect(described_class.values.keys).to match_array(%w[remote local file template]) + end +end diff --git a/spec/graphql/types/ci/config/include_type_spec.rb b/spec/graphql/types/ci/config/include_type_spec.rb new file mode 100644 index 00000000000..971e185ccd9 --- /dev/null +++ b/spec/graphql/types/ci/config/include_type_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::Config::IncludeType do + specify { expect(described_class.graphql_name).to eq('CiConfigInclude') } + + it 'exposes the expected fields' do + expected_fields = %i[ + context_project + context_sha + extra + location + blob + raw + type + ] + + expect(described_class).to have_graphql_fields(*expected_fields) + end +end diff --git a/spec/graphql/types/ci/runner_type_spec.rb b/spec/graphql/types/ci/runner_type_spec.rb index 7697cd0ef79..26ac7a4da8d 100644 --- a/spec/graphql/types/ci/runner_type_spec.rb +++ b/spec/graphql/types/ci/runner_type_spec.rb @@ -11,8 +11,8 @@ RSpec.describe GitlabSchema.types['CiRunner'] do expected_fields = %w[ id description created_at contacted_at maximum_timeout access_level active paused status version short_sha revision locked run_untagged ip_address runner_type tag_list - project_count job_count admin_url edit_admin_url user_permissions executor_name - groups projects jobs token_expires_at + project_count job_count admin_url edit_admin_url user_permissions executor_name architecture_name platform_name + maintenance_note groups projects jobs token_expires_at ] expect(described_class).to include_graphql_fields(*expected_fields) diff --git a/spec/graphql/types/ci/runner_upgrade_status_type_enum_spec.rb b/spec/graphql/types/ci/runner_upgrade_status_type_enum_spec.rb new file mode 100644 index 00000000000..81a852471b9 --- /dev/null +++ b/spec/graphql/types/ci/runner_upgrade_status_type_enum_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::RunnerUpgradeStatusTypeEnum do + specify { expect(described_class.graphql_name).to eq('CiRunnerUpgradeStatusType') } + + it 'exposes all upgrade status values' do + expect(described_class.values.keys).to eq( + ['UNKNOWN'] + ::Gitlab::Ci::RunnerUpgradeCheck::STATUSES.map { |sym, _| sym.to_s.upcase } + ) + end +end |