Skip to content
Snippets Groups Projects
Verified Commit b9ccf3de authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: ci pipeline

parent f45b1aa3
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string ...@@ -69,7 +69,7 @@ func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string
Timeout: &timeout, Timeout: &timeout,
Signal: "SIGKILL", Signal: "SIGKILL",
} }
newCtx, _ := context.WithTimeout(context.Background(), 20*time.Second) newCtx, _ := context.WithTimeout(context.Background(), 60*time.Second)
if err := cli.ContainerStop(newCtx, resp.ID, stopOptions); err != nil { if err := cli.ContainerStop(newCtx, resp.ID, stopOptions); err != nil {
t.Errorf("ContainerStop returned error: %v", err) t.Errorf("ContainerStop returned error: %v", err)
} }
...@@ -107,7 +107,7 @@ func TestMailRunner(t *testing.T) { ...@@ -107,7 +107,7 @@ func TestMailRunner(t *testing.T) {
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
}) })
host := "0.0.0.0" host := "172.17.0.1"
listener, err := net.Listen("tcp", host+":0") listener, err := net.Listen("tcp", host+":0")
if err != nil { if err != nil {
...@@ -128,7 +128,7 @@ func TestMailRunner(t *testing.T) { ...@@ -128,7 +128,7 @@ func TestMailRunner(t *testing.T) {
done <- true done <- true
}() }()
waitCtx, waitCancel := context.WithTimeout(ctx, 30*time.Second) waitCtx, waitCancel := context.WithTimeout(ctx, 60*time.Second)
defer waitCancel() defer waitCancel()
for { for {
conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second) conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second)
......
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"io"
"net" "net"
"os" "os"
"testing" "testing"
...@@ -31,7 +30,7 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string ...@@ -31,7 +30,7 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string
} }
//if debug image pull, comment out the following lines //if debug image pull, comment out the following lines
_, _ = io.Copy(os.Stdout, reader) //_, _ = io.Copy(os.Stdout, reader)
_ = reader _ = reader
hostConfig := &container.HostConfig{ hostConfig := &container.HostConfig{
...@@ -70,7 +69,7 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string ...@@ -70,7 +69,7 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string
Timeout: &timeout, Timeout: &timeout,
Signal: "SIGKILL", Signal: "SIGKILL",
} }
newCtx, _ := context.WithTimeout(context.Background(), 20*time.Second) newCtx, _ := context.WithTimeout(context.Background(), 60*time.Second)
if err := cli.ContainerStop(newCtx, resp.ID, stopOptions); err != nil { if err := cli.ContainerStop(newCtx, resp.ID, stopOptions); err != nil {
t.Errorf("ContainerStop returned error: %v", err) t.Errorf("ContainerStop returned error: %v", err)
} }
...@@ -108,7 +107,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) { ...@@ -108,7 +107,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) {
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
}) })
host := "0.0.0.0" host := "172.17.0.1"
listener, err := net.Listen("tcp", host+":0") listener, err := net.Listen("tcp", host+":0")
if err != nil { if err != nil {
...@@ -129,7 +128,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) { ...@@ -129,7 +128,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) {
done <- true done <- true
}() }()
waitCtx, waitCancel := context.WithTimeout(ctx, 30*time.Second) waitCtx, waitCancel := context.WithTimeout(ctx, 60*time.Second)
defer waitCancel() defer waitCancel()
for { for {
conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second) conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second)
...@@ -234,7 +233,7 @@ func TestSFTPCRunnerRemoteToLocal(t *testing.T) { ...@@ -234,7 +233,7 @@ func TestSFTPCRunnerRemoteToLocal(t *testing.T) {
done <- true done <- true
}() }()
waitCtx, waitCancel := context.WithTimeout(ctx, 30*time.Second) waitCtx, waitCancel := context.WithTimeout(ctx, 60*time.Second)
defer waitCancel() defer waitCancel()
for { for {
conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second) conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, portAsString), 1*time.Second)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment