Commit 2991f93f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Rename CI config hidden job entry to hidden entry

parent b1250065
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
## ##
# Entry that represents a hidden CI/CD job. # Entry that represents a hidden CI/CD job.
# #
class HiddenJob < Entry class Hidden < Entry
include Validatable include Validatable
validations do validations do
......
...@@ -30,7 +30,7 @@ module Gitlab ...@@ -30,7 +30,7 @@ module Gitlab
def compose! def compose!
@config.each do |name, config| @config.each do |name, config|
node = hidden?(name) ? Node::HiddenJob : Node::Job node = hidden?(name) ? Node::Hidden : Node::Job
factory = Node::Factory.new(node) factory = Node::Factory.new(node)
.value(config || {}) .value(config || {})
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Ci::Config::Node::HiddenJob do describe Gitlab::Ci::Config::Node::Hidden do
let(:entry) { described_class.new(config) } let(:entry) { described_class.new(config) }
describe 'validations' do describe 'validations' do
......
...@@ -74,7 +74,7 @@ describe Gitlab::Ci::Config::Node::Jobs do ...@@ -74,7 +74,7 @@ describe Gitlab::Ci::Config::Node::Jobs do
expect(entry.descendants.first(2)) expect(entry.descendants.first(2))
.to all(be_an_instance_of(Gitlab::Ci::Config::Node::Job)) .to all(be_an_instance_of(Gitlab::Ci::Config::Node::Job))
expect(entry.descendants.last) expect(entry.descendants.last)
.to be_an_instance_of(Gitlab::Ci::Config::Node::HiddenJob) .to be_an_instance_of(Gitlab::Ci::Config::Node::Hidden)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment