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

fix: ci pipeline

parent b9ccf3de
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ import ( ...@@ -13,7 +13,7 @@ import (
"time" "time"
) )
func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string, ctx context.Context) error { func startTestSMTPDockerImageAndContainer(t *testing.T, port string, ctx context.Context) error {
t.Helper() t.Helper()
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
...@@ -32,6 +32,8 @@ func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string ...@@ -32,6 +32,8 @@ func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string
//_, _ = io.Copy(os.Stdout, reader) //_, _ = io.Copy(os.Stdout, reader)
_ = reader _ = reader
host, _, _ := net.SplitHostPort(cli.DaemonHost())
hostConfig := &container.HostConfig{ hostConfig := &container.HostConfig{
PortBindings: nat.PortMap{ PortBindings: nat.PortMap{
"1025/tcp": []nat.PortBinding{ "1025/tcp": []nat.PortBinding{
...@@ -120,7 +122,7 @@ func TestMailRunner(t *testing.T) { ...@@ -120,7 +122,7 @@ func TestMailRunner(t *testing.T) {
done := make(chan bool) done := make(chan bool)
go func() { go func() {
err = startTestSMTPDockerImageAndContainer(t, host, portAsString, ctx) err = startTestSMTPDockerImageAndContainer(t, portAsString, ctx)
if err != nil { if err != nil {
t.Errorf("Unexpected error: %v", err) t.Errorf("Unexpected error: %v", err)
cancel() cancel()
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
"time" "time"
) )
func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string, volume string, ctx context.Context) error { func startSFTPTestDockerImageAndContainer(t *testing.T, port string, volume string, ctx context.Context) error {
t.Helper() t.Helper()
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
...@@ -33,6 +33,8 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string ...@@ -33,6 +33,8 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string
//_, _ = io.Copy(os.Stdout, reader) //_, _ = io.Copy(os.Stdout, reader)
_ = reader _ = reader
host, _, _ := net.SplitHostPort(cli.DaemonHost())
hostConfig := &container.HostConfig{ hostConfig := &container.HostConfig{
PortBindings: nat.PortMap{ PortBindings: nat.PortMap{
"22/tcp": []nat.PortBinding{ "22/tcp": []nat.PortBinding{
...@@ -120,7 +122,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) { ...@@ -120,7 +122,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) {
done := make(chan bool) done := make(chan bool)
go func() { go func() {
err = startSFTPTestDockerImageAndContainer(t, host, portAsString, "", ctx) err = startSFTPTestDockerImageAndContainer(t, "portAsString, "", ctx)
if err != nil { if err != nil {
t.Errorf("Unexpected error: %v", err) t.Errorf("Unexpected error: %v", err)
cancel() cancel()
...@@ -225,7 +227,7 @@ func TestSFTPCRunnerRemoteToLocal(t *testing.T) { ...@@ -225,7 +227,7 @@ func TestSFTPCRunnerRemoteToLocal(t *testing.T) {
done := make(chan bool) done := make(chan bool)
go func() { go func() {
err = startSFTPTestDockerImageAndContainer(t, host, portAsString, tempSrcDir, ctx) err = startSFTPTestDockerImageAndContainer(t, portAsString, tempSrcDir, ctx)
if err != nil { if err != nil {
t.Errorf("Unexpected error: %v", err) t.Errorf("Unexpected error: %v", err)
cancel() cancel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment