Skip to content

Commit

Permalink
goutils refactoring (#803)
Browse files Browse the repository at this point in the history
* migrate pkgutils and testutils to dedicated goutils repository

* update maven package comment

* bump goutils

* go mod tidy

---------

Co-authored-by: Uwe Krueger <[email protected]>
  • Loading branch information
fabianburth and mandelsoft authored Jun 10, 2024
1 parent 9b01bca commit d16f64b
Show file tree
Hide file tree
Showing 188 changed files with 197 additions and 190 deletions.
2 changes: 1 addition & 1 deletion cmds/demoplugin/valuesets/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
package valuesets_test

import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/pkg/env"
. "github.com/open-component-model/ocm/pkg/env/builder"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/spf13/pflag"

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"strings"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/logging"
"github.com/mandelsoft/vfs/pkg/vfs"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/controllercmds/install/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"
"strings"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/filepath/pkg/filepath"
)
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/controllercmds/uninstall/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"
"strings"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/filepath/pkg/filepath"
)
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/credentials/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package get_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/contexts/credentials"
"github.com/open-component-model/ocm/pkg/contexts/credentials/builtin/oci/identity"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/hash/sign/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package sign_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/contexts/ocm/signing/signingtest"
. "github.com/open-component-model/ocm/pkg/testutils"
)

const ISSUER = "mandelsoft"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/rsakeypair/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"crypto/x509/pkix"
"encoding/pem"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/opencontainers/go-digest"

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/artifacts/download/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package download_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/oci/grammar"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/artifacts/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package get_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocicmds/common/handlers/artifacthdlr"
"github.com/open-component-model/ocm/pkg/common/accessio"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/artifacts/transfer/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package transfer_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/oci/repositories/ctf"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/tags/show/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package show_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/mime"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/cli/download/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"runtime"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/cli/download"
"github.com/open-component-model/ocm/pkg/common/accessio"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/spf13/pflag"

"github.com/mandelsoft/goutils/testutils"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/pkg/cobrautils/flagsets"
"github.com/open-component-model/ocm/pkg/runtime"
"github.com/open-component-model/ocm/pkg/testutils"
)

type NameProvider interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"encoding/json"
"fmt"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/spf13/pflag"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package utf8

import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/testutils"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package optutils_test
import (
"encoding/json"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/spf13/pflag"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package uploaderoption
import (
"encoding/json"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/spf13/pflag"

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/add/cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package add_test

import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/check/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package check_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/ocm"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/download/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package download_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/vfs/pkg/vfs"

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"bytes"
"fmt"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
compdescv3 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/versions/ocm.software/v3alpha1"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/hash/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package hash_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/list/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"bytes"
"fmt"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
)
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/sign/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"os"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/vfs/pkg/vfs"

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/transfer/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"bytes"
"encoding/json"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/spf13/cobra"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package transfer_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"encoding/json"
"fmt"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/verify/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"os"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/ocm/signing"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/logging"
"github.com/mandelsoft/vfs/pkg/vfs"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/ctf/transfer/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"bytes"
"encoding/json"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/plugins/describe/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package describe_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/filepath/pkg/filepath"
)
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/plugins/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package get_test
import (
"bytes"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/mandelsoft/filepath/pkg/filepath"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package accessmethods_test
import (
"encoding/json"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/contexts/ocm"
"github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/plugincacheattr"
Expand Down
Loading

0 comments on commit d16f64b

Please sign in to comment.