Merge current v2.11 into v3.0

This commit is contained in:
mmatur 2024-01-17 11:37:50 +01:00
commit 111f3716fa
No known key found for this signature in database
GPG key ID: 2FFE42FC256CFF8E
21 changed files with 162 additions and 290 deletions

View file

@ -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)