open-consul/ui-v2/tests/acceptance/dc/acls/use.feature
John Cowen d1b3a63b2f
UI: Catch 500 error on token endpoint and revert to legacy tokens (#4874)
In some circumstances a consul 1.4 client could be running in an
un-upgraded 1.3 or lower cluster. Currently this gives a 500 error on
the new ACL token endpoint. Here we catch this specific 500 error/message
and set the users AccessorID to null. Elsewhere in the frontend we use
this fact (AccessorID being null) to decide whether to present the
legacy or the new ACL UI to the user.

Also:
- Re-adds in most of the old style ACL acceptance tests, now that we are keeping the old style UI
- Restricts code editors to HCL only mode for all `Rules` editing (legacy/'half legacy'/new style)
- Adds a [Stop using] button to the old style ACL rows so its possible to logout.
- Updates copy and documentation links for the upgrade notices
2018-11-02 14:44:36 +00:00

46 lines
1.3 KiB
Gherkin

@setupApplicationTest
Feature: dc / acls / use: Using an ACL token
Background:
Given 1 datacenter model with the value "datacenter"
And I'm using a legacy token
And 1 acl model from yaml
---
ID: token
---
Scenario: Using an ACL token from the listing page
When I visit the acls page for yaml
---
dc: datacenter
---
Then I have settings like yaml
---
consul:token: '{"AccessorID":null,"SecretID":"id"}'
---
And I click actions on the acls
And I click use on the acls
And I click confirmUse on the acls
Then "[data-notification]" has the "notification-use" class
And "[data-notification]" has the "success" class
Then I have settings like yaml
---
consul:token: '{"AccessorID":null,"SecretID":"token"}'
---
Scenario: Using an ACL token from the detail page
When I visit the acl page for yaml
---
dc: datacenter
acl: token
---
Then I have settings like yaml
---
consul:token: '{"AccessorID":null,"SecretID":"id"}'
---
And I click use
And I click confirmUse
Then "[data-notification]" has the "notification-use" class
And "[data-notification]" has the "success" class
Then I have settings like yaml
---
consul:token: '{"AccessorID":null,"SecretID":"token"}'
---