Make use of fog_credentials.test.yml for testing.
This commit is contained in:
parent
745eee126a
commit
d6a3884c81
2 changed files with 9 additions and 5 deletions
|
@ -1,6 +1,10 @@
|
||||||
require_relative 'features'
|
require_relative 'features'
|
||||||
|
|
||||||
Fog.credentials_path = Rails.root.join('config/fog_credentials.yml')
|
if Rails.env.test?
|
||||||
|
Fog.credentials_path = Rails.root.join('config/fog_credentials.test.yml')
|
||||||
|
else
|
||||||
|
Fog.credentials_path = Rails.root.join('config/fog_credentials.yml')
|
||||||
|
end
|
||||||
|
|
||||||
CarrierWave.configure do |config|
|
CarrierWave.configure do |config|
|
||||||
# These permissions will make dir and files available only to the user running
|
# These permissions will make dir and files available only to the user running
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace :dev do
|
||||||
puts 'start initialisation'
|
puts 'start initialisation'
|
||||||
Rake::Task['dev:generate_token_file'].invoke
|
Rake::Task['dev:generate_token_file'].invoke
|
||||||
Rake::Task['dev:generate_franceconnect_file'].invoke
|
Rake::Task['dev:generate_franceconnect_file'].invoke
|
||||||
Rake::Task['dev:generate_ovh_storage_file'].invoke
|
Rake::Task['dev:generate_fog_credentials_file'].invoke
|
||||||
Rake::Task['dev:generate_features_file'].invoke
|
Rake::Task['dev:generate_features_file'].invoke
|
||||||
|
|
||||||
puts 'end initialisation'
|
puts 'end initialisation'
|
||||||
|
@ -38,8 +38,8 @@ EOF
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
|
|
||||||
task :generate_ovh_storage_file do
|
task :generate_fog_credentials_file do
|
||||||
puts 'creating fog_credentials.yml file'
|
puts 'creating fog_credentials.test.yml file'
|
||||||
content = <<EOF
|
content = <<EOF
|
||||||
default:
|
default:
|
||||||
openstack_tenant: "ovh_fake_tenant_name"
|
openstack_tenant: "ovh_fake_tenant_name"
|
||||||
|
@ -48,7 +48,7 @@ default:
|
||||||
openstack_auth_url: "https://auth.cloud.ovh.net/v2.0/tokens"
|
openstack_auth_url: "https://auth.cloud.ovh.net/v2.0/tokens"
|
||||||
openstack_region: "SBG1"
|
openstack_region: "SBG1"
|
||||||
EOF
|
EOF
|
||||||
file = File.new("config/fog_credentials.yml", "w+")
|
file = File.new("config/fog_credentials.test.yml", "w+")
|
||||||
file.write(content)
|
file.write(content)
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue