diff --git a/spec/models/manageiq/providers/kubernetes/container_manager/refresher_spec.rb b/spec/models/manageiq/providers/kubernetes/container_manager/refresher_spec.rb index ca16de7bb6..a75c9a2b9f 100644 --- a/spec/models/manageiq/providers/kubernetes/container_manager/refresher_spec.rb +++ b/spec/models/manageiq/providers/kubernetes/container_manager/refresher_spec.rb @@ -149,6 +149,9 @@ def assert_specific_container_group(expected_extra_tags: []) :dns_policy => "ClusterFirst", :phase => "Running" ) + expect(@containergroup.annotations).to contain_exactly( + annotation_with_name_value("name", "kubernetes.io/created-by") + ) expect(@containergroup.labels).to contain_exactly( label_with_name_value("name", "heapster") ) @@ -203,6 +206,10 @@ def assert_specific_container_node :max_container_groups => 40 ) + # expect(@containernode.annotations).to contain_exactly( + # annotation_with_name_value("name", "machineconfiguration.openshift.io/desiredConfig") + # ) + @containernodeconditions = ContainerCondition.where(:container_entity_type => "ContainerNode") expect(@containernodeconditions.count).to eq(2) expect(@containernodeconditions.first).to have_attributes( @@ -253,6 +260,10 @@ def assert_specific_container_service label_with_name_value("provider", "kubernetes"), label_with_name_value("component", "apiserver") ) + # expect(@containersrv.annotations).to contain_exactly( + # annotation_with_name_value("provider", "kubernetes"), + # annotation_with_name_value("component", "apiserver") + # ) expect(@containersrv.selector_parts.count).to eq(0) @confs = @containersrv.container_service_port_configs @@ -407,6 +418,13 @@ def label_with_name_value(name, value) ) end + def annotation_with_name_value(name, value) + an_object_having_attributes( + :section => 'annotations', :source => 'kubernetes', + :name => name, :value => value + ) + end + def tag_in_category_with_description(category, description) satisfy { |tag| tag.category == category && tag.classification.description == description } end