mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 11:40:06 +00:00
6e396e4456
* ui: Gracefully recover from non-existent DC errors This PR fixes what happens in the UI if you try to navigate to a non-existing DC. When we received a 500 error from an API response due to a non-existent DC, previously we would show a 404 error, which is what we were trying to convey. But in the spirit of the UI being a 'thin client', its probably best to just show the 500 error from the API response, which may help folks to debug any issues better. * Automatically set the CONSUL_DATACENTER_LOCAL env var for testing
33 lines
995 B
Gherkin
33 lines
995 B
Gherkin
@setupApplicationTest
|
|
Feature: dc / services / error
|
|
Scenario: Arriving at the service page that doesn't exist
|
|
Given 2 datacenter models from yaml
|
|
---
|
|
- dc-1
|
|
- dc-2
|
|
---
|
|
Given the url "/v1/internal/ui/services" responds with a 500 status
|
|
When I visit the services page for yaml
|
|
---
|
|
dc: non-existent-datacenter
|
|
---
|
|
Then I see status on the error like "500"
|
|
@notNamespaceable
|
|
Scenario: Arriving at the service page
|
|
Given 2 datacenter models from yaml
|
|
---
|
|
- dc-1
|
|
- dc-2
|
|
---
|
|
Given the url "/v1/internal/ui/services" responds with a 500 status
|
|
When I visit the services page for yaml
|
|
---
|
|
dc: dc-1
|
|
---
|
|
Then I see status on the error like "500"
|
|
# This is the actual step that works slightly differently
|
|
# When running through namespaces as the dc menu says 'Error'
|
|
# which is still kind of ok
|
|
When I click dc on the navigation
|
|
And I see 2 datacenter models on the navigation component
|