Sha256: 6c051d1ca1201c859800d0fd8ff68bc9ab3c97acd1b87fe5a7c29b799071dc42

Contents?: true

Size: 682 Bytes

Versions: 32

Compression:

Stored size: 682 Bytes

Contents

FactoryBot.define do
  factory :openscap_feature, :class => Feature do
    name { 'Openscap' }
  end

  factory :openscap_proxy, :class => SmartProxy do
    sequence(:name) { |n| "openscap_proxy#{n}" }
    sequence(:url) { |n| "https://anywhere#{n}.net:8443" }
    features { [Feature.find_by(:name => 'Openscap') || FactoryBot.create(:openscap_feature)] }
  end

  factory :compliance_host, :class => Host::Managed do
    sequence(:name) { |n| "host#{n}" }
    sequence(:hostname) { |n| "hostname#{n}" }
    root_pass { 'xybxa6JUkz63w' }
    openscap_proxy { SmartProxy.unscoped.with_features('Openscap').first || FactoryBot.create(:openscap_proxy) }
    policies { [] }
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
foreman_openscap-10.1.0 test/factories/compliance_host_factory.rb
foreman_openscap-10.0.3 test/factories/compliance_host_factory.rb
foreman_openscap-10.0.2 test/factories/compliance_host_factory.rb
foreman_openscap-10.0.1 test/factories/compliance_host_factory.rb
foreman_openscap-10.0.0 test/factories/compliance_host_factory.rb
foreman_openscap-9.0.4 test/factories/compliance_host_factory.rb
foreman_openscap-9.0.3 test/factories/compliance_host_factory.rb
foreman_openscap-9.0.2 test/factories/compliance_host_factory.rb
foreman_openscap-9.0.1 test/factories/compliance_host_factory.rb
foreman_openscap-9.0.0 test/factories/compliance_host_factory.rb
foreman_openscap-4.1.3 test/factories/compliance_host_factory.rb
foreman_openscap-4.0.6 test/factories/compliance_host_factory.rb
foreman_openscap-4.2.0 test/factories/compliance_host_factory.rb
foreman_openscap-4.0.5 test/factories/compliance_host_factory.rb
foreman_openscap-4.1.2 test/factories/compliance_host_factory.rb
foreman_openscap-4.1.1 test/factories/compliance_host_factory.rb
foreman_openscap-4.1.0 test/factories/compliance_host_factory.rb
foreman_openscap-4.0.4 test/factories/compliance_host_factory.rb
foreman_openscap-4.0.3 test/factories/compliance_host_factory.rb
foreman_openscap-4.0.2 test/factories/compliance_host_factory.rb