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

🐛 (deploy-image/v1-alpha1): Fix typo issue by replacing typeNamespaceName with typeNamespacedName #4100

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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var _ = Describe("Memcached controller", func() {
},
}

typeNamespaceName := types.NamespacedName{
typeNamespacedName := types.NamespacedName{
Name: MemcachedName,
Namespace: MemcachedName,
}
Expand All @@ -65,7 +65,7 @@ var _ = Describe("Memcached controller", func() {
Expect(err).To(Not(HaveOccurred()))

By("creating the custom resource for the Kind Memcached")
err = k8sClient.Get(ctx, typeNamespaceName, memcached)
err = k8sClient.Get(ctx, typeNamespacedName, memcached)
if err != nil && errors.IsNotFound(err) {
// Let's mock our custom resource at the same way that we would
// apply on the cluster the manifest under config/samples
Expand All @@ -88,7 +88,7 @@ var _ = Describe("Memcached controller", func() {
AfterEach(func() {
By("removing the custom resource for the Kind Memcached")
found := &cachev1alpha1.Memcached{}
err := k8sClient.Get(ctx, typeNamespaceName, found)
err := k8sClient.Get(ctx, typeNamespacedName, found)
Expect(err).To(Not(HaveOccurred()))

Eventually(func() error {
Expand All @@ -109,7 +109,7 @@ var _ = Describe("Memcached controller", func() {
By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &cachev1alpha1.Memcached{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -119,14 +119,14 @@ var _ = Describe("Memcached controller", func() {
}

_, err := memcachedReconciler.Reconcile(ctx, reconcile.Request{
NamespacedName: typeNamespaceName,
NamespacedName: typeNamespacedName,
})
Expect(err).To(Not(HaveOccurred()))

By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Checking the latest Status Condition added to the Memcached instance")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
},
}

typeNamespaceName := types.NamespacedName{
typeNamespacedName := types.NamespacedName{
Name: {{ .Resource.Kind }}Name,
Namespace: {{ .Resource.Kind }}Name,
}
Expand All @@ -115,7 +115,7 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
Expect(err).To(Not(HaveOccurred()))

By("creating the custom resource for the Kind {{ .Resource.Kind }}")
err = k8sClient.Get(ctx, typeNamespaceName, {{ lower .Resource.Kind }})
err = k8sClient.Get(ctx, typeNamespacedName, {{ lower .Resource.Kind }})
if err != nil && errors.IsNotFound(err) {
// Let's mock our custom resource at the same way that we would
// apply on the cluster the manifest under config/samples
Expand All @@ -140,7 +140,7 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
AfterEach(func() {
By("removing the custom resource for the Kind {{ .Resource.Kind }}")
found := &{{ .Resource.ImportAlias }}.{{ .Resource.Kind }}{}
err := k8sClient.Get(ctx, typeNamespaceName, found)
err := k8sClient.Get(ctx, typeNamespacedName, found)
Expect(err).To(Not(HaveOccurred()))

Eventually(func() error {
Expand All @@ -161,7 +161,7 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &{{ .Resource.ImportAlias }}.{{ .Resource.Kind }}{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -171,14 +171,14 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
}

_, err := {{ lower .Resource.Kind }}Reconciler.Reconcile(ctx, reconcile.Request{
NamespacedName: typeNamespaceName,
NamespacedName: typeNamespacedName,
})
Expect(err).To(Not(HaveOccurred()))

By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Checking the latest Status Condition added to the {{ .Resource.Kind }} instance")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var _ = Describe("Busybox controller", func() {
},
}

typeNamespaceName := types.NamespacedName{
typeNamespacedName := types.NamespacedName{
Name: BusyboxName,
Namespace: BusyboxName,
}
Expand All @@ -65,7 +65,7 @@ var _ = Describe("Busybox controller", func() {
Expect(err).To(Not(HaveOccurred()))

By("creating the custom resource for the Kind Busybox")
err = k8sClient.Get(ctx, typeNamespaceName, busybox)
err = k8sClient.Get(ctx, typeNamespacedName, busybox)
if err != nil && errors.IsNotFound(err) {
// Let's mock our custom resource at the same way that we would
// apply on the cluster the manifest under config/samples
Expand All @@ -87,7 +87,7 @@ var _ = Describe("Busybox controller", func() {
AfterEach(func() {
By("removing the custom resource for the Kind Busybox")
found := &examplecomv1alpha1.Busybox{}
err := k8sClient.Get(ctx, typeNamespaceName, found)
err := k8sClient.Get(ctx, typeNamespacedName, found)
Expect(err).To(Not(HaveOccurred()))

Eventually(func() error {
Expand All @@ -108,7 +108,7 @@ var _ = Describe("Busybox controller", func() {
By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &examplecomv1alpha1.Busybox{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -118,14 +118,14 @@ var _ = Describe("Busybox controller", func() {
}

_, err := busyboxReconciler.Reconcile(ctx, reconcile.Request{
NamespacedName: typeNamespaceName,
NamespacedName: typeNamespacedName,
})
Expect(err).To(Not(HaveOccurred()))

By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Checking the latest Status Condition added to the Busybox instance")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var _ = Describe("Memcached controller", func() {
},
}

typeNamespaceName := types.NamespacedName{
typeNamespacedName := types.NamespacedName{
Name: MemcachedName,
Namespace: MemcachedName,
}
Expand All @@ -65,7 +65,7 @@ var _ = Describe("Memcached controller", func() {
Expect(err).To(Not(HaveOccurred()))

By("creating the custom resource for the Kind Memcached")
err = k8sClient.Get(ctx, typeNamespaceName, memcached)
err = k8sClient.Get(ctx, typeNamespacedName, memcached)
if err != nil && errors.IsNotFound(err) {
// Let's mock our custom resource at the same way that we would
// apply on the cluster the manifest under config/samples
Expand All @@ -88,7 +88,7 @@ var _ = Describe("Memcached controller", func() {
AfterEach(func() {
By("removing the custom resource for the Kind Memcached")
found := &examplecomv1alpha1.Memcached{}
err := k8sClient.Get(ctx, typeNamespaceName, found)
err := k8sClient.Get(ctx, typeNamespacedName, found)
Expect(err).To(Not(HaveOccurred()))

Eventually(func() error {
Expand All @@ -109,7 +109,7 @@ var _ = Describe("Memcached controller", func() {
By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &examplecomv1alpha1.Memcached{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -119,14 +119,14 @@ var _ = Describe("Memcached controller", func() {
}

_, err := memcachedReconciler.Reconcile(ctx, reconcile.Request{
NamespacedName: typeNamespaceName,
NamespacedName: typeNamespacedName,
})
Expect(err).To(Not(HaveOccurred()))

By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
return k8sClient.Get(ctx, typeNamespaceName, found)
return k8sClient.Get(ctx, typeNamespacedName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Checking the latest Status Condition added to the Memcached instance")
Expand Down
Loading