2020-02-14 14:46:17 +00:00
|
|
|
@setupApplicationTest
|
2020-05-12 15:37:22 +00:00
|
|
|
Feature: dc / services / show-routing: Show Routing for Service
|
2020-02-14 14:46:17 +00:00
|
|
|
Scenario: Given a service, the Routing tab should display
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 1 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Service:
|
|
|
|
Name: service-0
|
|
|
|
ID: service-0-with-id
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And the title should be "service-0 - Consul"
|
|
|
|
And I see routing on the tabs
|
|
|
|
Scenario: Given connect is disabled, the Routing tab should not display or error
|
2020-06-10 15:07:06 +00:00
|
|
|
Given 2 datacenter models from yaml
|
|
|
|
---
|
|
|
|
- dc1
|
|
|
|
- dc2
|
|
|
|
---
|
2020-02-14 14:46:17 +00:00
|
|
|
And 1 node models
|
2020-06-10 15:07:06 +00:00
|
|
|
And 2 service model from yaml
|
2020-02-14 14:46:17 +00:00
|
|
|
---
|
|
|
|
- Service:
|
|
|
|
Name: service-0
|
|
|
|
ID: service-0-with-id
|
2020-06-10 15:07:06 +00:00
|
|
|
- Service:
|
|
|
|
Name: service-1
|
|
|
|
ID: service-1-with-id
|
2020-02-14 14:46:17 +00:00
|
|
|
---
|
|
|
|
And the url "/v1/discovery-chain/service-0?dc=dc1&ns=@namespace" responds with from yaml
|
|
|
|
---
|
|
|
|
status: 500
|
|
|
|
body: "Connect must be enabled in order to use this endpoint"
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And I don't see routing on the tabs
|
|
|
|
And I don't see the "[data-test-error]" element
|
2021-10-26 18:26:04 +00:00
|
|
|
# Not entirely sure if having one dc not having connect
|
|
|
|
# and another having connect ever actually happen
|
|
|
|
And I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc2
|
|
|
|
service: service-1
|
|
|
|
---
|
|
|
|
And I see routing on the tabs
|
|
|
|
And I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
Then a GET request wasn't made to "/v1/discovery-chain/service-0?dc=dc1&ns=@namespace"
|
|
|
|
And I don't see routing on the tabs
|
|
|
|
And I don't see the "[data-test-error]" element
|