Skip to content

Commit 9f3bcd3

Browse files
committed
add proxy-url test kubeconfig
1 parent 33175a8 commit 9f3bcd3

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/config_test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const kc2FileName = 'testdata/kubeconfig-2.yaml';
1818
const kcDupeCluster = 'testdata/kubeconfig-dupe-cluster.yaml';
1919
const kcDupeContext = 'testdata/kubeconfig-dupe-context.yaml';
2020
const kcDupeUser = 'testdata/kubeconfig-dupe-user.yaml';
21+
const kcProxyUrl = 'testdata/kubeconfig-proxy-url.yaml';
2122

2223
const kcNoUserFileName = 'testdata/empty-user-kubeconfig.yaml';
2324
const kcInvalidContextFileName = 'testdata/empty-context-kubeconfig.yaml';
@@ -423,7 +424,7 @@ describe('KubeConfig', () => {
423424
});
424425
it('should apply agent to request.Options', async () => {
425426
const kc = new KubeConfig();
426-
kc.loadFromFile(kcFileName);
427+
kc.loadFromFile(kcProxyUrl);
427428

428429
const opts = {} as requestlib.Options;
429430

testdata/kubeconfig-proxy-url.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v1
2+
clusters:
3+
- cluster:
4+
certificate-authority-data: Q0FEQVRA
5+
server: http://example2.com
6+
proxy-url: https://example:1187
7+
name: clusterA
8+
9+
contexts:
10+
- context:
11+
cluster: clusterA
12+
user: userA
13+
name: contextA
14+
15+
current-context: contextA
16+
kind: Config
17+
preferences: {}
18+
users:
19+
- name: userA
20+
user:
21+
client-certificate-data: XVNFUl9DQURBVEE=
22+
client-key-data: XVNFUl9DS0RBVEE=
23+
- name: userB
24+
user:
25+
client-certificate-data: XVNFUjJfQ0FEQVRB
26+
client-key-data: XVNFUjJfQ0tEQVRB
27+
- name: userC
28+
user:
29+
username: foo
30+
password: bar

0 commit comments

Comments
 (0)