alinta-testing 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alinta-testing/steps.rb +13 -9
- data/lib/alinta-testing/version.rb +1 -1
- 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: 442a86cac3236d04a07d97d37ddb0af22af6bda0
|
4
|
+
data.tar.gz: 8531908e53c7228584340b95e853600833178c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca073af19b065de6ce3b47ab5e4fd16093b32ffa33653e3134a5a30a9f2e853d1d2029481285c2c0e1bd403d10825581766c3c633af6742dbb65fcafff220862
|
7
|
+
data.tar.gz: b7861684e0a396625a6c6e2b0bdbe6ffd135c3b27bed6a8d46a8c6d3f9fc7780098244073104d1985d527cce5b5bb20cd7cff54fa601730abea53b9e48bd9b30
|
data/lib/alinta-testing/steps.rb
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
require 'cucumber-rest-bdd'
|
2
2
|
|
3
3
|
Given(/^I am an API management authenticated client$/) do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
if ENV['apim_subscription_key'] != nil
|
5
|
+
@apim_subscription_key = ENV['apim_subscription_key']
|
6
|
+
else
|
7
|
+
variables = %w{ALINTA_TENANTID ALINTA_CLIENTID ALINTA_CLIENTSECRET ALINTA_VAULT}
|
8
|
+
missing = variables.find_all { |v| ENV[v] == nil }
|
9
|
+
unless missing.empty?
|
10
|
+
raise "The following required environment variables have not been defined: #{missing.join(', ')}."
|
11
|
+
end
|
12
|
+
steps %Q{
|
13
|
+
Given I retrieve the API Management subscription key secret "APIMgmnt--End2End--Starter--Primary" from Azure Storage Vault "#{ENV['ALINTA_VAULT']}" using tenant "#{ENV['ALINTA_TENANTID']}" with credentials "#{ENV['ALINTA_CLIENTID']}" and "#{ENV['ALINTA_CLIENTSECRET']}"
|
14
|
+
}
|
10
15
|
end
|
11
16
|
steps %Q{
|
12
|
-
|
13
|
-
|
14
|
-
And I add the API Management key header
|
17
|
+
Given I am a client
|
18
|
+
And I add the API Management key header
|
15
19
|
}
|
16
20
|
end
|