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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f38820133cc2414f19de639be773bfc30d528aa4
4
- data.tar.gz: 64da3b0c110a3777eecb97ee034df61fad0e8f0f
3
+ metadata.gz: 442a86cac3236d04a07d97d37ddb0af22af6bda0
4
+ data.tar.gz: 8531908e53c7228584340b95e853600833178c8a
5
5
  SHA512:
6
- metadata.gz: ff9ef85208b5f8f4c05c2757846bbec8c8c8a93e4611b1e9da50a803ce17fa4a51a6458872919cefe9d26d17cb5ee83737d4411d441d9680a0e498c0882bc87d
7
- data.tar.gz: 8365a90f1ab433999b2f37b4d4a23017287355c41954c31db77767d5109dbbff0989d4669ba6be68fec8ace97f154d4685e51dca68683b4825bb7814fea07d7a
6
+ metadata.gz: ca073af19b065de6ce3b47ab5e4fd16093b32ffa33653e3134a5a30a9f2e853d1d2029481285c2c0e1bd403d10825581766c3c633af6742dbb65fcafff220862
7
+ data.tar.gz: b7861684e0a396625a6c6e2b0bdbe6ffd135c3b27bed6a8d46a8c6d3f9fc7780098244073104d1985d527cce5b5bb20cd7cff54fa601730abea53b9e48bd9b30
@@ -1,16 +1,20 @@
1
1
  require 'cucumber-rest-bdd'
2
2
 
3
3
  Given(/^I am an API management authenticated client$/) do
4
- tenant_id = ENV['ALINTA_TENANTID']
5
- client_id = ENV['ALINTA_CLIENTID']
6
- client_secret = ENV['ALINTA_CLIENTSECRET']
7
- vault_name = ENV['ALINTA_VAULT']
8
- if tenant_id.nil? or client_id.nil? or client_secret.nil? or vault_name.nil?
9
- fail('One or more required environment variables have not been defined.')
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
- Given I retrieve the API Management subscription key secret "APIMgmnt--End2End--Starter--Primary" from Azure Storage Vault "#{vault_name}" using tenant "#{tenant_id}" with credentials "#{client_id}" and "#{client_secret}"
13
- And I am a client
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
@@ -1,3 +1,3 @@
1
1
  module AlintaTesting
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alinta-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hosking