1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

chore(ci): run lint and test on all pkgs [EE-6201] (#10481)

This commit is contained in:
Chaim Lev-Ari 2024-01-02 10:59:49 +07:00 committed by GitHub
parent 2e15cad048
commit 82951093b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 35 additions and 66 deletions

View file

@ -66,15 +66,15 @@ func Test_UpAndDown(t *testing.T) {
services:
busybox:
image: "alpine:3.7"
container_name: "test_container_one"`
container_name: "plugintest_container_one"`
const overrideComposeFileContent = `version: "3.9"
services:
busybox:
image: "alpine:latest"
container_name: "test_container_two"`
container_name: "plugintest_container_two"`
const composeContainerName = "test_container_two"
const composeContainerName = "plugintest_container_two"
w := setup(t)
@ -90,8 +90,14 @@ services:
t.Fatal(err)
}
projectName := "plugintest"
ctx := context.Background()
err = w.Deploy(ctx, []string{filePathOriginal, filePathOverride}, libstack.DeployOptions{})
err = w.Deploy(ctx, []string{filePathOriginal, filePathOverride}, libstack.DeployOptions{
Options: libstack.Options{
ProjectName: projectName,
},
})
if err != nil {
t.Fatal(err)
}
@ -100,7 +106,7 @@ services:
t.Fatal("container should exist")
}
err = w.Remove(ctx, "", []string{filePathOriginal, filePathOverride}, libstack.Options{})
err = w.Remove(ctx, projectName, []string{filePathOriginal, filePathOverride}, libstack.Options{})
if err != nil {
t.Fatal(err)
}

View file

@ -3,6 +3,7 @@ package composeplugin
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"time"
@ -143,7 +144,7 @@ func (wrapper *PluginWrapper) WaitForStatus(ctx context.Context, name string, st
var svc service
err := dec.Decode(&svc)
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
}
if err != nil {