Skip to content

Commit

Permalink
bump api version
Browse files Browse the repository at this point in the history
Signed-off-by: alekspog <[email protected]>
  • Loading branch information
alekspog committed Mar 30, 2023
1 parent cdac5b0 commit 5d412ad
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/controllers/alert_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func TestAlertReconciler_EventHandler_CrossNamespaceRefs(t *testing.T) {
var (
namespace = "events-" + randStringRunes(5)
req *http.Request
provider *apiv1.Provider
provider *apiv1beta2.Provider
)
g.Expect(createNamespace(namespace)).NotTo(HaveOccurred(), "failed to create test namespace")

Expand Down Expand Up @@ -470,19 +470,19 @@ func TestAlertReconciler_EventHandler_CrossNamespaceRefs(t *testing.T) {
Name: fmt.Sprintf("provider-%s", randStringRunes(5)),
Namespace: namespace,
}
provider = &apiv1.Provider{
provider = &apiv1beta2.Provider{
ObjectMeta: metav1.ObjectMeta{
Name: providerKey.Name,
Namespace: providerKey.Namespace,
},
Spec: apiv1.ProviderSpec{
Spec: apiv1beta2.ProviderSpec{
Type: "generic",
Address: rcvServer.URL,
},
}
g.Expect(k8sClient.Create(context.Background(), provider)).To(Succeed())
g.Eventually(func() bool {
var obj apiv1.Provider
var obj apiv1beta2.Provider
g.Expect(k8sClient.Get(context.Background(), client.ObjectKeyFromObject(provider), &obj))
return conditions.IsReady(&obj)
}, 30*time.Second, time.Second).Should(BeTrue())
Expand All @@ -508,12 +508,12 @@ func TestAlertReconciler_EventHandler_CrossNamespaceRefs(t *testing.T) {
Namespace: namespace,
}

alert := &apiv1.Alert{
alert := &apiv1beta2.Alert{
ObjectMeta: metav1.ObjectMeta{
Name: alertKey.Name,
Namespace: alertKey.Namespace,
},
Spec: apiv1.AlertSpec{
Spec: apiv1beta2.AlertSpec{
ProviderRef: meta.LocalObjectReference{
Name: providerKey.Name,
},
Expand Down Expand Up @@ -556,7 +556,7 @@ func TestAlertReconciler_EventHandler_CrossNamespaceRefs(t *testing.T) {

// wait for controller to mark the alert as ready
g.Eventually(func() bool {
var obj apiv1.Alert
var obj apiv1beta2.Alert
g.Expect(k8sClient.Get(context.Background(), client.ObjectKeyFromObject(alert), &obj))
return conditions.IsReady(&obj)
}, 30*time.Second, time.Second).Should(BeTrue())
Expand Down

0 comments on commit 5d412ad

Please sign in to comment.