File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class Metrics {
69
69
let path : string ;
70
70
71
71
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` ;
73
73
} else {
74
74
path = '/apis/metrics.k8s.io/v1beta1/pods' ;
75
75
}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ describe('Metrics', () => {
112
112
it ( 'should return namespace scope empty pods list' , async ( ) => {
113
113
const [ metricsClient , scope ] = systemUnderTest ( ) ;
114
114
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` )
116
116
. reply ( 200 , emptyPodMetrics ) ;
117
117
118
118
const response = await metricsClient . getPodMetrics ( TEST_NAMESPACE ) ;
@@ -131,7 +131,7 @@ describe('Metrics', () => {
131
131
it ( 'should return namespace scope pods metric list' , async ( ) => {
132
132
const [ metricsClient , scope ] = systemUnderTest ( ) ;
133
133
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` )
135
135
. reply ( 200 , mockedPodMetrics ) ;
136
136
137
137
const response = await metricsClient . getPodMetrics ( TEST_NAMESPACE ) ;
You can’t perform that action at this time.
0 commit comments