Chore: upgrade kubebuilder installation in unit-test ci (#6018)

* Chore: upgrade kubebuilder installation in unit-test ci

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* upgrade ingress in kuebuilder test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
Somefive
2023-05-23 14:46:22 +08:00
committed by GitHub
parent 868cd32012
commit e109d4e525
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -73,11 +73,11 @@ jobs:
# TODO need update action version to resolve node 12 deprecated.
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@ff52bff1bae252239223476e5ab0d71d6ba02343
uses: RyanSiu1995/kubebuilder-action@ed0e300b13152c2c2bfb104475665c7bf609332f
with:
version: 3.1.0
version: 3.9.1
kubebuilderOnly: false
kubernetesVersion: v1.21.2
kubernetesVersion: v1.26.2
- name: Run Make test
run: make test
+3 -3
View File
@@ -514,7 +514,7 @@ options: {
Kind: "Ingress",
Namespace: "default",
Name: "ingress-http",
APIVersion: "networking.k8s.io/v1beta1",
APIVersion: "networking.k8s.io/v1",
},
},
{
@@ -523,7 +523,7 @@ options: {
Kind: "Ingress",
Namespace: "default",
Name: "ingress-https",
APIVersion: "networking.k8s.io/v1beta1",
APIVersion: "networking.k8s.io/v1",
},
},
{
@@ -532,7 +532,7 @@ options: {
Kind: "Ingress",
Namespace: "default",
Name: "ingress-paths",
APIVersion: "networking.k8s.io/v1beta1",
APIVersion: "networking.k8s.io/v1",
},
},
{
+3 -2
View File
@@ -33,6 +33,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkgtypes "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/strings/slices"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/yaml"
@@ -463,8 +464,8 @@ var _ = Describe("Test velaQL", func() {
fmt.Sprintf("http://%s:30002", gatewayIP),
"http://ingress.domain.helm",
}
for i, endpoint := range endpoints {
Expect(endpoint.String()).Should(BeEquivalentTo(urls[i]))
for _, endpoint := range endpoints {
Expect(slices.Contains(urls, endpoint.String())).Should(BeTrue())
}
})
})