-
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.
- Loading branch information
John Cowen
committed
May 7, 2021
1 parent
dd9cf90
commit e481d57
Showing
5 changed files
with
128 additions
and
1 deletion.
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
40 changes: 40 additions & 0 deletions
40
ui/packages/consul-ui/tests/acceptance/dc/nodes/show/health-checks.feature
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,40 @@ | ||
@setupApplicationTest | ||
Feature: dc / nodes / show / health-checks | ||
Background: | ||
Given 1 datacenter model with the value "dc1" | ||
Scenario: A failing serf check | ||
Given 1 node model from yaml | ||
--- | ||
ID: node-0 | ||
Checks: | ||
- Type: '' | ||
Name: Serf Health Status | ||
CheckID: serfHealth | ||
Status: critical | ||
Output: ouch | ||
--- | ||
When I visit the node page for yaml | ||
--- | ||
dc: dc1 | ||
node: node-0 | ||
--- | ||
And I see healthChecksIsSelected on the tabs | ||
And I see criticalSerfNotice on the tabs.healthChecksTab | ||
Scenario: A passing serf check | ||
Given 1 node model from yaml | ||
--- | ||
ID: node-0 | ||
Checks: | ||
- Type: '' | ||
Name: Serf Health Status | ||
CheckID: serfHealth | ||
Status: passing | ||
Output: Agent alive and reachable | ||
--- | ||
When I visit the node page for yaml | ||
--- | ||
dc: dc1 | ||
node: node-0 | ||
--- | ||
And I see healthChecksIsSelected on the tabs | ||
And I don't see criticalSerfNotice on the tabs.healthChecksTab |
66 changes: 66 additions & 0 deletions
66
ui/packages/consul-ui/tests/acceptance/dc/services/instances/health-checks.feature
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,66 @@ | ||
@setupApplicationTest | ||
Feature: dc / services / instances / health-checks | ||
Background: | ||
Given 1 datacenter model with the value "dc1" | ||
And 1 proxy model from yaml | ||
--- | ||
- ServiceProxy: | ||
DestinationServiceName: service-1 | ||
DestinationServiceID: ~ | ||
--- | ||
Scenario: A failing serf check | ||
Given 2 instance models from yaml | ||
--- | ||
- Service: | ||
ID: service-0-with-id | ||
Node: | ||
Node: node-0 | ||
- Service: | ||
ID: service-1-with-id | ||
Node: | ||
Node: another-node | ||
Checks: | ||
- Type: '' | ||
Name: Serf Health Status | ||
CheckID: serfHealth | ||
Status: critical | ||
Output: ouch | ||
--- | ||
When I visit the instance page for yaml | ||
--- | ||
dc: dc1 | ||
service: service-0 | ||
node: another-node | ||
id: service-1-with-id | ||
--- | ||
Then the url should be /dc1/services/service-0/instances/another-node/service-1-with-id/health-checks | ||
And I see healthChecksIsSelected on the tabs | ||
And I see criticalSerfNotice on the tabs.healthChecksTab | ||
Scenario: A passing serf check | ||
Given 2 instance models from yaml | ||
--- | ||
- Service: | ||
ID: service-0-with-id | ||
Node: | ||
Node: node-0 | ||
- Service: | ||
ID: service-1-with-id | ||
Node: | ||
Node: another-node | ||
Checks: | ||
- Type: '' | ||
Name: Serf Health Status | ||
CheckID: serfHealth | ||
Status: passing | ||
Output: Agent alive and reachable | ||
--- | ||
When I visit the instance page for yaml | ||
--- | ||
dc: dc1 | ||
service: service-0 | ||
node: another-node | ||
id: service-1-with-id | ||
--- | ||
Then the url should be /dc1/services/service-0/instances/another-node/service-1-with-id/health-checks | ||
And I see healthChecksIsSelected on the tabs | ||
And I don't see criticalSerfNotice on the tabs.healthChecksTab |
10 changes: 10 additions & 0 deletions
10
ui/packages/consul-ui/tests/acceptance/steps/dc/nodes/show/health-checks-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); | ||
}); | ||
} |
10 changes: 10 additions & 0 deletions
10
ui/packages/consul-ui/tests/acceptance/steps/dc/services/instances/health-checks-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); | ||
}); | ||
} |