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 8532872
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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
6 changes: 6 additions & 0 deletions 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 Down Expand Up @@ -497,6 +499,10 @@ func testKubernetesClientPlugin(t *testing.T, vaultClient *api.Client) {

restClientConfig, err := clientcmd.NewDefaultClientConfig(*kubeConfig, configOverrides).ClientConfig()
require.NoError(t, err)
// Make sure TLS client keys don't sneak in to authentication flow.
restClientConfig.TLSClientConfig.CertFile = ""
restClientConfig.TLSClientConfig.KeyFile = ""
spew.Dump(restClientConfig)
kubeClient, err := kubernetes.NewForConfig(restClientConfig)
require.NoError(t, err)

Expand Down

0 comments on commit 8532872

Please sign in to comment.