Skip to content

Commit

Permalink
fix: Pass just gitAuth.yaml to CreateAuthConfigService
Browse files Browse the repository at this point in the history
It should use the config map value if available (previously we were
passing the whole path and that isn't the key name so) or the file in
$JX_HOME if not.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
  • Loading branch information
abayer committed Jan 10, 2020
1 parent 74121e1 commit e2cb82a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helpers/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (t *TestOptions) GetGitOrganisation() string {
return org
}

// GetGitProvider returns a git provider that uses default credentials stored in ~/.jx/gitAuth.yaml
// GetGitProvider returns a git provider that uses default credentials stored in the jx-auth-configmap or in ~/.jx/gitAuth.yaml
func (t *TestOptions) GetGitProvider() (gits.GitProvider, error) {
homeDir := os.Getenv("JX_HOME")
if homeDir == "" {
Expand All @@ -132,7 +132,7 @@ func (t *TestOptions) GetGitProvider() (gits.GitProvider, error) {
return nil, err
}

authConfigService, err := factory.CreateAuthConfigService(fmt.Sprintf("%s/.jx/gitAuth.yaml", homeDir), ns, kube.ValueKindGit, "")
authConfigService, err := factory.CreateAuthConfigService("gitAuth.yaml", ns, kube.ValueKindGit, "")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit e2cb82a

Please sign in to comment.