Path: blob/main/test/tests/components/ws-manager/wsmanager_test.go
2500 views
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package wsmanager56import (7"context"8"testing"9"time"1011"sigs.k8s.io/e2e-framework/pkg/envconf"12"sigs.k8s.io/e2e-framework/pkg/features"1314"github.com/gitpod-io/gitpod/test/pkg/integration"15wsmanager_api "github.com/gitpod-io/gitpod/ws-manager/api"16)1718func TestGetWorkspaces(t *testing.T) {19f := features.New("workspaces").20WithLabel("component", "ws-manager").21Assess("it should get workspaces", func(testCtx context.Context, t *testing.T, cfg *envconf.Config) context.Context {22t.Parallel()2324ctx, cancel := context.WithTimeout(testCtx, 5*time.Minute)25defer cancel()2627api := integration.NewComponentAPI(ctx, cfg.Namespace(), kubeconfig, cfg.Client())28t.Cleanup(func() {29api.Done(t)30})3132wsman, err := api.WorkspaceManager()33if err != nil {34t.Fatal(err)35}3637_, err = wsman.GetWorkspaces(ctx, &wsmanager_api.GetWorkspacesRequest{})38if err != nil {39t.Fatal(err)40}4142return testCtx43}).44Feature()4546testEnv.Test(t, f)47}484950