Skip to content

Commit

Permalink
Merge pull request #46 from Ladas/enable_check_metadata_not_deleted_s…
Browse files Browse the repository at this point in the history
…pecs

Enable check metadata not deleted specs
  • Loading branch information
simon3z authored Oct 19, 2017
2 parents 396b484 + cd1a005 commit ceb6d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize_inventory_collections
# Skipping these InventoryCollections (instead of returning empty ones)
# to at least retain existing metadata if it was true and is now false.
if options.get_container_images
initialize_custom_attributes_collections(manager.container_images, %w(labels docker_labels))
initialize_custom_attributes_collections(@collections[:container_images], %w(labels docker_labels))
end
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# instantiated at the end, for both classical and graph refresh
shared_examples "openshift refresher VCR tests" do |check_metadata_not_deleted: true|
shared_examples "openshift refresher VCR tests" do
let(:all_images_count) { 40 } # including /oapi/v1/images data
let(:pod_images_count) { 12 } # only images mentioned by pods
let(:images_managed_by_openshift_count) { 32 } # only images from /oapi/v1/images
Expand Down Expand Up @@ -220,8 +220,6 @@ def full_refresh_test
end

it 'will not delete previously collected metadata if store_unused_images = false' do
# TODO(cben): investigate, weird that it deletes labels but not docker_labels.
skip("graph refresh deletes labels on archived image") unless check_metadata_not_deleted
normal_refresh
stub_settings_merge(
:ems_refresh => {:openshift => {:store_unused_images => false}},
Expand Down Expand Up @@ -502,7 +500,7 @@ def assert_specific_used_container_image(metadata:)
end

# TODO: pending proper graph store_unused_images implemetation
include_examples "openshift refresher VCR tests", :check_metadata_not_deleted => false
include_examples "openshift refresher VCR tests"
end

context "with :batch saver" do
Expand All @@ -513,7 +511,7 @@ def assert_specific_used_container_image(metadata:)
end

# TODO: pending proper graph store_unused_images implemetation
include_examples "openshift refresher VCR tests", :check_metadata_not_deleted => false
include_examples "openshift refresher VCR tests"
end
end
end

0 comments on commit ceb6d1f

Please sign in to comment.