2018-06-18 14:38:52 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: dc / services / show: Show Service
|
2018-09-12 19:23:39 +00:00
|
|
|
Scenario: Given a service with an external source, the logo is displayed
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 1 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-09-12 19:23:39 +00:00
|
|
|
Tags: ['Tag1', 'Tag2']
|
|
|
|
Meta:
|
|
|
|
external-source: consul
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
Then I see externalSource like "consul"
|
2020-01-28 14:25:52 +00:00
|
|
|
And the title should be "service-0 - Consul"
|
|
|
|
|
2018-11-26 17:34:00 +00:00
|
|
|
Scenario: Given a service with an 'unsupported' external source, there is no logo
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 1 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-11-26 17:34:00 +00:00
|
|
|
Tags: ['Tag1', 'Tag2']
|
|
|
|
Meta:
|
|
|
|
external-source: 'not-supported'
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
Then I don't see externalSource
|
2018-06-20 12:08:59 +00:00
|
|
|
Scenario: Given various services with various tags, all tags are displayed
|
2018-06-18 14:38:52 +00:00
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 3 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-06-18 14:38:52 +00:00
|
|
|
Tags: ['Tag1', 'Tag2']
|
|
|
|
- Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-06-18 14:38:52 +00:00
|
|
|
Tags: ['Tag3', 'Tag1']
|
|
|
|
- Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-06-18 14:38:52 +00:00
|
|
|
Tags: ['Tag2', 'Tag3']
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
2020-04-08 09:56:36 +00:00
|
|
|
And I click tags on the tabs
|
2018-06-20 14:26:22 +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)"
|
|
|
|
Then I see the text "Tag3" in "[data-test-tags] span:nth-child(3)"
|
2019-02-21 13:10:53 +00:00
|
|
|
Scenario: Given various services the various nodes on their instances are displayed
|
2018-06-20 12:08:59 +00:00
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 3 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Checks:
|
2020-11-19 16:05:46 +00:00
|
|
|
- Status: critical
|
2018-06-20 12:08:59 +00:00
|
|
|
Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-07-12 12:35:33 +00:00
|
|
|
ID: passing-service-8080
|
2018-06-20 12:08:59 +00:00
|
|
|
Port: 8080
|
|
|
|
Address: 1.1.1.1
|
2018-07-18 12:35:57 +00:00
|
|
|
Node:
|
|
|
|
Address: 1.2.2.2
|
2020-11-19 16:05:46 +00:00
|
|
|
- Checks:
|
|
|
|
- Status: warning
|
|
|
|
Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-07-12 12:35:33 +00:00
|
|
|
ID: service-8000
|
2018-06-20 12:08:59 +00:00
|
|
|
Port: 8000
|
|
|
|
Address: 2.2.2.2
|
2018-07-18 12:35:57 +00:00
|
|
|
Node:
|
|
|
|
Address: 2.3.3.3
|
2020-11-19 16:05:46 +00:00
|
|
|
- Checks:
|
|
|
|
- Status: passing
|
|
|
|
Service:
|
2020-05-06 18:13:36 +00:00
|
|
|
Kind: ~
|
2018-07-12 12:35:33 +00:00
|
|
|
ID: service-8888
|
2018-06-20 12:08:59 +00:00
|
|
|
Port: 8888
|
|
|
|
Address: 3.3.3.3
|
2018-07-18 12:35:57 +00:00
|
|
|
Node:
|
|
|
|
Address: 3.4.4.4
|
2018-06-20 12:08:59 +00:00
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
2020-10-05 17:07:35 +00:00
|
|
|
And I click instances on the tabs
|
2019-02-21 13:10:53 +00:00
|
|
|
Then I see address on the instances like yaml
|
2018-06-20 12:08:59 +00:00
|
|
|
---
|
|
|
|
- "1.1.1.1:8080"
|
|
|
|
- "2.2.2.2:8000"
|
|
|
|
- "3.3.3.3:8888"
|
|
|
|
---
|
2022-10-11 15:59:53 +00:00
|
|
|
Scenario: Given a combination of sources I should see them all on the instances
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 3 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Checks:
|
|
|
|
- Status: critical
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: passing-service-8080
|
|
|
|
Port: 8080
|
|
|
|
Address: 1.1.1.1
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 1.2.2.2
|
|
|
|
Meta:
|
|
|
|
synthetic-node: false
|
|
|
|
- Checks:
|
|
|
|
- Status: passing
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: service-8000
|
|
|
|
Port: 8000
|
|
|
|
Address: 2.2.2.2
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 2.3.3.3
|
|
|
|
Meta:
|
|
|
|
synthetic-node: false
|
|
|
|
- Checks:
|
|
|
|
- Status: passing
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: service-8888
|
|
|
|
Port: 8888
|
|
|
|
Address: 3.3.3.3
|
|
|
|
Meta:
|
|
|
|
external-source: vault
|
|
|
|
Node:
|
|
|
|
Address: 3.4.4.4
|
|
|
|
Meta:
|
|
|
|
synthetic-node: false
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And I click instances on the tabs
|
|
|
|
Then I see externalSource on the instances vertically like yaml
|
|
|
|
---
|
|
|
|
- "kubernetes"
|
|
|
|
- "kubernetes"
|
|
|
|
- "vault"
|
|
|
|
---
|
|
|
|
And I see nodeName on the instances like yaml
|
|
|
|
---
|
|
|
|
- "node-0"
|
|
|
|
- "node-1"
|
|
|
|
- "node-2"
|
|
|
|
---
|
|
|
|
And I see nodeChecks on the instances
|
|
|
|
Scenario: Given instances share the same external source, only show it at the top
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 3 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Checks:
|
|
|
|
- Status: critical
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: passing-service-8080
|
|
|
|
Port: 8080
|
|
|
|
Address: 1.1.1.1
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 1.2.2.2
|
|
|
|
Meta:
|
|
|
|
synthetic-node: true
|
|
|
|
- Checks:
|
|
|
|
- Status: passing
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: service-8000
|
|
|
|
Port: 8000
|
|
|
|
Address: 2.2.2.2
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 2.3.3.3
|
|
|
|
Meta:
|
|
|
|
synthetic-node: true
|
|
|
|
- Checks:
|
|
|
|
- Status: passing
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: service-8888
|
|
|
|
Port: 8888
|
|
|
|
Address: 3.3.3.3
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 3.4.4.4
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And I click instances on the tabs
|
|
|
|
Then I see externalSource like "kubernetes"
|
|
|
|
And I don't see externalSource on the instances
|
|
|
|
Scenario: Given one agentless instance, it should not show node health checks or node name
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 1 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Checks:
|
|
|
|
- Status: critical
|
|
|
|
Service:
|
|
|
|
Kind: ~
|
|
|
|
ID: passing-service-8080
|
|
|
|
Port: 8080
|
|
|
|
Address: 1.1.1.1
|
|
|
|
Meta:
|
|
|
|
external-source: kubernetes
|
|
|
|
Node:
|
|
|
|
Address: 1.2.2.2
|
|
|
|
Meta:
|
|
|
|
synthetic-node: true
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And I click instances on the tabs
|
|
|
|
And I don't see nodeChecks on the instances
|
|
|
|
And I don't see nodeName on the instances
|
2019-05-02 13:35:42 +00:00
|
|
|
Scenario: Given a dashboard template has been set
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
2020-12-15 15:34:54 +00:00
|
|
|
And ui_config from yaml
|
|
|
|
---
|
|
|
|
dashboard_url_templates:
|
|
|
|
service: https://something.com?{{Service.Name}}&{{Datacenter}}
|
|
|
|
---
|
2019-05-02 13:35:42 +00:00
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
2021-09-15 18:50:11 +00:00
|
|
|
# The external dashboard link should use the Service.Name not the ID
|
|
|
|
And I see href on the dashboardAnchor like "https://something.com?service-0&dc1"
|
2021-02-19 16:42:16 +00:00
|
|
|
Scenario: With no access to service
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And permissions from yaml
|
|
|
|
---
|
|
|
|
service:
|
|
|
|
read: false
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
Then I see status on the error like "403"
|
|
|
|
Scenario: When access is removed from a service
|
|
|
|
Given 1 datacenter model with the value "dc1"
|
|
|
|
And 1 node models
|
|
|
|
And 1 service model from yaml
|
|
|
|
And a network latency of 100
|
|
|
|
And permissions from yaml
|
|
|
|
---
|
|
|
|
service:
|
|
|
|
read: true
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: dc1
|
|
|
|
service: service-0
|
|
|
|
---
|
|
|
|
And I click instances on the tabs
|
|
|
|
And I see 1 instance model
|
|
|
|
Given permissions from yaml
|
|
|
|
---
|
|
|
|
service:
|
|
|
|
read: false
|
|
|
|
---
|
|
|
|
# authorization requests are not blocking so we just wait until the next
|
|
|
|
# service blocking query responds
|
|
|
|
Then pause until I see the text "no longer have access" in "[data-notification]"
|
2023-03-06 22:10:09 +00:00
|
|
|
And "[data-notification]" has the "hds-toast" class
|
|
|
|
And "[data-notification]" has the "hds-alert--color-critical" class
|
2021-02-19 16:42:16 +00:00
|
|
|
And I see status on the error like "403"
|
|
|
|
|