Skip to content

Commit

Permalink
Replace ArgoCD v1alpha1 references with v1beta1
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
  • Loading branch information
svghadi committed Oct 6, 2023
1 parent 7607d97 commit 7a46409
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions controllers/argocd/custommapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -174,7 +174,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -221,7 +221,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -336,7 +336,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -391,7 +391,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -438,7 +438,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down
4 changes: 2 additions & 2 deletions controllers/argocd/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func Test_ArgoCDReconciler_ReconcileRepoTLSSecret(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -264,7 +264,7 @@ func Test_ArgoCDReconciler_ReconcileRedisTLSSecret(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

argoprojv1alpha1 "github.com/argoproj-labs/argocd-operator/api/v1alpha1"
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
)

Expand Down Expand Up @@ -67,7 +68,7 @@ func makeTestNs(opts ...namespaceOpt) *corev1.Namespace {
func makeTestReconciler(t *testing.T, objs ...runtime.Object) *ArgoCDReconciler {
s := scheme.Scheme
assert.NoError(t, argoproj.AddToScheme(s))
assert.NoError(t, argoproj.AddToScheme(s))
assert.NoError(t, argoprojv1alpha1.AddToScheme(s))

cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build()
logger := ctrl.Log.WithName("test-logger")
Expand Down

0 comments on commit 7a46409

Please sign in to comment.