Skip to content

Commit

Permalink
remove GO_TAGS override, use GOFLAGS var
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Sep 4, 2023
1 parent 400b6b3 commit bcaf04f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 1 addition & 6 deletions examples/customresources/demos/remoteserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ func TestGizmo(t *testing.T) {
err = tmpConf.Sync()
test.That(t, err, test.ShouldBeNil)
pmgr := pexec.NewProcessManager(logger.Named("process.inter"))
args := []string{"run"}
if tags := os.Getenv("GO_TAGS"); len(tags) > 0 {
args = append(args, "-tags", tags)
}
args = append(args, utils.ResolveFile("./web/cmd/server/main.go"), "-config", tmpConf.Name())
pCfg := pexec.ProcessConfig{
ID: "Intermediate",
Name: "go",
Args: args,
Args: []string{"run", utils.ResolveFile("./web/cmd/server/main.go"), "-config", tmpConf.Name()},
CWD: "",
OneShot: false,
Log: true,
Expand Down
8 changes: 1 addition & 7 deletions testutils/file_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package testutils

import (
"fmt"
"os"
"os/exec"
"path/filepath"
"testing"
Expand All @@ -17,13 +16,8 @@ import (
func BuildTempModule(tb testing.TB, dir string) (string, error) {
tb.Helper()
modPath := filepath.Join(tb.TempDir(), filepath.Base(dir))
args := []string{"build"}
if tags := os.Getenv("GO_TAGS"); len(tags) > 0 {
args = append(args, "-tags", tags)
}
args = append(args, "-o", modPath, ".")
//nolint:gosec
builder := exec.Command("go", args...)
builder := exec.Command("go", "build", "-o", modPath, ".")
builder.Dir = utils.ResolveFile(dir)
out, err := builder.CombinedOutput()
if len(out) != 0 || err != nil {
Expand Down

0 comments on commit bcaf04f

Please sign in to comment.