Skip to content

Commit d6a959d

Browse files
committed
Remove keywords to start/stop prom/loki
1 parent ffd2d49 commit d6a959d

File tree

3 files changed

+12
-43
lines changed

3 files changed

+12
-43
lines changed
Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
*** Settings ***
2-
Documentation Keywords common to observability test suites
2+
Documentation Variables common to observability test suites
33
44

5-
*** Keywords ***
6-
Start Prometheus Server
7-
[Documentation] Start a Prometheus Server on port 9092
8-
[Arguments] ${port}=9092
9-
Local Command Should Work bash -x ./bin/manage_prometheus.sh start ${port}
10-
11-
Stop Prometheus Server
12-
[Documentation] Stop the Prometheus Server
13-
[Arguments] ${port}=9092
14-
Local Command Should Work bash -x ./bin/manage_prometheus.sh stop ${port}
15-
16-
Start Loki Server
17-
[Documentation] Start a Loki Server on port 3100
18-
[Arguments] ${port}=3100
19-
Local Command Should Work bash -x ./bin/manage_loki.sh start ${port}
20-
21-
Stop Loki Server
22-
[Documentation] Stop the Loki Server
23-
[Arguments] ${port}=3100
24-
Local Command Should Work bash -x ./bin/manage_loki.sh stop ${port}
5+
*** Variables ***
6+
${PROMETHEUS_PORT} 9090
7+
${LOKI_PORT} 3100
8+
${PROM_EXPORTER_PORT} 8889

test/suites/optional/observability.robot

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ Logs Should Not Contain Receiver Errors
6565
Setup Suite And Prepare Test Host
6666
[Documentation] The service starts after MicroShift starts and thus will start generating pertinent log data
6767
... right away. When the suite is executed, immediately get the cursor for the microshift-observability unit.
68-
Start Prometheus Server ${PROMETHEUS_PORT}
69-
Start Loki Server ${LOKI_PORT}
7068
Setup Suite
7169
Check Required Observability Variables
7270
Set Test OTEL Configuration
@@ -79,10 +77,8 @@ Check Required Observability Variables
7977
${string_value} Convert To String ${PROMETHEUS_PORT}
8078
Should Not Be Empty ${string_value} PROMETHEUS_PORT variable is required
8179
Should Not Be Empty ${LOKI_HOST} LOKI_HOST variable is required
82-
${string_value} Convert To String ${LOKI_PORT}
83-
Should Not Be Empty ${string_value} LOKI_PORT variable is required
84-
${string_value} Convert To String ${PROM_EXPORTER_PORT}
85-
Should Not Be Empty ${string_value} PROM_EXPORTER_PORT variable is required
80+
${string_value} Convert To String ${LOKI_HOST}
81+
Should Not Be Empty ${string_value} LOKI_HOST variable is required
8682

8783
Set Test OTEL Configuration
8884
[Documentation] Set Test OTEL Configuration
@@ -98,8 +94,6 @@ Teardown Suite And Revert Test Host
9894
[Documentation] Set back original OTEL config and teardown Suite
9995
Set Back Original OTEL Configuration
10096
Teardown Suite
101-
Stop Loki Server ${LOKI_PORT}
102-
Stop Prometheus Server ${PROMETHEUS_PORT}
10397

10498
Set Back Original OTEL Configuration
10599
[Documentation] Set Back Original OTEL Configuration

test/suites/telemetry/telemetry.robot

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Test Tags restart slow
2020
${PROXY_HOST} ${EMPTY}
2121
${PROXY_PORT} ${EMPTY}
2222
${PROMETHEUS_HOST} ${EMPTY}
23-
${PROMETHEUS_PORT} ${EMPTY}
2423
${TELEMETRY_WRITE_ENDPOINT} https://infogw.api.openshift.com/metrics/v1/receive
2524
${PROXY_ENDPOINT} http://${PROXY_HOST}:${PROXY_PORT}/api/v1/write
2625
${ENABLE_TELEMETRY} SEPARATOR=\n
@@ -71,14 +70,12 @@ MicroShift Reports Metrics To Default Server Through Proxy
7170

7271
MicroShift Fails to Report Metrics To Prometheus Server With Telemetry Disabled
7372
[Documentation] Check MicroShift is not able to send metrics to the telemetry server when it is disabled.
74-
[Setup] Run Keywords
75-
... Setup Telemetry Configuration ${DISABLE_TELEMETRY_TO_PROMETHEUS} ${PULL_SECRET_METRICS}
73+
[Setup] Setup Telemetry Configuration ${DISABLE_TELEMETRY_TO_PROMETHEUS} ${PULL_SECRET_METRICS}
7674

7775
Should Find Metrics In Journal Log Success Telemetry is disabled
7876
Should Find Metrics In Journal Log Fails Metrics sent successfully
7977

80-
[Teardown] Run Keywords
81-
... Remove Telemetry Configuration
78+
[Teardown] Remove Telemetry Configuration
8279

8380
MicroShift Fails to Report Metrics To Default Server With Wrong Pull Secret
8481
[Documentation] Check MicroShift is not able to send metrics to the telemetry server when the pull secret is wrong.
@@ -91,10 +88,7 @@ MicroShift Fails to Report Metrics To Default Server With Wrong Pull Secret
9188

9289
MicroShift Reports Metrics To Prometheus Server
9390
[Documentation] Check the expected metrics are sent to the local server.
94-
[Setup] Run Keywords
95-
... Start Prometheus Server ${PROMETHEUS_PORT}
96-
... AND
97-
... Setup Telemetry Configuration ${ENABLE_TELEMETRY_TO_PROMETHUS} ${PULL_SECRET_METRICS}
91+
[Setup] Setup Telemetry Configuration ${ENABLE_TELEMETRY_TO_PROMETHUS} ${PULL_SECRET_METRICS}
9892

9993
Should Find Metrics In Journal Log Success Metrics sent successfully
10094

@@ -103,10 +97,7 @@ MicroShift Reports Metrics To Prometheus Server
10397
Check Prometheus Query ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${metric} add_hostname_filter=${False}
10498
END
10599

106-
[Teardown] Run Keywords
107-
... Remove Telemetry Configuration
108-
... AND
109-
... Stop Prometheus Server ${PROMETHEUS_PORT}
100+
[Teardown] Remove Telemetry Configuration
110101

111102

112103
*** Keywords ***
@@ -130,7 +121,7 @@ Check Required Telemetry Variables
130121
Should Not Be Empty ${PROMETHEUS_HOST} PROMETHEUS_HOST variable is required
131122
${string_value}= Convert To String ${PROMETHEUS_PORT}
132123
Should Not Be Empty ${string_value} PROMETHEUS_PORT variable is required
133-
Should Not Be Empty ${PROXY_HOST} PROXY_HOST variable is required
124+
Should Not Be Empty ${PROXY_PORT} PROXY_PORT variable is required
134125
${string_value}= Convert To String ${PROXY_PORT}
135126
Should Not Be Empty ${string_value} PROXY_PORT variable is required
136127

0 commit comments

Comments
 (0)