Sha256: 2f25528507b7ac97783a6bdd0f827dbc11f0e94b882c83490191f9a47368cda6

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 KB

Contents

require "mixlib/shellout"
require "bundler"

describe "Chef Fips Integration Specs" do
  def windows?
    if RUBY_PLATFORM =~ /mswin|mingw|windows/
      true
    else
      false
    end
  end

  let(:omnibus_root) do
    if windows?
      "c:/opscode/chef"
    else
      "/opt/chef"
    end
  end

  let(:env) do
    {
      "PATH" => [ "#{omnibus_root}/embedded/bin", ENV["PATH"] ].join(File::PATH_SEPARATOR),
      "BUNDLE_GEMFILE" => "#{omnibus_root}/Gemfile",
      "GEM_PATH" => nil, "GEM_CACHE" => nil, "GEM_HOME" => nil,
      "BUNDLE_IGNORE_CONFIG" => "true",
      "BUNDLE_FROZEN" => "1",
      "CHEF_FIPS" => "1"
    }
  end

  let(:chef_dir) do
    cmd = Mixlib::ShellOut.new("bundle show chef", env: env).run_command
    cmd.error!
    cmd.stdout.chomp
  end

  def run_rspec_test(test)
    Bundler.with_clean_env do
      cmd = Mixlib::ShellOut.new(
        "bundle exec rspec -f documentation -t ~requires_git #{test}",
        env: env, cwd: chef_dir, timeout: 3600
      )
      cmd.run_command.error!
    end
  end

  it "passes the integration specs" do
    skip
    #run_rspec_test("spec/integration")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-12.22.1 acceptance/fips/test/integration/fips-integration/serverspec/fips-integration_spec.rb
chef-12.22.1-universal-mingw32 acceptance/fips/test/integration/fips-integration/serverspec/fips-integration_spec.rb