fix(deps): update ginkgo import path to v2 in test files

This commit is contained in:
Jan Rundshagen 2025-03-30 10:02:16 +02:00 committed by Jan O. Rundshagen
parent 6d901a7442
commit a9642a2dcc
23 changed files with 116 additions and 157 deletions

View file

@ -6,12 +6,12 @@ import (
"net/http/httptest"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
const (
token = "123123123"
token = "123123123"
)
func TestAPI(t *testing.T) {
@ -51,7 +51,7 @@ var _ = Describe("API", func() {
rec := httptest.NewRecorder()
req := httptest.NewRequest("GET", "/hello", nil)
req.Header.Set("Authorization", "Bearer " + token)
req.Header.Set("Authorization", "Bearer "+token)
handlerFunc(rec, req)

View file

@ -8,7 +8,7 @@ import (
"strings"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/beatkind/watchtower/pkg/api"

View file

@ -1,7 +1,7 @@
package container
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -1,9 +1,10 @@
package container
import (
"github.com/docker/docker/api/types/network"
"time"
"github.com/docker/docker/api/types/network"
"github.com/beatkind/watchtower/internal/util"
"github.com/beatkind/watchtower/pkg/container/mocks"
"github.com/beatkind/watchtower/pkg/filters"
@ -17,7 +18,7 @@ import (
"github.com/onsi/gomega/ghttp"
"github.com/sirupsen/logrus"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
gt "github.com/onsi/gomega/types"

View file

@ -3,7 +3,7 @@ package container_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -4,7 +4,7 @@ import (
"github.com/beatkind/watchtower/pkg/types"
dockerContainer "github.com/docker/docker/api/types/container"
"github.com/docker/go-connections/nat"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -9,7 +9,7 @@ import (
"path/filepath"
"strings"
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/v2"
t "github.com/beatkind/watchtower/pkg/types"

View file

@ -2,7 +2,7 @@ package container_test
import (
wt "github.com/beatkind/watchtower/pkg/types"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -2,7 +2,7 @@ package notifications
import (
s "github.com/beatkind/watchtower/pkg/session"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -1,10 +1,11 @@
package notifications_test
import (
"github.com/onsi/gomega/format"
"testing"
. "github.com/onsi/ginkgo"
"github.com/onsi/gomega/format"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -8,7 +8,7 @@ import (
"github.com/beatkind/watchtower/cmd"
"github.com/beatkind/watchtower/internal/flags"
"github.com/beatkind/watchtower/pkg/notifications"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -7,7 +7,7 @@ import (
"github.com/beatkind/watchtower/internal/flags"
s "github.com/beatkind/watchtower/pkg/session"
"github.com/containrrr/shoutrrr/pkg/types"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/sirupsen/logrus"

View file

@ -13,7 +13,7 @@ import (
wtTypes "github.com/beatkind/watchtower/pkg/types"
ref "github.com/distribution/reference"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -2,16 +2,17 @@ package digest_test
import (
"fmt"
"github.com/beatkind/watchtower/internal/actions/mocks"
"github.com/beatkind/watchtower/pkg/registry/digest"
wtTypes "github.com/beatkind/watchtower/pkg/types"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
"net/http"
"os"
"testing"
"time"
"github.com/beatkind/watchtower/internal/actions/mocks"
"github.com/beatkind/watchtower/pkg/registry/digest"
wtTypes "github.com/beatkind/watchtower/pkg/types"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
)
func TestDigest(t *testing.T) {

View file

@ -3,7 +3,7 @@ package helpers
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -7,7 +7,7 @@ import (
"github.com/beatkind/watchtower/internal/actions/mocks"
"github.com/beatkind/watchtower/pkg/registry/manifest"
"github.com/docker/docker/api/types/image"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -1,10 +1,11 @@
package registry_test
import (
"github.com/sirupsen/logrus"
"testing"
. "github.com/onsi/ginkgo"
"github.com/sirupsen/logrus"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View file

@ -3,7 +3,7 @@ package registry_test
import (
"github.com/beatkind/watchtower/internal/actions/mocks"
unit "github.com/beatkind/watchtower/pkg/registry"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"time"

View file

@ -3,7 +3,7 @@ package registry
import (
"os"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)