Improve makefile
This commit is contained in:
parent
34d2a816c2
commit
39b0aa6650
21 changed files with 162 additions and 290 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -56,8 +57,6 @@ type composeDeploy struct {
|
|||
Replicas int `yaml:"replicas"`
|
||||
}
|
||||
|
||||
var traefikBinary = "../dist/traefik"
|
||||
|
||||
type BaseSuite struct {
|
||||
suite.Suite
|
||||
containers map[string]testcontainers.Container
|
||||
|
@ -308,7 +307,13 @@ func (s *BaseSuite) composeDown() {
|
|||
}
|
||||
|
||||
func (s *BaseSuite) cmdTraefik(args ...string) (*exec.Cmd, *bytes.Buffer) {
|
||||
cmd := exec.Command(traefikBinary, args...)
|
||||
binName := "traefik"
|
||||
if runtime.GOOS == "windows" {
|
||||
binName += ".exe"
|
||||
}
|
||||
|
||||
traefikBinPath := filepath.Join("..", "dist", runtime.GOOS, runtime.GOARCH, binName)
|
||||
cmd := exec.Command(traefikBinPath, args...)
|
||||
|
||||
s.T().Cleanup(func() {
|
||||
s.killCmd(cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue