Skip to content

Commit

Permalink
[integration-test] Partially fix TestRegularWorkspaceTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince Rachit Sinha authored and roboquat committed May 12, 2022
1 parent 6809327 commit d7cb9e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
1 change: 0 additions & 1 deletion test/pkg/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func NewPodExec(config rest.Config, clientset *kubernetes.Clientset) *PodExec {
config.APIPath = "/api" // Make sure we target /api and not just /
config.GroupVersion = &schema.GroupVersion{Version: "v1"} // this targets the core api groups so the url path will be /api/v1
config.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: scheme.Codecs}
config.TLSClientConfig = rest.TLSClientConfig{Insecure: true}
return &PodExec{
RestConfig: &config,
Clientset: clientset,
Expand Down
34 changes: 0 additions & 34 deletions test/tests/components/ws-manager/tasks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ package wsmanager
import (
"context"
"encoding/json"
"errors"
"io"
"testing"
"time"

"sigs.k8s.io/e2e-framework/pkg/envconf"
"sigs.k8s.io/e2e-framework/pkg/features"

gitpod "github.com/gitpod-io/gitpod/gitpod-protocol"
supervisor "github.com/gitpod-io/gitpod/supervisor/api"
agent "github.com/gitpod-io/gitpod/test/pkg/agent/workspace/api"
"github.com/gitpod-io/gitpod/test/pkg/integration"
wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api"
Expand Down Expand Up @@ -82,37 +79,6 @@ func TestRegularWorkspaceTasks(t *testing.T) {
_ = integration.DeleteWorkspace(ctx, api, nfo.Req.Id)
})

conn, err := api.Supervisor(nfo.Req.Id)
if err != nil {
t.Fatal(err)
}

tsctx, tscancel := context.WithTimeout(ctx, 60*time.Second)
defer tscancel()

statusService := supervisor.NewStatusServiceClient(conn)
resp, err := statusService.TasksStatus(tsctx, &supervisor.TasksStatusRequest{Observe: false})
if err != nil {
t.Fatal(err)
}

for {
status, err := resp.Recv()
if errors.Is(err, io.EOF) {
break
}

if err != nil {
t.Fatal(err)
}
if len(status.Tasks) != 1 {
t.Fatalf("expected one task to run, but got %d", len(status.Tasks))
}
if status.Tasks[0].State == supervisor.TaskState_closed {
break
}
}

rsa, closer, err := integration.Instrument(integration.ComponentWorkspace, "workspace", cfg.Namespace(), kubeconfig, cfg.Client(), integration.WithInstanceID(nfo.Req.Id))
if err != nil {
t.Fatalf("unexpected error instrumenting workspace: %v", err)
Expand Down

0 comments on commit d7cb9e7

Please sign in to comment.