Skip to content

Commit

Permalink
Add tag to container_label_tag_mapping factory
Browse files Browse the repository at this point in the history
ContainerLabelTagMapping assumes it belongs_to a tag so add this to the
factory.
  • Loading branch information
agrare committed Nov 21, 2017
1 parent ece6e89 commit e0e2cb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/factories/container_label_tag_mapping.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FactoryGirl.define do
factory :container_label_tag_mapping do
label_name 'name'
tag { FactoryGirl.create(:managed_kubernetes_tag) }

trait :only_nodes do
labeled_resource_type 'ContainerNode'
Expand Down
4 changes: 4 additions & 0 deletions spec/factories/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
factory :tag do
sequence(:name) { |n| "/namespace/cat/tag_#{seq_padded_for_sorting(n)}" }
end

factory :managed_kubernetes_tag, :parent => :tag do
sequence(:name) { |n| "/managed/kubernetes:tag_#{seq_padded_for_sorting(n)}" }
end
end

0 comments on commit e0e2cb4

Please sign in to comment.