Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Sep 19, 2023
1 parent eec8d45 commit ccfee8d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
3 changes: 0 additions & 3 deletions klt-cert-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: keptntaskdefinitions.lifecycle.keptn.sh
spec:
group: lifecycle.keptn.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package keptntask

import (
"context"
fakeclient "github.com/keptn/lifecycle-toolkit/lifecycle-operator/controllers/common/fake"
"testing"

klcv1alpha3 "github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1alpha3"
apicommon "github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1alpha3/common"
"github.com/keptn/lifecycle-toolkit/lifecycle-operator/controllers/common"
controllercommon "github.com/keptn/lifecycle-toolkit/lifecycle-operator/controllers/common"
fakeclient "github.com/keptn/lifecycle-toolkit/lifecycle-operator/controllers/common/fake"
"github.com/stretchr/testify/require"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package keptnworkloadinstance
import (
"context"
"fmt"
"sigs.k8s.io/controller-runtime/pkg/client"
"strings"
"testing"
"time"
Expand All @@ -25,6 +24,7 @@ import (
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
k8sfake "sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)
Expand Down
11 changes: 6 additions & 5 deletions lifecycle-operator/test/component/task/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,12 @@ var _ = Describe("Task", Ordered, func() {
Expect(err).To(BeNil())

Expect(createdJob.Annotations).To(Equal(map[string]string{
"annotation1": "annotation2",
"keptn.sh/task-name": task.Name,
"keptn.sh/version": "",
"keptn.sh/workload": "my-workload",
"keptn.sh/app": "my-app",
"annotation1": "annotation2",
"keptn.sh/task-name": task.Name,
"keptn.sh/version": "",
"keptn.sh/workload": "my-workload",
"keptn.sh/app": "my-app",
"batch.kubernetes.io/job-tracking": "",
}))

Expect(createdJob.Labels).To(Equal(map[string]string{
Expand Down

0 comments on commit ccfee8d

Please sign in to comment.