Skip to content

Commit

Permalink
try #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkermichael committed Oct 18, 2022
1 parent 546e75b commit 29eaca7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Install pre-requisites
- name: Install pre-requisites # Install gotestsum, kind, kubectl, and helm
run: |
wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
Expand Down
10 changes: 6 additions & 4 deletions acceptance/framework/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"testing"

"github.com/gruntwork-io/terratest/modules/k8s"
"github.com/hashicorp/consul-k8s/acceptance/framework/config"
"github.com/hashicorp/consul-k8s/acceptance/framework/logger"
)

Expand All @@ -19,8 +18,11 @@ type CLI struct {
// NewCLI compiles the `consul-k8s` CLI and returns a handle to execute commands
// with the binary.
func NewCLI() (*CLI, error) {
cmd := exec.Command("go", "install", ".")
cmd.Dir = config.CLIPath
cmd := exec.Command("which", "cli")
b, _ := cmd.Output()
fmt.Println("CLI: " + string(b))
cmd = exec.Command("make", "cli-dev")
cmd.Dir = "../../.."
_, err := cmd.Output()
return &CLI{true}, err
}
Expand All @@ -40,6 +42,6 @@ func (c *CLI) Run(t *testing.T, options *k8s.KubectlOptions, args ...string) ([]
}

logger.Logf(t, "Running `consul-k8s %s`", strings.Join(args, " "))
cmd := exec.Command("cli", args...)
cmd := exec.Command("consul-k8s", args...)
return cmd.Output()
}

0 comments on commit 29eaca7

Please sign in to comment.