Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(format): executed make format on EVERYTHING (incl. tests) #1252

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/oci/ociutils/ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/opencontainers/go-digest"

"ocm.software/ocm/api/oci/ociutils"
"ocm.software/ocm/api/oci/testhelper"
)
Expand Down
2 changes: 1 addition & 1 deletion api/ocm/extensions/accessmethods/git/method_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (

_ "embed"

"github.com/go-git/go-git/v5/plumbing"
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/mandelsoft/filepath/pkg/filepath"
"github.com/mandelsoft/vfs/pkg/cwdfs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"ocm.software/ocm/api/datacontext"
"ocm.software/ocm/api/ocm/extensions/repositories/genericocireg/config"

"github.com/mandelsoft/goutils/finalizer"
"github.com/mandelsoft/vfs/pkg/osfs"
"github.com/mandelsoft/vfs/pkg/vfs"

"ocm.software/ocm/api/datacontext"
"ocm.software/ocm/api/oci"
"ocm.software/ocm/api/oci/extensions/repositories/ctf"
"ocm.software/ocm/api/ocm"
"ocm.software/ocm/api/ocm/cpi/repocpi"
"ocm.software/ocm/api/ocm/extensions/repositories/genericocireg"
"ocm.software/ocm/api/ocm/extensions/repositories/genericocireg/config"
"ocm.software/ocm/api/utils/accessio"
"ocm.software/ocm/api/utils/accessobj"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import (
common "ocm.software/ocm/api/utils/misc"
)

const COMPAT_ARCH = "/testdata/v0.18.0"
const COMPAT_COMP = "github.com/mandelsoft/test1"
const COMPAT_VERS = "1.0.0"
const (
COMPAT_ARCH = "/testdata/v0.18.0"
COMPAT_COMP = "github.com/mandelsoft/test1"
COMPAT_VERS = "1.0.0"
)

var _ = Describe("Transfer Test Environment", func() {
Context("extraid compatibility transfer", func() {

var env *TestEnv

BeforeEach(func() {
Expand Down
3 changes: 2 additions & 1 deletion api/tech/git/identity/identity_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package identity_test

import (
"github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "ocm.software/ocm/api/tech/git/identity"

"github.com/mandelsoft/goutils/testutils"

"ocm.software/ocm/api/credentials"
"ocm.software/ocm/api/datacontext"
"ocm.software/ocm/api/oci"
Expand Down
8 changes: 4 additions & 4 deletions api/tech/git/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ import (
"os"
"time"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/mandelsoft/filepath/pkg/filepath"
. "github.com/mandelsoft/goutils/testutils"
"github.com/mandelsoft/vfs/pkg/cwdfs"
"github.com/mandelsoft/vfs/pkg/osfs"
"github.com/mandelsoft/vfs/pkg/projectionfs"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"ocm.software/ocm/api/datacontext/attrs/tmpcache"
"ocm.software/ocm/api/datacontext/attrs/vfsattr"
Expand Down Expand Up @@ -107,6 +108,5 @@ var _ = Describe("standard tests with local file repo", func() {

file := Must(tempVFS.Stat("file_in_repo"))
Expect(file.Size()).To(Equal(int64(len(expectedBlobContent))))

})
})
11 changes: 6 additions & 5 deletions api/utils/blobaccess/git/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ package git_test

import (
"embed"
_ "embed"
"fmt"
"io"
"os"
"time"

_ "embed"

. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/mandelsoft/filepath/pkg/filepath"
. "github.com/mandelsoft/goutils/testutils"
"github.com/mandelsoft/vfs/pkg/osfs"
"github.com/mandelsoft/vfs/pkg/projectionfs"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"ocm.software/ocm/api/datacontext/attrs/tmpcache"
"ocm.software/ocm/api/datacontext/attrs/vfsattr"
Expand Down Expand Up @@ -100,7 +102,6 @@ var _ = Describe("git Blob Access", func() {
files := Must(tarutils.ListArchiveContentFromReader(Must(b.Reader())))
Expect(files).To(ConsistOf("file_in_repo"))
})

})

Context("git http repository", func() {
Expand Down
4 changes: 2 additions & 2 deletions api/utils/logging/roundtripper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"net/http"
"net/http/httptest"

logcfg "github.com/mandelsoft/logging/config"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/tonglil/buflogr"

"github.com/mandelsoft/logging"
logcfg "github.com/mandelsoft/logging/config"
"github.com/tonglil/buflogr"

local "ocm.software/ocm/api/utils/logging"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "ocm.software/ocm/cmds/ocm/testhelper"

"ocm.software/ocm/api/datacontext/attrs/vfsattr"
"ocm.software/ocm/api/ocm"
"ocm.software/ocm/api/ocm/extensions/repositories/ctf"
"ocm.software/ocm/api/utils/accessio"
. "ocm.software/ocm/cmds/ocm/testhelper"
)

const (
Expand Down Expand Up @@ -78,7 +78,6 @@ resources:
})

It("add git repo described by cli options through blob access via input described in file", func() {

constructor := fmt.Sprintf(`---
name: test.de/x
version: %s
Expand Down
3 changes: 2 additions & 1 deletion cmds/ocm/commands/ocmcmds/components/add/cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package add_test

import (
"github.com/mandelsoft/goutils/general"
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "ocm.software/ocm/api/oci/testhelper"
. "ocm.software/ocm/cmds/ocm/testhelper"

"github.com/mandelsoft/goutils/general"

"ocm.software/ocm/api/oci"
"ocm.software/ocm/api/oci/artdesc"
"ocm.software/ocm/api/ocm"
Expand Down
1 change: 0 additions & 1 deletion cmds/ocm/commands/ocmcmds/components/hash/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

. "ocm.software/ocm/cmds/ocm/testhelper"

"ocm.software/ocm/api/ocm/compdesc"
Expand Down
3 changes: 1 addition & 2 deletions cmds/ocm/commands/ocmcmds/components/sign/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ import (
. "github.com/mandelsoft/goutils/testutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

. "ocm.software/ocm/api/oci/testhelper"
"ocm.software/ocm/api/ocm/compdesc"
. "ocm.software/ocm/api/ocm/testhelper"
. "ocm.software/ocm/cmds/ocm/testhelper"

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

"ocm.software/ocm/api/datacontext"
"ocm.software/ocm/api/oci"
"ocm.software/ocm/api/ocm/compdesc"
metav1 "ocm.software/ocm/api/ocm/compdesc/meta/v1"
"ocm.software/ocm/api/ocm/extensions/accessmethods/ociartifact"
resourcetypes "ocm.software/ocm/api/ocm/extensions/artifacttypes"
Expand Down
5 changes: 3 additions & 2 deletions examples/lib/tour/07-resource-management/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

"github.com/mandelsoft/goutils/errors"

"ocm.software/ocm/api/ocm"
metav1 "ocm.software/ocm/api/ocm/compdesc/meta/v1"
"ocm.software/ocm/api/ocm/extensions/repositories/ocireg"
Expand Down Expand Up @@ -80,8 +81,7 @@ func (r *resource) Close() error {
// --- begin caching factory ---
// CachingFactory provides resource inmplementations
// using the original access as cache.
type CachingFactory struct {
}
type CachingFactory struct{}

func (c CachingFactory) Create(id metav1.Identity, typ string) Resource {
return &resource{
Expand All @@ -95,6 +95,7 @@ func (c CachingFactory) Create(id metav1.Identity, typ string) Resource {
func (r *resource) GetIdentity() metav1.Identity {
return r.Identity
}

func (r *resource) GetType() string {
return r.ArtifactType
}
Expand Down
Loading