Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Job Queues
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Services
Job Queues
Commits
567f0965
Verified
Commit
567f0965
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
fix: ci pipeline
parent
b9ccf3de
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
runnable-mail_test.go
+4
-2
4 additions, 2 deletions
runnable-mail_test.go
runnable-sftp_test.go
+5
-3
5 additions, 3 deletions
runnable-sftp_test.go
with
9 additions
and
5 deletions
runnable-mail_test.go
+
4
−
2
View file @
567f0965
...
...
@@ -13,7 +13,7 @@ import (
"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
()
cli
,
err
:=
client
.
NewClientWithOpts
(
client
.
FromEnv
,
client
.
WithAPIVersionNegotiation
())
...
...
@@ -32,6 +32,8 @@ func startTestSMTPDockerImageAndContainer(t *testing.T, host string, port string
//_, _ = io.Copy(os.Stdout, reader)
_
=
reader
host
,
_
,
_
:=
net
.
SplitHostPort
(
cli
.
DaemonHost
())
hostConfig
:=
&
container
.
HostConfig
{
PortBindings
:
nat
.
PortMap
{
"1025/tcp"
:
[]
nat
.
PortBinding
{
...
...
@@ -120,7 +122,7 @@ func TestMailRunner(t *testing.T) {
done
:=
make
(
chan
bool
)
go
func
()
{
err
=
startTestSMTPDockerImageAndContainer
(
t
,
host
,
portAsString
,
ctx
)
err
=
startTestSMTPDockerImageAndContainer
(
t
,
portAsString
,
ctx
)
if
err
!=
nil
{
t
.
Errorf
(
"Unexpected error: %v"
,
err
)
cancel
()
...
...
This diff is collapsed.
Click to expand it.
runnable-sftp_test.go
+
5
−
3
View file @
567f0965
...
...
@@ -14,7 +14,7 @@ import (
"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
()
cli
,
err
:=
client
.
NewClientWithOpts
(
client
.
FromEnv
,
client
.
WithAPIVersionNegotiation
())
...
...
@@ -33,6 +33,8 @@ func startSFTPTestDockerImageAndContainer(t *testing.T, host string, port string
//_, _ = io.Copy(os.Stdout, reader)
_
=
reader
host
,
_
,
_
:=
net
.
SplitHostPort
(
cli
.
DaemonHost
())
hostConfig
:=
&
container
.
HostConfig
{
PortBindings
:
nat
.
PortMap
{
"22/tcp"
:
[]
nat
.
PortBinding
{
...
...
@@ -120,7 +122,7 @@ func TestSFTPCRunnerLocalToRemote(t *testing.T) {
done
:=
make
(
chan
bool
)
go
func
()
{
err
=
startSFTPTestDockerImageAndContainer
(
t
,
host
,
portAsString
,
""
,
ctx
)
err
=
startSFTPTestDockerImageAndContainer
(
t
,
"
portAsString, "", ctx)
if err != nil {
t.Errorf("
Unexpected
error
:
%
v
", err)
cancel()
...
...
@@ -225,7 +227,7 @@ func TestSFTPCRunnerRemoteToLocal(t *testing.T) {
done := make(chan bool)
go func() {
err
=
startSFTPTestDockerImageAndContainer
(
t
,
host
,
portAsString
,
tempSrcDir
,
ctx
)
err = startSFTPTestDockerImageAndContainer(t, portAsString, tempSrcDir, ctx)
if err != nil {
t.Errorf("
Unexpected
error
:
%
v
", err)
cancel()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment