github.com/DerekStrickland/consul@v1.4.5/ui-v2/tests/acceptance/token-header.feature (about) 1 @setupApplicationTest 2 Feature: token headers 3 In order to authenticate with tokens 4 As a user 5 I need to be able to specify a ACL token AND/OR leave it blank to authenticate with the API 6 Scenario: Arriving at the index page having not set a token previously 7 Given 1 datacenter model with the value "datacenter" 8 When I visit the index page 9 Then the url should be /datacenter/services 10 And a GET request is made to "/v1/catalog/datacenters" from yaml 11 --- 12 headers: 13 X-Consul-Token: '' 14 --- 15 Scenario: Set the token to [Token] and then navigate to the index page 16 Given 1 datacenter model with the value "datacenter" 17 And the url "/v1/acl/tokens" responds with a 403 status 18 When I visit the tokens page for yaml 19 --- 20 dc: datacenter 21 --- 22 Then the url should be /datacenter/acls/tokens 23 Then I fill in with yaml 24 --- 25 secret: [Token] 26 --- 27 And I submit 28 When I visit the index page 29 Then the url should be /datacenter/services 30 And a GET request is made to "/v1/catalog/datacenters" from yaml 31 --- 32 headers: 33 X-Consul-Token: [Token] 34 --- 35 Where: 36 --------- 37 | Token | 38 | token | 39 | '' | 40 ---------