John Cowen e8722e6a35
ui: Normal proxies link to services, sidecars to instances (#5944)
* ui: Normal proxies line to services, sidecars to instances

Following on from https://github.com/hashicorp/consul/pull/5933 we
noticed that 'normal' proxies should link to the service, rather than
the service instance. Additionally proxy 'searching' within the
repository should take into account the name of the node that the
originating service is on (sidecar proxies are generally co-located)

Added an additional test here to prove that a sidecar-proxy with the
same service id but on a different node does not show the sidecar proxy
link.
2019-06-20 09:37:17 +01:00

43 lines
1.3 KiB
Gherkin

@setupApplicationTest
Feature: dc / services / instances / with-sidecar: Show Service Instance with a Sidecar Proxy
Scenario: A Service instance has a Sidecar Proxy (a DestinationServiceID)
Given 1 datacenter model with the value "dc1"
And 1 proxy model from yaml
---
- Node: node-0
ServiceProxy:
DestinationServiceID: service-0-with-id
DestinationServiceName: ~
---
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/node-0/service-0-with-id
And I see type on the proxy like "sidecar-proxy"
And I see serviceChecksIsSelected on the tabs
And I don't see upstreams on the tabs
Scenario: A Service instance has no Sidecar Proxy (a DestinationServiceID) on the same node
Given 1 datacenter model with the value "dc1"
And 1 proxy model from yaml
---
- Node: node-1
ServiceProxy:
DestinationServiceID: service-0-with-id
DestinationServiceName: ~
---
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/node-0/service-0-with-id
Then I don't see type on the proxy