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

Fix specs failing on a missing zone #114

Merged
merged 1 commit into from
Sep 17, 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
8 changes: 8 additions & 0 deletions spec/factories/ext_management_system.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FactoryGirl.define do
factory :ems_openshift_with_zone, :parent => :ems_openshift do
zone do
_guid, _server, zone = EvmSpecHelper.create_guid_miq_server_zone
zone
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hostname = 'host.example.com'
token = 'theToken'
FactoryGirl.create(
:ems_openshift,
:ems_openshift_with_zone,
:name => 'OpenShiftProvider',
:connection_configurations => [{:endpoint => {:role => :default,
:hostname => hostname,
Expand All @@ -20,10 +20,6 @@
)
end

before(:each) do
allow(MiqServer).to receive(:my_zone).and_return("default")
end

it "instantiate a template with parameters and object labels" do
param = FactoryGirl.create(:container_template_parameter,
:name => 'VAR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
let(:images_managed_by_openshift_count) { 32 } # only images from /oapi/v1/images

before(:each) do
allow(MiqServer).to receive(:my_zone).and_return("default")
# env vars for easier VCR recording, see test_objects_record.sh
hostname = ENV["OPENSHIFT_MASTER_HOST"] || "host.example.com"
token = ENV["OPENSHIFT_MANAGEMENT_ADMIN_TOKEN"] || "theToken"

@ems = FactoryGirl.create(
:ems_openshift,
:ems_openshift_with_zone,
:name => "OpenShiftProvider",
:connection_configurations => [{:endpoint => {:role => :default,
:hostname => hostname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
let(:images_managed_by_openshift_count) { 32 } # only images from /oapi/v1/images

before(:each) do
allow(MiqServer).to receive(:my_zone).and_return("default")
# env vars for easier VCR recording, see test_objects_record.sh
hostname = ENV["OPENSHIFT_MASTER_HOST"] || "host.example.com"
token = ENV["OPENSHIFT_MANAGEMENT_ADMIN_TOKEN"] || "theToken"

@ems = FactoryGirl.create(
:ems_openshift,
:ems_openshift_with_zone,
:name => "OpenShiftProvider",
:connection_configurations => [{:endpoint => {:role => :default,
:hostname => hostname,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# instantiated at the end
shared_examples "openshift refresher VCR targeted refresh tests" do
before(:each) do
allow(MiqServer).to receive(:my_zone).and_return("default")
hostname = 'host.example.com'
token = 'theToken'
hawkular_hostname = 'host.example.com'

@ems = FactoryGirl.create(
:ems_openshift,
:ems_openshift_with_zone,
:name => 'OpenshiftProvider',
:connection_configurations => [{:endpoint => {:role => :default,
:hostname => hostname,
Expand Down