<commit_before>require_relative "refresh_spec_common"

describe ManageIQ::Providers::Openstack::CloudManager::Refresher do
  include Openstack::RefreshSpecCommon

  before(:each) do
    setup_ems('11.22.33.44', '<PASSWORD>', 5000, "cloud_admin", "v3")
    @environment = :kilo_keystone_v3
  end

  it "will perform a full refresh against RHOS #{@environment}" do
    2.times do # Run twice to verify that a second run with existing data does not change anything
      # TODO(lsmola) disabled until https://github.com/fog/fog/issues/3812 is fixed
      # with_cassette(@environment, @ems) do
      #   EmsRefresh.refresh(@ems)
      # end

      # assert_common
    end
  end

  context "when configured with skips" do
    before(:each) do
      stub_server_configuration(
        :ems_refresh => {:openstack => {:inventory_ignore => [:cloud_volumes, :cloud_volume_snapshots]}}
      )
    end

    it "will not parse the ignored items" do
      # TODO(lsmola) disabled until https://github.com/fog/fog/issues/3812 is fixed
      # with_cassette(@environment, @ems) do
      #   EmsRefresh.refresh(@ems)
      # end

      # assert_with_skips
    end
  end
end
<commit_msg>Fix and re-enable tests for keystone v3<commit_after>require_relative "refresh_spec_common"

describe ManageIQ::Providers::Openstack::CloudManager::Refresher do
  include Openstack::RefreshSpecCommon

  before(:each) do
    setup_ems('11.22.33.44', '<PASSWORD>', 5000, "admin", "v3", "default")
    @environment = :kilo_keystone_v3
  end

  it "will perform a full refresh against RHOS #{@environment}" do
    2.times do # Run twice to verify that a second run with existing data does not change anything
      with_cassette(@environment, @ems) do
        EmsRefresh.refresh(@ems)
        EmsRefresh.refresh(@ems.network_manager)
      end

      assert_common
    end
  end

  context "when configured with skips" do
    before(:each) do
      stub_settings(
        :ems_refresh => {:openstack => {:inventory_ignore => [:cloud_volumes, :cloud_volume_snapshots]}}
      )
    end

    it "will not parse the ignored items" do
      with_cassette(@environment, @ems) do
        EmsRefresh.refresh(@ems)
        EmsRefresh.refresh(@ems.network_manager)
      end

      assert_with_skips
    end
  end
end

{'fraction_non_alphanumeric': 0.10101010101010101, 'fraction_numerical': 0.017127799736495388, 'mean_word_length': 3.3723608445297506, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6992460', 'n_tokens_mistral': 747, 'n_tokens_neox': 705, 'n_words': 189}