Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive nodes in graph refresh #209

Merged
merged 2 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def initialize_inventory_collections
:builder_params => {:ems_id => manager.id},
:association => :container_nodes,
:secondary_refs => {:by_name => [:name]},
:delete_method => :disconnect_inv
)
)
initialize_container_conditions_collection(manager, :container_nodes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ def assert_specific_persistent_volume_claim
# "my-project-2" - "my-pod-2", label of "my-route-2", parameters of "my-template-2"

before(:each) do
# fake node that should get archived
@archived_node = FactoryGirl.create(:container_node, :name => "node", :ems_id => @ems.id)

VCR.use_cassette("#{described_class.name.underscore}_after_deletions",
:allow_unused_http_interactions => true,
:match_requests_on => [:path,]) do # , :record => :new_episodes) do
Expand All @@ -497,6 +500,9 @@ def assert_specific_persistent_volume_claim
end

it "archives objects" do
expect(ContainerNode.count).to eq(2)
expect(ContainerNode.active.count).to eq(1)
expect(ContainerNode.archived.count).to eq(1)
expect(ContainerGroup.count).to eq(object_counts['ContainerGroup'])
expect(ContainerGroup.active.count).to eq(object_counts['ContainerGroup'] - 3)
expect(ContainerGroup.archived.count).to eq(3)
Expand Down