From 4777dd1e26de74608d7182e00a240403da02e7a6 Mon Sep 17 00:00:00 2001 From: Justin Webster Date: Wed, 22 Dec 2021 10:07:21 -0800 Subject: [PATCH] issue-652: coverage: Removed pending specs for uncovered lines of code. These Pending specs were removed at the request of @beyhan. See also: - https://github.com/cloudfoundry/bosh-azure-cpi-release/pull/651#pullrequestreview-838213603 - https://github.com/cloudfoundry/bosh-azure-cpi-release/issues/652 --- ...list_network_interfaces_by_keyword_spec.rb | 22 ----------------- .../spec/unit/stemcell_manager2_spec.rb | 11 --------- .../spec/unit/utils/bosh_agent_util_spec.rb | 24 ------------------- 3 files changed, 57 deletions(-) diff --git a/src/bosh_azure_cpi/spec/unit/azure_client/list_network_interfaces_by_keyword_spec.rb b/src/bosh_azure_cpi/spec/unit/azure_client/list_network_interfaces_by_keyword_spec.rb index 3b1463d6b..e9f3d97d9 100644 --- a/src/bosh_azure_cpi/spec/unit/azure_client/list_network_interfaces_by_keyword_spec.rb +++ b/src/bosh_azure_cpi/spec/unit/azure_client/list_network_interfaces_by_keyword_spec.rb @@ -26,28 +26,6 @@ let(:valid_access_token) { 'valid-access-token' } let(:expires_on) { (Time.new + 1800).to_i.to_s } - describe '#get_resources_by_url' do - context 'when url is valid' do - context 'when response body empty' do - it 'should return nil' - end - - context 'when response body not empty' do - it 'should return correct value' - - # TODO: coverage: need to implement the following specs to increase coverage - # PR #610 (for issue #603) added some uncovered code. - context 'when response body contains a nextLink' do - it 'should merge the multi-part response into a single value' - end - end - end - - context 'when url is invalid' do - it 'should raise an error' - end - end - describe '#list_network_interfaces_by_keyword' do let(:network_interfaces_url) { "https://management.azure.com/subscriptions/#{subscription_id}/resourceGroups/#{resource_group}/providers/Microsoft.Network/networkInterfaces?api-version=#{api_version_network}" } let(:instance_id) { 'fake-instance-id' } diff --git a/src/bosh_azure_cpi/spec/unit/stemcell_manager2_spec.rb b/src/bosh_azure_cpi/spec/unit/stemcell_manager2_spec.rb index cb486d166..b6676f556 100644 --- a/src/bosh_azure_cpi/spec/unit/stemcell_manager2_spec.rb +++ b/src/bosh_azure_cpi/spec/unit/stemcell_manager2_spec.rb @@ -81,17 +81,6 @@ stemcell_manager2.delete_stemcell(stemcell_name) end end - - # TODO: coverage: need to implement the following specs to increase coverage - # The uncovered code seems to be related to PR #616. - context 'when use_default_account_for_cleaning is true' do - before do - allow(storage_account_manager).to receive(:use_default_account_for_cleaning) - .and_return(true) - end - - it 'deletes the stemcell in default storage account' - end end describe '#has_stemcell?' do diff --git a/src/bosh_azure_cpi/spec/unit/utils/bosh_agent_util_spec.rb b/src/bosh_azure_cpi/spec/unit/utils/bosh_agent_util_spec.rb index b7d20b30f..63981f533 100644 --- a/src/bosh_azure_cpi/spec/unit/utils/bosh_agent_util_spec.rb +++ b/src/bosh_azure_cpi/spec/unit/utils/bosh_agent_util_spec.rb @@ -32,24 +32,6 @@ allow(config).to receive(:agent).and_return({'mbus' => 'http://u:p@somewhere'}) end - # TODO: coverage: need to implement the following specs to increase coverage - # The uncovered code seems to be related to commit #c38b3026f9512491ffcb70be7088b4d3e319fdc0 (for issue #491). - describe '#encoded_user_data' do # rubocop:disable RSpec/RepeatedExampleGroupBody - it 'should return correct value' - end - - # TODO: coverage: need to implement the following specs to increase coverage - # The uncovered code seems to be related to commit #c38b3026f9512491ffcb70be7088b4d3e319fdc0 (for issue #491). - describe '#encode_user_data' do # rubocop:disable RSpec/RepeatedExampleGroupBody - it 'should return correct value' - end - - # TODO: coverage: need to implement the following specs to increase coverage - # The uncovered code seems to be related to commit #c38b3026f9512491ffcb70be7088b4d3e319fdc0 (for issue #491). - describe '#meta_data_obj' do # rubocop:disable RSpec/RepeatedExampleGroupBody - it 'should return correct value' - end - describe '#user_data_obj' do context 'when using registry' do let(:uses_registry) { true } @@ -123,11 +105,5 @@ expect(user_data).to eq(expected_user_data) end end - - # TODO: coverage: need to implement the following specs to increase coverage - # The uncovered code seems to be related to commit #c38b3026f9512491ffcb70be7088b4d3e319fdc0 (for issue #491). - context 'when computer_name is specified' do - it 'should include the instance-id in the returned value' - end end end \ No newline at end of file