alinta-cucumber-rest-bdd 0.5.10 → 0.5.11

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: fe70e96cbff350a2232d09a3cf6909c601da3a41
4
- data.tar.gz: 363099350bbafcc21fa300a6db7c6ecb536a0065
3
+ metadata.gz: 1569aaf64a55d2f72df804c0fbc2dff157028a2b
4
+ data.tar.gz: '034494094425fc8a7f5560b5ae1a7be98c5f59b2'
5
5
  SHA512:
6
- metadata.gz: fd6253343ffeb9230ef1865100ce202d9125ed091c7683e738ed4a08d8a41aea3b7ae8ee1f162e986372c46eb6f389cc2cce14c3733a76cd6c8260eb743fbf05
7
- data.tar.gz: f7117667cd94204f75b1fe7650a365d95a9c76607af34e0546b3d0454c2b4a1f70243281593b5ab575dc5765a8bf293dae2916855b5e9a54633de5946f39e308
6
+ metadata.gz: c7fda30643c7b4d29c0d710bd7c338e130b4e8f7307371b621d1b34af35ba939e6f6655c673358b7fb09ef7533fea0a0e9f6a3bd5c5c1500317e81186952f64a
7
+ data.tar.gz: 0cfa7650881740db37f9717cfd450a0375f3b5d4b1015e2841794f062e66496f5c9d61ac9f022ffcae1c74b613e43ee68522f6b3948cf6df6a29f523c58323a0
@@ -1,10 +1,10 @@
1
- Given(/^I retrieve the API Management subscription key$/) do
1
+ Given(/^I retrieve the API Management subscription key secret "(.*?)" from Azure Storage Vault "(.*?)" using tenant "(.*?)" with credentials "(.*?)" and "(.*?)"$/) do |secret_name, vault_name, tenant_id, client_id, client_secret|
2
2
  if @apim_subscription_key.to_s.empty?
3
3
  @apim_subscription_key = ENV['apim_subscription_key']
4
4
 
5
5
  if @apim_subscription_key.to_s.empty?
6
6
  steps %Q{
7
- Given I retrieve the secret "APIMgmnt--End2End--Starter--Primary" from Azure Storage Vault
7
+ Given I retrieve the secret "#{secret_name}" from Azure Storage Vault "#{vault_name}" using tenant "#{tenant_id}" with credentials "#{client_id}" and "#{client_secret}"
8
8
  }
9
9
  @apim_subscription_key = @response.get_as_type "$..value", "string"
10
10
  end
@@ -18,16 +18,9 @@ Given(/^I add the API Management key header$/) do
18
18
  }
19
19
  end
20
20
 
21
- Given(/^I retrieve the secret "(.*?)" from Azure Storage Vault$/) do |secret_name|
22
- tenant_id = ENV['ALINTA_TENANTID']
23
- client_id = ENV['ALINTA_CLIENTID']
24
- client_secret = ENV['ALINTA_CLIENTSECRET']
25
- vault_name = ENV['ALINTA_VAULT']
26
- if tenant_id.nil? or client_id.nil? or client_secret.nil? or vault_name.nil?
27
- fail('One or more required environment variables have not been defined.')
28
- end
21
+ Given(/^I retrieve the secret "(.*?)" from Azure Storage Vault "(.*?)" using tenant "(.*?)" with credentials "(.*?)" and "(.*?)"$/) do |secret_name, vault_name, tenant_id, client_id, client_secret|
29
22
  steps %Q{
30
- Given I authenticate with Azure Storage Vault tenant "#{tenant_id}" using client credentials "#{client_id}" and "#{client_secret}"
23
+ Given I authenticate with Azure tenant "#{tenant_id}" using client credentials "#{client_id}" and "#{client_secret}"
31
24
  }
32
25
  access_token = @response.get_as_type "$..access_token", "string"
33
26
  steps %Q{
@@ -35,7 +28,7 @@ Given(/^I retrieve the secret "(.*?)" from Azure Storage Vault$/) do |secret_nam
35
28
  }
36
29
  end
37
30
 
38
- Given(/^I authenticate with Azure Storage Vault tenant "(.*?)" using client credentials "(.*?)" and "(.*?)"$/) do |tenant_id, client_id, client_secret|
31
+ Given(/^I authenticate with Azure tenant "(.*?)" using client credentials "(.*?)" and "(.*?)"$/) do |tenant_id, client_id, client_secret|
39
32
  steps %Q{
40
33
  Given I authenticate with "https://login.windows.net/#{tenant_id}/oauth2/token" using client credentials "#{client_id}" and "#{client_secret}"
41
34
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alinta-cucumber-rest-bdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Bragg