Skip to content
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
16 changes: 8 additions & 8 deletions controllers/kustomizationautodeployer_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestReconciliation(t *testing.T) {
test.AssertNoError(t, k8sClient.Create(ctx, repo))
defer cleanupResource(t, k8sClient, repo)
test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[4],
}
})
Expand Down Expand Up @@ -168,7 +168,7 @@ func TestReconciliation(t *testing.T) {
defer cleanupResource(t, k8sClient, repo)

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[4],
}
})
Expand Down Expand Up @@ -207,7 +207,7 @@ func TestReconciliation(t *testing.T) {
defer cleanupResource(t, k8sClient, repo)

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[0],
}
})
Expand Down Expand Up @@ -255,7 +255,7 @@ func TestReconciliation(t *testing.T) {
defer cleanupResource(t, k8sClient, repo)

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[0],
}
})
Expand Down Expand Up @@ -300,7 +300,7 @@ func TestReconciliation(t *testing.T) {
// But the GitRepository hasn't updated from test.CommitIDs[1]

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[1],
}
})
Expand Down Expand Up @@ -345,7 +345,7 @@ func TestReconciliation(t *testing.T) {

// And the Artifact is HEAD-1
test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[1],
}
})
Expand Down Expand Up @@ -401,7 +401,7 @@ func TestReconciliation(t *testing.T) {
defer cleanupResource(t, k8sClient, repo)

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[4],
}
})
Expand Down Expand Up @@ -461,7 +461,7 @@ func TestReconciliation(t *testing.T) {
defer cleanupResource(t, k8sClient, repo)

test.UpdateRepoStatus(t, k8sClient, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[4],
}
})
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/fluxcd/kustomize-controller/api v1.6.1
github.com/fluxcd/pkg/apis/meta v1.21.0
github.com/fluxcd/pkg/runtime v0.85.0
github.com/fluxcd/source-controller/api v1.6.2
github.com/fluxcd/source-controller/api v1.7.0
github.com/go-git/go-billy/v5 v5.6.2
github.com/go-git/go-git/v5 v5.16.2
github.com/go-logr/logr v1.4.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/fluxcd/pkg/apis/meta v1.21.0 h1:R+bN02chcs0HUmyVDQhqe/FHmYLjipVDMLnyY
github.com/fluxcd/pkg/apis/meta v1.21.0/go.mod h1:XUAEUgT4gkWDAEN79E141tmL+v4SV50tVZ/Ojpc/ueg=
github.com/fluxcd/pkg/runtime v0.85.0 h1:oOIeK2XvvsnvB0b1l/2pDuNzhFKSqP6UM+CirRLQvF0=
github.com/fluxcd/pkg/runtime v0.85.0/go.mod h1:Wt9mUzQgMPQMu2D/wKl5pG4zh5vu/tfF5wq9pPobxOQ=
github.com/fluxcd/source-controller/api v1.6.2 h1:UmodAeqLIeF29HdTqf2GiacZyO+hJydJlepDaYsMvhc=
github.com/fluxcd/source-controller/api v1.6.2/go.mod h1:ZJcAi0nemsnBxjVgmJl0WQzNvB0rMETxQMTdoFosmMw=
github.com/fluxcd/source-controller/api v1.7.0 h1:y6vjvbkIN4JzianhmaJqujeghVpvQn3gcsVW/f1xMeA=
github.com/fluxcd/source-controller/api v1.7.0/go.mod h1:UOIEs9AACxPW7fQFqGWw1/FN2QqYDLG6WkvPIyscHkw=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/kustomizationautodeployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"net/http/httptest"
"testing"

"github.com/fluxcd/pkg/apis/meta"
"github.com/gitops-tools/kustomization-auto-deployer/test"
"github.com/google/go-cmp/cmp"
"github.com/onsi/gomega"
apimeta "k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/fluxcd/pkg/apis/meta"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
deployerv1 "github.com/gitops-tools/kustomization-auto-deployer/api/v1alpha1"
)
Expand All @@ -32,7 +32,7 @@ func TestReconciling(t *testing.T) {
defer cleanupResource(t, testEnv, repo)

test.UpdateRepoStatus(t, testEnv, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[2],
}
})
Expand All @@ -58,7 +58,7 @@ func TestReconciling(t *testing.T) {
})

test.UpdateRepoStatus(t, testEnv, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[1],
}
})
Expand All @@ -75,7 +75,7 @@ func TestReconciling(t *testing.T) {
})

test.UpdateRepoStatus(t, testEnv, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[0],
}
})
Expand Down Expand Up @@ -103,7 +103,7 @@ func TestReconciling_with_gates(t *testing.T) {
test.AssertNoError(t, testEnv.Status().Update(ctx, kustomization))

test.UpdateRepoStatus(t, testEnv, repo, func(r *sourcev1.GitRepository) {
r.Status.Artifact = &sourcev1.Artifact{
r.Status.Artifact = &meta.Artifact{
Revision: "main@sha1:" + test.CommitIDs[2],
}
})
Expand Down