cloudstack_client 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cloudstack_client/configuration.rb +1 -1
- data/lib/cloudstack_client/version.rb +1 -1
- data/test/configuration_test.rb +18 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca7dd8678b511427f1950751a259588daeb7a263
|
4
|
+
data.tar.gz: 53c764c09eabe61c0040972239a738a53f33588a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e86e7a8cddbaf5d500492f6ae7090be785b6acc6613a1158abcb0dec13d36622bc7003592ae93ff13cdb42433c9eea637b6b52505f240aca5b9719b4f6e41767
|
7
|
+
data.tar.gz: b567501df925e430cc10eb8976bf934b57258fa80b7872bd26b109864ab34e50b774422d51e7e30efe7002c1bfc155fa025a000a9f71dda9b9282ef105885c55
|
data/Gemfile.lock
CHANGED
data/test/configuration_test.rb
CHANGED
@@ -3,26 +3,31 @@ require "cloudstack_client/configuration"
|
|
3
3
|
|
4
4
|
describe CloudstackClient::Configuration do
|
5
5
|
|
6
|
-
before do
|
7
|
-
@config1 = CloudstackClient::Configuration.load({
|
8
|
-
config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
|
9
|
-
debug: true
|
10
|
-
})
|
11
|
-
@config2 = CloudstackClient::Configuration.load({
|
12
|
-
config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-2.yml",
|
13
|
-
debug: true
|
14
|
-
})
|
15
|
-
end
|
16
|
-
|
17
6
|
describe "when the configuration is loaded without env" do
|
18
7
|
it "must use the default env'" do
|
19
|
-
|
8
|
+
CloudstackClient::Configuration.load({
|
9
|
+
config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
|
10
|
+
debug: true
|
11
|
+
})[:environment].must_equal "test1"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "when an alternative env is in the options" do
|
16
|
+
it "must use the alternative env'" do
|
17
|
+
CloudstackClient::Configuration.load({
|
18
|
+
config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
|
19
|
+
env: "test2",
|
20
|
+
debug: true
|
21
|
+
})[:environment].must_equal "test2"
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
25
|
describe "when only one env is present" do
|
24
26
|
it "must use the one existing configuration'" do
|
25
|
-
|
27
|
+
CloudstackClient::Configuration.load({
|
28
|
+
config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-2.yml",
|
29
|
+
debug: true
|
30
|
+
})[:api_key].must_equal "test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test"
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|