2019-03-07 10:51:39 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: dc / services / instances / show: Show Service Instance
|
2019-03-22 17:24:40 +00:00
|
|
|
Background:
|
2019-03-07 10:51:39 +00:00
|
|
|
Given 1 datacenter model with the value "dc1"
|
2022-10-07 10:01:34 +00:00
|
|
|
And 3 instance models from yaml
|
2019-03-07 10:51:39 +00:00
|
|
|
---
|
2019-06-11 09:18:50 +00:00
|
|
|
- Service:
|
|
|
|
ID: service-0-with-id
|
|
|
|
Meta:
|
|
|
|
external-source: consul
|
|
|
|
Node:
|
|
|
|
Node: node-0
|
2019-03-07 10:51:39 +00:00
|
|
|
- Service:
|
2020-05-07 13:57:15 +00:00
|
|
|
ID: service-1-with-id
|
2019-03-07 10:51:39 +00:00
|
|
|
Tags: ['Tag1', 'Tag2']
|
|
|
|
Meta:
|
2019-09-04 09:13:43 +00:00
|
|
|
consul-dashboard-url: http://url.com
|
2019-03-07 10:51:39 +00:00
|
|
|
external-source: nomad
|
2019-09-04 09:13:43 +00:00
|
|
|
test-meta: test-meta-value
|
2019-06-11 09:18:50 +00:00
|
|
|
Node:
|
2019-06-20 08:37:17 +00:00
|
|
|
Node: another-node
|
2019-03-07 10:51:39 +00:00
|
|
|
Checks:
|
|
|
|
- Name: Service check
|
|
|
|
ServiceID: service-0
|
|
|
|
Output: Output of check
|
|
|
|
Status: passing
|
|
|
|
- Name: Service check
|
|
|
|
ServiceID: service-0
|
|
|
|
Output: Output of check
|
|
|
|
Status: warning
|
|
|
|
- Name: Service check
|
2019-11-25 18:45:10 +00:00
|
|
|
Type: http
|
2019-03-07 10:51:39 +00:00
|
|
|
ServiceID: service-0
|
|
|
|
Output: Output of check
|
|
|
|
Status: critical
|
|
|
|
- Name: Node check
|
|
|
|
ServiceID: ""
|
|
|
|
Output: Output of check
|
|
|
|
Status: passing
|
|
|
|
- Name: Node check
|
|
|
|
ServiceID: ""
|
|
|
|
Output: Output of check
|
|
|
|
Status: warning
|
|
|
|
- Name: Node check
|
|
|
|
ServiceID: ""
|
|
|
|
Output: Output of check
|
|
|
|
Status: critical
|
2022-10-07 10:01:34 +00:00
|
|
|
- Service:
|
|
|
|
ID: service-2-with-id
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
synthetic-node: true
|
|
|
|
Node:
|
|
|
|
Node: node-2
|
|
|
|
Meta:
|
|
|
|
synthetic-node: true
|
2019-03-07 10:51:39 +00:00
|
|
|
---
|
2019-11-25 18:45:10 +00:00
|
|
|
Scenario: A Service instance has no Proxy
|
2020-10-02 08:09:05 +00:00
|
|
|
Given 1 proxy model from yaml
|
|
|
|
---
|
|
|
|
- ServiceProxy:
|
|
|
|
DestinationServiceName: service-1
|
|
|
|
DestinationServiceID: ~
|
2020-05-07 13:57:15 +00:00
|
|
|
---
|
2019-03-07 10:51:39 +00:00
|
|
|
When I visit the instance page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
2019-06-20 08:37:17 +00:00
|
|
|
node: another-node
|
2020-05-07 13:57:15 +00:00
|
|
|
id: service-1-with-id
|
2019-03-07 10:51:39 +00:00
|
|
|
---
|
2020-05-07 13:57:15 +00:00
|
|
|
Then the url should be /dc1/services/service-0/instances/another-node/service-1-with-id/health-checks
|
2019-03-07 10:51:39 +00:00
|
|
|
Then I see externalSource like "nomad"
|
2022-10-07 10:01:34 +00:00
|
|
|
And I see the text "another-node" in "[data-test-service-instance-node-name]"
|
2019-03-07 10:51:39 +00:00
|
|
|
|
|
|
|
And I don't see upstreams on the tabs
|
2020-04-22 14:40:59 +00:00
|
|
|
And I see healthChecksIsSelected on the tabs
|
2022-10-14 00:45:15 +00:00
|
|
|
And I see 6 healthCheck models
|
2019-03-07 10:51:39 +00:00
|
|
|
|
2020-05-26 15:52:32 +00:00
|
|
|
When I click tags&Meta on the tabs
|
|
|
|
And I see tags&MetaIsSelected on the tabs
|
2019-03-07 10:51:39 +00:00
|
|
|
|
|
|
|
Then I see the text "Tag1" in "[data-test-tags] span:nth-child(1)"
|
|
|
|
Then I see the text "Tag2" in "[data-test-tags] span:nth-child(2)"
|
2020-05-04 18:06:25 +00:00
|
|
|
And I see 3 of the metadata object
|
2020-05-07 13:57:15 +00:00
|
|
|
And the title should be "service-1-with-id - Consul"
|
2019-08-02 11:53:52 +00:00
|
|
|
|
2019-03-22 17:24:40 +00:00
|
|
|
Scenario: A Service instance warns when deregistered whilst blocking
|
2020-05-07 13:57:15 +00:00
|
|
|
Given 1 proxy model from yaml
|
2020-10-02 08:09:05 +00:00
|
|
|
---
|
|
|
|
- ServiceProxy:
|
|
|
|
DestinationServiceName: service-1
|
|
|
|
DestinationServiceID: ~
|
2020-05-07 13:57:15 +00:00
|
|
|
---
|
2019-03-22 17:24:40 +00:00
|
|
|
Given settings from yaml
|
|
|
|
---
|
|
|
|
consul:client:
|
|
|
|
blocking: 1
|
|
|
|
throttle: 200
|
|
|
|
---
|
|
|
|
And a network latency of 100
|
|
|
|
When I visit the instance page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
2019-06-11 09:18:50 +00:00
|
|
|
node: node-0
|
2019-03-22 17:24:40 +00:00
|
|
|
id: service-0-with-id
|
|
|
|
---
|
2020-04-22 14:40:59 +00:00
|
|
|
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks
|
2019-03-22 17:24:40 +00:00
|
|
|
And an external edit results in 0 instance models
|
|
|
|
And pause until I see the text "deregistered" in "[data-notification]"
|
2020-05-07 13:57:15 +00:00
|
|
|
Scenario: A Service instance without a Proxy does not display Proxy Info tab
|
|
|
|
Given 1 proxy model from yaml
|
2020-10-02 08:09:05 +00:00
|
|
|
---
|
|
|
|
- ServiceProxy:
|
|
|
|
DestinationServiceName: service-1
|
|
|
|
DestinationServiceID: ~
|
2020-05-07 13:57:15 +00:00
|
|
|
---
|
|
|
|
When I visit the instance page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
node: node-0
|
|
|
|
id: service-0-with-id
|
|
|
|
---
|
|
|
|
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks
|
2020-10-02 08:09:05 +00:00
|
|
|
And I don't see proxy on the tabs
|
2022-10-07 10:01:34 +00:00
|
|
|
Scenario: A Service instance with a synthetic node does not display the node name
|
|
|
|
When I visit the instance page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-2
|
|
|
|
node: node-2
|
|
|
|
id: service-2-with-id
|
|
|
|
---
|
|
|
|
Then the url should be /dc1/services/service-2/instances/node-2/service-2-with-id/health-checks
|
|
|
|
Then I see externalSource like "kubernetes"
|
|
|
|
And I don't see the text "node-2" in "[data-test-service-instance-node-name]"
|