Skip to content

Commit

Permalink
Client plugin test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiles committed Jun 7, 2018
1 parent 9e38dba commit b4295a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ before_script:

script:
- CGO_ENABLED=0 go build -o bin/kubernetes-credential-provider-vault ./cmd/kubernetes-credential-provider-vault
- KUBE_ADDR=https://$(minikube ip):8443 go test -v ./...
- KUBE_ADDR=https://$(minikube ip):8443 go test -v -run TestIntegration_Kubernetes/ClientPlugin ./pkg/integration
5 changes: 4 additions & 1 deletion pkg/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"path/filepath"
"testing"
"time"
"github.com/davecgh/go-spew/spew"
)

const (
Expand Down Expand Up @@ -466,6 +467,7 @@ func testKubernetesClientPlugin(t *testing.T, vaultClient *api.Client) {

kubeConfig, err := clientcmd.NewDefaultClientConfigLoadingRules().Load()
require.NoError(t, err)
spew.Dump(kubeConfig)
if kubeContext := os.Getenv(kubeContextEnv); kubeContext != "" {
kubeConfig.CurrentContext = kubeContext
}
Expand All @@ -488,7 +490,7 @@ func testKubernetesClientPlugin(t *testing.T, vaultClient *api.Client) {
{"KUBE_VAULT_PATH", "kubernetes"},
{"KUBE_VAULT_ROLE", "cluster-admin"},
{"KUBE_VAULT_CACHE", cacheFile},
{"VAULT_TOKEN", childToken},
{"VAULT_TOKEN", "bad-token"},
{"VAULT_ADDR", "http://localhost:" + getKubeTargetPort()},
},
},
Expand All @@ -497,6 +499,7 @@ func testKubernetesClientPlugin(t *testing.T, vaultClient *api.Client) {

restClientConfig, err := clientcmd.NewDefaultClientConfig(*kubeConfig, configOverrides).ClientConfig()
require.NoError(t, err)
spew.Dump(restClientConfig)
kubeClient, err := kubernetes.NewForConfig(restClientConfig)
require.NoError(t, err)

Expand Down

0 comments on commit b4295a8

Please sign in to comment.