chore: use internal errors util instead of pkg's (#22174)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
Michael Crenshaw
2025-03-05 11:40:56 -05:00
committed by GitHub
parent 04a1608643
commit db82e23ebb
6 changed files with 8 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ import (
"testing"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/argoproj/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
@@ -16,6 +15,7 @@ import (
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/argo/normalizers"
"github.com/argoproj/argo-cd/v3/util/errors"
)
func strToUnstructured(jsonStr string) *unstructured.Unstructured {

View File

@@ -9,7 +9,6 @@ import (
"strings"
"time"
"github.com/argoproj/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
@@ -19,6 +18,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/v3/util/cli"
"github.com/argoproj/argo-cd/v3/util/errors"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"

View File

@@ -4,7 +4,6 @@ import (
"context"
"testing"
"github.com/argoproj/pkg/errors"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -16,6 +15,7 @@ import (
"github.com/argoproj/argo-cd/v3/pkg/apiclient/session"
. "github.com/argoproj/argo-cd/v3/test/e2e/fixture"
accountFixture "github.com/argoproj/argo-cd/v3/test/e2e/fixture/account"
"github.com/argoproj/argo-cd/v3/util/errors"
"github.com/argoproj/argo-cd/v3/util/io"
)

View File

@@ -5,15 +5,14 @@ import (
"encoding/json"
"time"
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/test/e2e/fixture"
"github.com/argoproj/argo-cd/v3/test/e2e/fixture/applicationsets/utils"
"github.com/argoproj/argo-cd/v3/util/errors"
"github.com/argoproj/pkg/errors"
log "github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/dynamic"
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/test/e2e/fixture/applicationsets/utils"
)
// this implements the "then" part of given/when/then

View File

@@ -14,7 +14,6 @@ import (
"github.com/argoproj/gitops-engine/pkg/health"
. "github.com/argoproj/gitops-engine/pkg/sync/common"
"github.com/argoproj/pkg/errors"
. "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
. "github.com/argoproj/argo-cd/v3/test/e2e/fixture"
@@ -447,7 +446,7 @@ func testHookFinalizer(t *testing.T, hookType HookType) {
t.Helper()
Given(t).
And(func() {
errors.CheckError(SetResourceOverrides(map[string]ResourceOverride{
CheckError(SetResourceOverrides(map[string]ResourceOverride{
lua.GetConfigMapKey(schema.FromAPIVersionAndKind("batch/v1", "Job")): {
HealthLua: `
local hs = {}

View File

@@ -8,8 +8,8 @@ import (
"github.com/argoproj/argo-cd/v3/pkg/apis/application"
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/errors"
"github.com/argoproj/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"