mirror of
https://github.com/status-im/consul.git
synced 2025-02-05 18:33:48 +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
35 lines
1.0 KiB
Gherkin
35 lines
1.0 KiB
Gherkin
@setupApplicationTest
|
|
Feature: dc / error: Recovering from a dc 500 error
|
|
Background:
|
|
Given 2 datacenter models from yaml
|
|
---
|
|
- dc-1
|
|
- dc-500
|
|
---
|
|
And 3 service models from yaml
|
|
---
|
|
- Name: Service-0
|
|
Kind: ~
|
|
- Name: Service-1
|
|
Kind: ~
|
|
- Name: Service-2
|
|
Kind: ~
|
|
---
|
|
And the url "/v1/internal/ui/services" responds with a 500 status
|
|
When I visit the services page for yaml
|
|
---
|
|
dc: dc-500
|
|
---
|
|
Then the url should be /dc-500/services
|
|
And the title should be "Consul"
|
|
Then I see status on the error like "500"
|
|
Scenario: Clicking the back to root button
|
|
Given the url "/v1/internal/ui/services" responds with a 200 status
|
|
When I click home
|
|
Then I see 3 service models
|
|
Scenario: Choosing a different dc from the dc menu
|
|
Given the url "/v1/internal/ui/services" responds with a 200 status
|
|
When I click dc on the navigation
|
|
And I click dcs.0.name on the navigation
|
|
Then I see 3 service models
|