-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Any per request headers should overwrite any 'global' headers...
...not the other way around Also, 'made sure' data isn't added to the URL for GET requests Also, added a test that catches and errors before this change happened With this change the test passes
- Loading branch information
John Cowen
committed
Aug 23, 2019
1 parent
d942a69
commit 4245db6
Showing
3 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@setupApplicationTest | ||
Feature: dc / acls / tokens / login | ||
Scenario: Logging into the ACLs login page | ||
Given 1 datacenter model with the value "dc-1" | ||
And the url "/v1/acl/tokens" responds with a 403 status | ||
When I visit the tokens page for yaml | ||
--- | ||
dc: dc-1 | ||
--- | ||
Then the url should be /dc-1/acls/tokens | ||
And I fill in with yaml | ||
--- | ||
secret: something | ||
--- | ||
And I submit | ||
Then a GET request is made to "/v1/acl/token/self?dc=dc-1" from yaml | ||
--- | ||
headers: | ||
X-Consul-Token: something | ||
--- |
10 changes: 10 additions & 0 deletions
10
ui-v2/tests/acceptance/steps/dc/acls/tokens/login-steps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import steps from '../../../steps'; | ||
|
||
// step definitions that are shared between features should be moved to the | ||
// tests/acceptance/steps/steps.js file | ||
|
||
export default function(assert) { | ||
return steps(assert).then('I should find a file', function() { | ||
assert.ok(true, this.step); | ||
}); | ||
} |