mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-16 14:27:00 +00:00
Feat: revert ci to kind (#6035)
* Feat: revert ci to kind Signed-off-by: Somefive <yd219913@alibaba-inc.com> * feat: use internal runner Signed-off-by: Somefive <yd219913@alibaba-inc.com> * fix test bug Signed-off-by: Somefive <yd219913@alibaba-inc.com> --------- Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
@@ -22,6 +22,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam/testutil"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@@ -351,6 +353,9 @@ spec:
|
||||
name := fmt.Sprintf("component-%s%s", types.CapabilityConfigMapNamePrefix, componentDefinitionName)
|
||||
Eventually(func() bool {
|
||||
err := k8sClient.Get(ctx, client.ObjectKey{Namespace: namespace, Name: name}, &cm)
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "failed to get configmap")
|
||||
}
|
||||
return err == nil
|
||||
}, 10*time.Second, time.Second).Should(BeTrue())
|
||||
Expect(cm.Data[types.OpenapiV3JSONSchema]).Should(Not(Equal("")))
|
||||
|
||||
@@ -30,6 +30,7 @@ import (
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/klog/v2"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
"sigs.k8s.io/yaml"
|
||||
@@ -107,9 +108,12 @@ var _ = Describe("Test DefinitionRevision created by ComponentDefinition", func(
|
||||
|
||||
var cdGet v1beta1.ComponentDefinition
|
||||
Eventually(func() bool {
|
||||
if err := k8sClient.Get(ctx, client.ObjectKey{Namespace: namespace, Name: cdName}, &cdGet); err == nil {
|
||||
err := k8sClient.Get(ctx, client.ObjectKey{Namespace: namespace, Name: cdName}, &cdGet)
|
||||
if err == nil {
|
||||
klog.Infof("component definition %s status: %v", cdName, cdGet.Status)
|
||||
return len(cdGet.Status.Conditions) > 0 && cdGet.Status.Conditions[0].Status == v1.ConditionTrue && cdGet.Status.ConfigMapRef == schemeCMName
|
||||
}
|
||||
klog.ErrorS(err, "unable to get component definition")
|
||||
return false
|
||||
}, 10*time.Second, time.Second).Should(BeTrue())
|
||||
|
||||
|
||||
@@ -44,12 +44,6 @@ import (
|
||||
|
||||
var ResponseString = "Hello HTTP Get."
|
||||
|
||||
func TestInitBaseRestConfig(t *testing.T) {
|
||||
args, err := InitBaseRestConfig()
|
||||
assert.NotNil(t, t, args)
|
||||
assert.NoError(t, err, "you need to have a kubeconfig in your Environment")
|
||||
}
|
||||
|
||||
func TestHTTPGet(t *testing.T) {
|
||||
type want struct {
|
||||
data string
|
||||
|
||||
Reference in New Issue
Block a user