Skip to content

Commit

Permalink
Fixed unstable overview actions tests. Fixed DR hosts tests after las…
Browse files Browse the repository at this point in the history
…t fix. Fixed logs tab failures.
  • Loading branch information
hhovsepy committed Apr 20, 2021
1 parent 8d682d7 commit 5775010
Show file tree
Hide file tree
Showing 14 changed files with 170 additions and 165 deletions.
4 changes: 2 additions & 2 deletions data/resources/istio_objects/dr_hosts/dest-rules1.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-1
name: auto-mongodb-dr-1
namespace: bookinfo
spec:
host: reviews
host: mongodb
trafficPolicy:
loadBalancer:
simple: RANDOM
Expand Down
4 changes: 2 additions & 2 deletions data/resources/istio_objects/dr_hosts/dest-rules2.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-2
name: auto-mongodb-dr-2
namespace: bookinfo
spec:
host: reviews.bookinfo
host: mongodb.bookinfo
trafficPolicy:
loadBalancer:
simple: RANDOM
Expand Down
4 changes: 2 additions & 2 deletions data/resources/istio_objects/dr_hosts/dest-rules3.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-3
name: auto-mongodb-dr-3
namespace: bookinfo
spec:
host: reviews.bookinfo.svc.cluster.local
host: mongodb.bookinfo.svc.cluster.local
trafficPolicy:
loadBalancer:
simple: RANDOM
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules4.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-4
name: auto-mongodb-dr-4
namespace: bookinfo
spec:
host: kubernetes.default.svc.cluster.local
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules5.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-5
name: auto-mongodb-dr-5
namespace: bookinfo
spec:
host: "*.svc.cluster.local"
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules6.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-6
name: auto-mongodb-dr-6
namespace: bookinfo
spec:
host: "*.cluster.local"
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules7.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-7
name: auto-mongodb-dr-7
namespace: bookinfo
spec:
host: "*.local"
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules8.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-8
name: auto-mongodb-dr-8
namespace: bookinfo
spec:
host: "*.bookinfo.svc.cluster.local"
Expand Down
2 changes: 1 addition & 1 deletion data/resources/istio_objects/dr_hosts/dest-rules9.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: auto-reviews-dr-9
name: auto-mongodb-dr-9
namespace: bookinfo
spec:
host: "www.google.com"
Expand Down
11 changes: 5 additions & 6 deletions kiali_qe/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2734,6 +2734,9 @@ def overview_action_options(self, namespace):
logger=logger).options
return None

def overview_action_present(self, namespace, action):
return action in self.overview_action_options(namespace)

def select_action(self, namespace, action):
_options = self.overview_action_options(namespace)
if action in _options:
Expand Down Expand Up @@ -3652,11 +3655,7 @@ class LogsView(TabViewAbstract):
duration = DropDown(locator=DROP_DOWN.format('metrics_filter_interval_duration'))
interval = DropDown(locator=DROP_DOWN.format('metrics-refresh'))
refresh = Button(locator='//button[@id="refresh_button"]')
pod_textarea = Text(locator='//textarea/..//div[contains(@class, "pf-l-toolbar__item") '
'and not(contains(normalize-space(text()), '
'"Istio proxy (sidecar)"))]/../../textarea')
proxy_textarea = Text(locator='//div[contains(normalize-space(text()), '
'"Istio proxy (sidecar)")]/../../textarea')
logs_textarea = Text(locator='//div[@id="logsText"]')

def open(self):
tab = self.browser.element(locator=self.LOGS_TAB,
Expand All @@ -3669,8 +3668,8 @@ def open(self):
except StaleElementReferenceException:
pass
wait_to_spinner_disappear(self.browser)
self.logs_switch = ButtonSwitch(parent=self, label="Side by Side")
self.log_hide = FilterInput(parent=self, locator='//input[@id="log_hide"]')
self.log_show = FilterInput(parent=self, locator='//input[@id="log_show"]')


class MetricsView(TabViewAbstract):
Expand Down
14 changes: 7 additions & 7 deletions kiali_qe/components/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ class TimeIntervalRestParam(StringEnum):


class TailLines(StringEnum):
LINES_10 = ('Last 10 lines')
LINES_50 = ('Last 50 lines')
LINES_100 = ('Last 100 lines')
LINES_300 = ('Last 300 lines')
LINES_500 = ('Last 500 lines')
LINES_1000 = ('Last 1000 lines')
LINES_5000 = ('Last 5000 lines')
LINES_10 = ('10 lines')
LINES_50 = ('50 lines')
LINES_100 = ('100 lines')
LINES_300 = ('300 lines')
LINES_500 = ('500 lines')
LINES_1000 = ('1000 lines')
LINES_5000 = ('5000 lines')
LINES_ALL = ('All lines')


Expand Down
Loading

0 comments on commit 5775010

Please sign in to comment.