Rename CI config hidden job entry to hidden entry
This commit is contained in:
parent
b125006517
commit
2991f93f2f
|
@ -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
|
||||||
|
|
||||||
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 || {})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
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
|
||||||
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue