Skip to content

Commit 1579013

Browse files
chriskim06k8s-ci-robot
authored andcommitted
Use ctx instead of konfig for integration test (kubernetes-sigs#465)
* Use ctx instead of konfig for integration test * Fix tests
1 parent d3103f3 commit 1579013

File tree

4 files changed

+36
-32
lines changed

4 files changed

+36
-32
lines changed

cmd/krew/cmd/install_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func Test_readPluginFromURL(t *testing.T) {
3333
}{
3434
{
3535
name: "successful request",
36-
url: server.URL + "/konfig.yaml",
37-
wantName: "konfig",
36+
url: server.URL + "/ctx.yaml",
37+
wantName: "ctx",
3838
},
3939
{
4040
name: "invalid server",

integration_test/testdata/ctx.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: krew.googlecontainertools.github.com/v1alpha2
2+
kind: Plugin
3+
metadata:
4+
name: ctx
5+
spec:
6+
homepage: https://github.com/ahmetb/kubectx
7+
shortDescription: Switch between contexts in your kubeconfig
8+
version: v0.7.0
9+
description: |
10+
Also known as "kubectx", a utility to switch between context entries in
11+
your kubeconfig file efficiently.
12+
caveats: |
13+
If fzf is installed on your machine, you can interactively choose
14+
between the entries using the arrow keys, or by fuzzy searching
15+
as you type.
16+
See https://github.com/ahmetb/kubectx for customization and details.
17+
platforms:
18+
- selector:
19+
matchExpressions:
20+
- key: os
21+
operator: In
22+
values:
23+
- darwin
24+
- linux
25+
uri: https://github.com/ahmetb/kubectx/archive/v0.7.1.tar.gz
26+
sha256: 6df4def2caf5a9c291310124098ad6c4c3123936ddd4080b382b9f7930a233ec
27+
bin: kubectx
28+
files:
29+
- from: kubectx-*/kubectx
30+
to: .
31+
- from: kubectx-*/LICENSE
32+
to: .

integration_test/testdata/konfig.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

integration_test/testutil_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import (
3737
const (
3838
persistentIndexCache = "krew-persistent-index-cache"
3939
krewBinaryEnv = "KREW_BINARY"
40-
validPlugin = "konfig" // a plugin in central index with small size
41-
validPlugin2 = "mtail" // a plugin in central index with small size
40+
validPlugin = "ctx" // a plugin in central index with small size
41+
validPlugin2 = "mtail" // a plugin in central index with small size
4242
)
4343

4444
var (

0 commit comments

Comments
 (0)