We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d00471 commit e1d6a11Copy full SHA for e1d6a11
src/config_test.ts
@@ -1036,6 +1036,14 @@ describe('KubeConfig', () => {
1036
expect(kc.contexts.length).to.equal(4);
1037
expect(kc.getCurrentContext()).to.equal('contextA');
1038
});
1039
+ it('should preserve starting file context', () => {
1040
+ process.env.KUBECONFIG = kcFileName + path.delimiter + kc2FileName;
1041
+
1042
+ const kc = new KubeConfig();
1043
+ kc.loadFromDefault({}, true);
1044
1045
+ expect(kc.getCurrentContext()).to.equal('context2');
1046
+ });
1047
it('should throw with duplicate clusters', () => {
1048
process.env.KUBECONFIG = kcFileName + path.delimiter + kcDupeCluster;
1049
0 commit comments