Corrections to environment.yml.example and session_test
This commit is contained in:
@@ -17,7 +17,7 @@ class Aviator::Test
|
|||||||
def new_session
|
def new_session
|
||||||
Aviator::Session.new(
|
Aviator::Session.new(
|
||||||
config_file: config.path,
|
config_file: config.path,
|
||||||
environment: 'test',
|
environment: 'openstack_admin',
|
||||||
log_file: log_file_path
|
log_file: log_file_path
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -36,7 +36,7 @@ class Aviator::Test
|
|||||||
|
|
||||||
it 'authenticates against the auth service using the credentials in the given block' do
|
it 'authenticates against the auth service using the credentials in the given block' do
|
||||||
session = new_session
|
session = new_session
|
||||||
credentials = config.test[:auth_credentials]
|
credentials = config.openstack_admin[:auth_credentials]
|
||||||
|
|
||||||
session.authenticate do |c|
|
session.authenticate do |c|
|
||||||
c[:username] = credentials[:username]
|
c[:username] = credentials[:username]
|
||||||
@@ -49,7 +49,7 @@ class Aviator::Test
|
|||||||
|
|
||||||
it 'raises an AuthenticationError when authentication fails' do
|
it 'raises an AuthenticationError when authentication fails' do
|
||||||
session = new_session
|
session = new_session
|
||||||
credentials = config.test[:auth_credentials]
|
credentials = config.openstack_admin[:auth_credentials]
|
||||||
|
|
||||||
the_method = lambda do
|
the_method = lambda do
|
||||||
session.authenticate do |c|
|
session.authenticate do |c|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
openstack: &openstack
|
common: &common
|
||||||
provider: openstack
|
provider: openstack
|
||||||
auth_service:
|
auth_service:
|
||||||
name: identity
|
name: identity
|
||||||
@@ -7,15 +7,22 @@ openstack: &openstack
|
|||||||
validator: list_tenants
|
validator: list_tenants
|
||||||
api_version: v2
|
api_version: v2
|
||||||
|
|
||||||
|
|
||||||
|
# This is expected by the test suite. You may change its values freely
|
||||||
|
# as long as the name 'openstack_admin' doesn't change and the user's
|
||||||
|
# role in the tenant is that of 'admin'
|
||||||
openstack_admin:
|
openstack_admin:
|
||||||
<<: *openstack
|
<<: *common
|
||||||
auth_credentials:
|
auth_credentials:
|
||||||
username: admin
|
username: admin
|
||||||
password: mypassword
|
password: mypassword
|
||||||
tenantName: admin
|
tenantName: admin
|
||||||
|
|
||||||
|
# This is expected by the test suite. You may change its values freely
|
||||||
|
# as long as the name 'openstack_member' doesn't change and the user's
|
||||||
|
# role in the tenant is that of 'member'
|
||||||
openstack_member:
|
openstack_member:
|
||||||
<<: *openstack
|
<<: *common
|
||||||
auth_credentials:
|
auth_credentials:
|
||||||
username: nonadmin
|
username: nonadmin
|
||||||
password: mypassword
|
password: mypassword
|
||||||
|
|||||||
Reference in New Issue
Block a user