Rename environment.yml keys to something more appropriate
This commit is contained in:
@@ -6,7 +6,3 @@ require "aviator/version"
|
|||||||
require "aviator/core/request"
|
require "aviator/core/request"
|
||||||
require "aviator/core/response"
|
require "aviator/core/response"
|
||||||
require "aviator/core/service"
|
require "aviator/core/service"
|
||||||
|
|
||||||
module Aviator
|
|
||||||
# Your code goes here...
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Aviator::Test
|
|||||||
describe 'aviator/core/service' do
|
describe 'aviator/core/service' do
|
||||||
|
|
||||||
def config
|
def config
|
||||||
Environment.admin
|
Environment.openstack_admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def klass
|
def klass
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ class Aviator::Test
|
|||||||
|
|
||||||
def create_request
|
def create_request
|
||||||
klass.new(helper.admin_bootstrap_session_data) do |params|
|
klass.new(helper.admin_bootstrap_session_data) do |params|
|
||||||
params[:username] = Environment.admin[:auth_credentials][:username]
|
params[:username] = Environment.openstack_admin[:auth_credentials][:username]
|
||||||
params[:password] = Environment.admin[:auth_credentials][:password]
|
params[:password] = Environment.openstack_admin[:auth_credentials][:password]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@ class Aviator::Test
|
|||||||
p = {
|
p = {
|
||||||
auth: {
|
auth: {
|
||||||
passwordCredentials: {
|
passwordCredentials: {
|
||||||
username: Environment.admin[:auth_credentials][:username],
|
username: Environment.openstack_admin[:auth_credentials][:username],
|
||||||
password: Environment.admin[:auth_credentials][:password]
|
password: Environment.openstack_admin[:auth_credentials][:password]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
common: &common
|
openstack: &openstack
|
||||||
provider: openstack
|
provider: openstack
|
||||||
auth_service:
|
auth_service:
|
||||||
name: identity
|
name: identity
|
||||||
@@ -6,15 +6,15 @@ common: &common
|
|||||||
request: create_token
|
request: create_token
|
||||||
api_version: v2
|
api_version: v2
|
||||||
|
|
||||||
admin:
|
openstack_admin:
|
||||||
<<: *common
|
<<: *openstack
|
||||||
auth_credentials:
|
auth_credentials:
|
||||||
username: admin
|
username: admin
|
||||||
password: mypassword
|
password: mypassword
|
||||||
tenantName: admin
|
tenantName: admin
|
||||||
|
|
||||||
non_admin:
|
openstack_member:
|
||||||
<<: *common
|
<<: *openstack
|
||||||
auth_credentials:
|
auth_credentials:
|
||||||
username: nonadmin
|
username: nonadmin
|
||||||
password: mypassword
|
password: mypassword
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class Test
|
|||||||
|
|
||||||
def admin_bootstrap_session_data
|
def admin_bootstrap_session_data
|
||||||
{
|
{
|
||||||
auth_service: Environment.admin[:auth_service]
|
auth_service: Environment.openstack_admin[:auth_service]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ VCR.configure do |c|
|
|||||||
@vcr_port_matcher_registered = true
|
@vcr_port_matcher_registered = true
|
||||||
end
|
end
|
||||||
|
|
||||||
c.filter_sensitive_data('"password":"<PASSWORD>"') { %Q{"password":"#{ Aviator::Test::Environment.admin[:auth_credentials][:password] }"} }
|
c.filter_sensitive_data('"password":"<PASSWORD>"') { %Q{"password":"#{ Aviator::Test::Environment.openstack_admin[:auth_credentials][:password] }"} }
|
||||||
c.filter_sensitive_data('"password":"<PASSWORD>"') { %Q{"password":"#{ Aviator::Test::Environment.non_admin[:auth_credentials][:password] }"} }
|
c.filter_sensitive_data('"password":"<PASSWORD>"') { %Q{"password":"#{ Aviator::Test::Environment.openstack_member[:auth_credentials][:password] }"} }
|
||||||
c.filter_sensitive_data('<HOST_URI>') do
|
c.filter_sensitive_data('<HOST_URI>') do
|
||||||
auth_url = URI(Aviator::Test::Environment.common[:auth_service][:host_uri])
|
auth_url = URI(Aviator::Test::Environment.openstack[:auth_service][:host_uri])
|
||||||
auth_url.scheme + '://' + auth_url.host
|
auth_url.scheme + '://' + auth_url.host
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user