Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#521 from charleszheng44/master
Browse files Browse the repository at this point in the history
[Incubator][VC] fix vc test case
  • Loading branch information
k8s-ci-robot authored Mar 17, 2020
2 parents 7b807c3 + e791d25 commit c026647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (r *ReconcileVirtualcluster) Reconcile(request reconcile.Request) (rncilRsl
vc.Status.Message = "tenant master is running"
vc.Status.Reason = "TenantMasterRunning"
vc.Status.Conditions = append(vc.Status.Conditions, tenancyv1alpha1.ClusterCondition{
LastTransitionTime: metav1.Time{time.Now()},
LastTransitionTime: metav1.NewTime(time.Now()),
Message: fmt.Sprintf("virtualcluster(%s) starts running", vc.GetName()),
})
updateErr := r.Update(context.TODO(), vc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"time"

tenancyv1alpha1 "github.com/kubernetes-sigs/multi-tenancy/incubator/virtualcluster/pkg/apis/tenancy/v1alpha1"
vcmanager "github.com/kubernetes-sigs/multi-tenancy/incubator/virtualcluster/pkg/controller/vcmanager"
"github.com/onsi/gomega"
"golang.org/x/net/context"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -44,7 +45,8 @@ func TestReconcile(t *testing.T) {
// Setup the Manager and Controller. Wrap the Controller Reconcile function so it writes each request to a
// channel when it is finished.
// NOTE: use a random free port ":0"
mgr, err := manager.New(cfg, manager.Options{MetricsBindAddress: ":0"})

mgr, err := vcmanager.NewVirtualClusterManager(cfg, manager.Options{MetricsBindAddress: ":0"}, 1)
g.Expect(err).NotTo(gomega.HaveOccurred())
c = mgr.GetClient()

Expand Down

0 comments on commit c026647

Please sign in to comment.