mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Rename master to apiserver in test/integration
This commit is contained in:
@@ -44,11 +44,11 @@ func scrapeMetrics(s *httptest.Server) (testutil.Metrics, error) {
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Unable to contact metrics endpoint of master: %v", err)
|
||||
return nil, fmt.Errorf("Unable to contact metrics endpoint of API server: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("Non-200 response trying to scrape metrics from master: %v", resp)
|
||||
return nil, fmt.Errorf("Non-200 response trying to scrape metrics from API Server: %v", resp)
|
||||
}
|
||||
metrics := testutil.NewMetrics()
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
@@ -62,12 +62,12 @@ func scrapeMetrics(s *httptest.Server) (testutil.Metrics, error) {
|
||||
func checkForExpectedMetrics(t *testing.T, metrics testutil.Metrics, expectedMetrics []string) {
|
||||
for _, expected := range expectedMetrics {
|
||||
if _, found := metrics[expected]; !found {
|
||||
t.Errorf("Master metrics did not include expected metric %q", expected)
|
||||
t.Errorf("API server metrics did not include expected metric %q", expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestMasterProcessMetrics(t *testing.T) {
|
||||
func TestAPIServerProcessMetrics(t *testing.T) {
|
||||
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
|
||||
t.Skipf("not supported on GOOS=%s", runtime.GOOS)
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func TestMasterProcessMetrics(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestApiserverMetrics(t *testing.T) {
|
||||
func TestAPIServerMetrics(t *testing.T) {
|
||||
_, s, closeFn := framework.RunAnAPIServer(nil)
|
||||
defer closeFn()
|
||||
|
||||
@@ -115,7 +115,7 @@ func TestApiserverMetrics(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestApiserverMetricsLabels(t *testing.T) {
|
||||
func TestAPIServerMetricsLabels(t *testing.T) {
|
||||
_, s, closeFn := framework.RunAnAPIServer(nil)
|
||||
defer closeFn()
|
||||
|
||||
@@ -242,7 +242,7 @@ func TestApiserverMetricsLabels(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestApiserverMetricsPods(t *testing.T) {
|
||||
func TestAPIServerMetricsPods(t *testing.T) {
|
||||
callOrDie := func(_ interface{}, err error) {
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
@@ -356,7 +356,7 @@ func TestApiserverMetricsPods(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestApiserverMetricsNamespaces(t *testing.T) {
|
||||
func TestAPIServerMetricsNamespaces(t *testing.T) {
|
||||
callOrDie := func(_ interface{}, err error) {
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user