2021-01-19 15:40:39 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: dc / services / show / topology: Intention Create
|
|
|
|
Background:
|
|
|
|
Given 1 datacenter model with the value "datacenter"
|
2021-02-18 18:31:49 +00:00
|
|
|
And the local datacenter is "datacenter"
|
2021-01-19 15:40:39 +00:00
|
|
|
And 1 intention model from yaml
|
|
|
|
---
|
|
|
|
SourceNS: default
|
|
|
|
SourceName: web
|
|
|
|
DestinationNS: default
|
|
|
|
DestinationName: db
|
|
|
|
ID: intention-id
|
|
|
|
---
|
|
|
|
And 1 node model
|
|
|
|
And 1 service model from yaml
|
|
|
|
---
|
|
|
|
- Service:
|
|
|
|
Name: web
|
|
|
|
Kind: ~
|
|
|
|
---
|
|
|
|
And 1 topology model from yaml
|
|
|
|
---
|
|
|
|
Downstreams: []
|
|
|
|
Upstreams:
|
|
|
|
- Name: db
|
|
|
|
Namespace: default
|
|
|
|
Datacenter: datacenter
|
|
|
|
Intention: {}
|
|
|
|
---
|
2021-02-18 18:31:49 +00:00
|
|
|
Scenario: Metrics is not enabled with prometheus provider
|
2021-01-19 15:40:39 +00:00
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
service: web
|
|
|
|
---
|
2021-02-18 18:31:49 +00:00
|
|
|
And I don't see the "[data-test-sparkline]" element
|
|
|
|
Scenario: Metrics is enabled with prometheus provider
|
|
|
|
Given 1 datacenter model with the value "datacenter"
|
|
|
|
And the local datacenter is "datacenter"
|
|
|
|
And ui_config from yaml
|
|
|
|
---
|
|
|
|
metrics_proxy_enabled: true
|
|
|
|
metrics_provider: 'prometheus'
|
|
|
|
---
|
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
service: web
|
|
|
|
---
|
|
|
|
And I see the "[data-test-sparkline]" element
|
2021-01-19 15:40:39 +00:00
|
|
|
Scenario: Allow a connection between service and upstream by saving an intention
|
2021-02-18 18:31:49 +00:00
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
service: web
|
|
|
|
---
|
2021-01-19 15:40:39 +00:00
|
|
|
When I click ".consul-topology-metrics [data-test-action]"
|
|
|
|
And I click ".consul-topology-metrics [data-test-confirm]"
|
|
|
|
And "[data-notification]" has the "success" class
|
|
|
|
Scenario: There was an error saving the intention
|
|
|
|
Given the url "/v1/connect/intentions/exact?source=default%2Fweb&destination=default%2Fdb&dc=datacenter" responds with a 500 status
|
2021-02-18 18:31:49 +00:00
|
|
|
When I visit the service page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
service: web
|
|
|
|
---
|
2021-01-19 15:40:39 +00:00
|
|
|
When I click ".consul-topology-metrics [data-test-action]"
|
|
|
|
And I click ".consul-topology-metrics [data-test-confirm]"
|
|
|
|
And "[data-notification]" has the "error" class
|
|
|
|
|