From 6b34e3e91a93b2aa156462dd63d998c183ff7d47 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Wed, 12 Oct 2022 19:15:29 +0200 Subject: [PATCH] Fix peering regenerate test * only dialers will show a regenerate token action * add test that receivers won't show regenerate action --- .../acceptance/dc/peers/regenerate.feature | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ui/packages/consul-ui/tests/acceptance/dc/peers/regenerate.feature b/ui/packages/consul-ui/tests/acceptance/dc/peers/regenerate.feature index a925f7887b..ce4d2e3f7f 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/peers/regenerate.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/peers/regenerate.feature @@ -6,6 +6,8 @@ Feature: dc / peers / regenerate: Regenerate Peer Token --- Name: peer-name State: ACTIVE + # dialer does not have a PeerID + PeerID: null --- And the url "/v1/peering/token" responds with from yaml --- @@ -19,3 +21,19 @@ Feature: dc / peers / regenerate: Regenerate Peer Token And I click actions on the peers And I click regenerate on the peers Then I see the text "an-encoded-token" in ".consul-peer-form-generate code" + + Scenario: + Given 1 datacenter model with the value "datacenter" + And 1 peer model from yaml + --- + Name: peer-name + State: ACTIVE + # receiver holds a PeerID + PeerID: some-id + --- + When I visit the peers page for yaml + --- + dc: datacenter + --- + And I click actions on the peers + Then I don't see regenerate on peers