Skip to content

Commit 1747406

Browse files
committed
fix path typo
1 parent b6a3e6f commit 1747406

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class Metrics {
6969
let path: string;
7070

7171
if (namespace !== undefined && namespace.length > 0) {
72-
path = `/apis/metrics.k8s.io/v1beta1/${namespace}/default/pods`;
72+
path = `/apis/metrics.k8s.io/v1beta1/namespaces/${namespace}/pods`;
7373
} else {
7474
path = '/apis/metrics.k8s.io/v1beta1/pods';
7575
}

src/metrics_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('Metrics', () => {
112112
it('should return namespace scope empty pods list', async () => {
113113
const [metricsClient, scope] = systemUnderTest();
114114
const s = scope
115-
.get(`/apis/metrics.k8s.io/v1beta1/${TEST_NAMESPACE}/default/pods`)
115+
.get(`/apis/metrics.k8s.io/v1beta1/namespaces/${TEST_NAMESPACE}/pods`)
116116
.reply(200, emptyPodMetrics);
117117

118118
const response = await metricsClient.getPodMetrics(TEST_NAMESPACE);
@@ -131,7 +131,7 @@ describe('Metrics', () => {
131131
it('should return namespace scope pods metric list', async () => {
132132
const [metricsClient, scope] = systemUnderTest();
133133
const s = scope
134-
.get(`/apis/metrics.k8s.io/v1beta1/${TEST_NAMESPACE}/default/pods`)
134+
.get(`/apis/metrics.k8s.io/v1beta1/namespaces/${TEST_NAMESPACE}/pods`)
135135
.reply(200, mockedPodMetrics);
136136

137137
const response = await metricsClient.getPodMetrics(TEST_NAMESPACE);

0 commit comments

Comments
 (0)