Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(e2e): local agent based proxy providers don't recreate the infra on ssh anymore. adjusted the test accordingly #1495

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions e2e/tests/proxyprovider/proxyprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package proxyprovider

import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -69,13 +68,8 @@ var _ = DevPodDescribe("devpod proxy provider test suite", func() {
framework.ExpectEqual(strings.Contains(string(fileBytes), "my-secret-value"), false, "workspace.json shouldn't contain provider secret")

// expect workspace
workspace, err := f.FindWorkspace(ctx, tempDir)
framework.ExpectNoError(err)

// check if ssh works as it should start the container
out, err := f.DevPodSSH(ctx, tempDir, fmt.Sprintf("cat /workspaces/%s/test.txt", workspace.ID))
_, err = f.FindWorkspace(ctx, tempDir)
framework.ExpectNoError(err)
framework.ExpectEqual(out, "Test123", "workspace content does not match")

// delete workspace
err = f.DevPodWorkspaceDelete(ctx, tempDir)
Expand Down Expand Up @@ -103,7 +97,7 @@ var _ = DevPodDescribe("devpod proxy provider test suite", func() {
framework.ExpectNoError(err)

// expect workspace
workspace, err := f.FindWorkspace(ctx, tempDir)
_, err = f.FindWorkspace(ctx, tempDir)
framework.ExpectNoError(err)

// check if ssh works
Expand All @@ -119,11 +113,6 @@ var _ = DevPodDescribe("devpod proxy provider test suite", func() {
framework.ExpectNoError(err)
framework.ExpectEqual(status.State, client.StatusStopped, "state does not match")

// check if ssh works as it should start the container
out, err := f.DevPodSSH(ctx, tempDir, fmt.Sprintf("cat /workspaces/%s/test.txt", workspace.ID))
framework.ExpectNoError(err)
framework.ExpectEqual(out, "Test123", "workspace content does not match")

// delete workspace
err = f.DevPodWorkspaceDelete(ctx, tempDir)
framework.ExpectNoError(err)
Expand Down Expand Up @@ -167,11 +156,6 @@ var _ = DevPodDescribe("devpod proxy provider test suite", func() {
err = f.DevPodUp(ctx, tempDir, "--recreate")
framework.ExpectNoError(err)

// check if ssh works as it should start the container
out, err := f.DevPodSSH(ctx, tempDir, "echo -n $DEVPOD_WORKSPACE_CHANGED")
framework.ExpectNoError(err)
framework.ExpectEqual(out, "TRUE", "workspace has not changed")

// delete workspace
err = f.DevPodWorkspaceDelete(ctx, tempDir)
framework.ExpectNoError(err)
Expand Down Expand Up @@ -201,11 +185,6 @@ var _ = DevPodDescribe("devpod proxy provider test suite", func() {
_, err = f.FindWorkspace(ctx, tempDir)
framework.ExpectNoError(err)

// check if ssh works as it should start the container
out, err := f.DevPodSSH(ctx, tempDir, "echo -n $DEVPOD_WORKSPACE_CHANGED")
framework.ExpectNoError(err)
framework.ExpectEqual(out, "TRUE", "devcontainer path wasn't applied")

// delete workspace
err = f.DevPodWorkspaceDelete(ctx, tempDir)
framework.ExpectNoError(err)
Expand Down
Loading