Skip to content

Commit

Permalink
skip procfs-dependent metrics test if not on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
spiffxp authored and jayunit100 committed May 7, 2017
1 parent b42ba72 commit 101039b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/integration/metrics/metrics_test.go
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"runtime"
"testing"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -85,6 +86,10 @@ func checkForExpectedMetrics(t *testing.T, metrics []*prometheuspb.MetricFamily,
}

func TestMasterProcessMetrics(t *testing.T) {
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
t.Skipf("not supported on GOOS=%s", runtime.GOOS)
}

_, s := framework.RunAMaster(nil)
defer s.Close()

Expand All @@ -95,7 +100,6 @@ func TestMasterProcessMetrics(t *testing.T) {
checkForExpectedMetrics(t, metrics, []string{
"process_start_time_seconds",
"process_cpu_seconds_total",
"go_goroutines",
"process_open_fds",
"process_resident_memory_bytes",
})
Expand Down

0 comments on commit 101039b

Please sign in to comment.