Skip to content

Commit 1695e27

Browse files
committed
Test Added For namespace Configuration
1 parent 69770a9 commit 1695e27

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/config_test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ function validateFileLoad(kc: KubeConfig) {
4646
const context2 = kc.contexts[1];
4747
expect(context1.name).to.equal('context1');
4848
expect(context1.user).to.equal('user1');
49+
expect(context1.namespace).to.equal(undefined);
4950
expect(context1.cluster).to.equal('cluster1');
5051
expect(context2.name).to.equal('context2');
5152
expect(context2.user).to.equal('user2');
53+
expect(context2.namespace).to.equal('namespace2');
5254
expect(context2.cluster).to.equal('cluster2');
5355

5456
expect(kc.getCurrentContext()).to.equal('context2');

testdata/kubeconfig.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ contexts:
1717
name: context1
1818
- context:
1919
cluster: cluster2
20+
namespace: namespace2
2021
user: user2
2122
name: context2
2223

0 commit comments

Comments
 (0)