Skip to content

Commit

Permalink
Merge pull request #23925 from brancz/telemetry-remote-write
Browse files Browse the repository at this point in the history
tests/extented/prometheus: Disable telemetry e2e for remote-write move
  • Loading branch information
openshift-merge-robot committed Dec 6, 2019
2 parents 64e533b + 254adc6 commit 93ed085
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/extended/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ var _ = g.Describe("[Feature:Prometheus][Conformance] Prometheus", func() {

g.Describe("when installed on the cluster", func() {
g.It("should report telemetry if a cloud.openshift.com token is present", func() {
// https://github.com/openshift/cluster-monitoring-operator/pull/434
// changes the behavior from using the extra telemeter-client to
// the Prometheus native remote-write protocol. This causes the
// telemeter-client metrics to not be available anymore, causing
// this test to fail on that PR, but we can't merge modifying this
// test yet because the new metrics are not there yet. Skipping
// this test intermediately to merge the PR.
e2e.Skipf("skipping in order to merge https://github.com/openshift/cluster-monitoring-operator/pull/434")

if !hasPullSecret(oc.AdminKubeClient(), "cloud.openshift.com") {
e2e.Skipf("Telemetry is disabled")
}
Expand All @@ -61,6 +70,11 @@ var _ = g.Describe("[Feature:Prometheus][Conformance] Prometheus", func() {
defer func() { oc.AdminKubeClient().CoreV1().Pods(ns).Delete(execPod.Name, metav1.NewDeleteOptions(1)) }()

tests := map[string]bool{
// Should have successfully sent at least some metrics to remote write endpoint
// uncomment this once https://github.com/openshift/cluster-monitoring-operator/pull/434
// is merged, and remove the other two checks.
// `prometheus_remote_storage_succeeded_samples_total{job="prometheus-k8s"} >= 1`: true,

// should have successfully sent at least once to remote
`metricsclient_request_send{client="federate_to",job="telemeter-client",status_code="200"} >= 1`: true,
// should have scraped some metrics from prometheus
Expand Down Expand Up @@ -148,7 +162,6 @@ var _ = g.Describe("[Feature:Prometheus][Conformance] Prometheus", func() {
targets.Expect(labels{"job": "prometheus-operator"}, "up", "^http://.*/metrics$"),
targets.Expect(labels{"job": "alertmanager-main"}, "up", "^https://.*/metrics$"),
targets.Expect(labels{"job": "crio"}, "up", "^http://.*/metrics$"),
targets.Expect(labels{"job": "telemeter-client"}, "up", "^https://.*/metrics$"),
)
if len(lastErrs) > 0 {
e2e.Logf("missing some targets: %v", lastErrs)
Expand Down

0 comments on commit 93ed085

Please sign in to comment.