Fixed some broken tests

This commit is contained in:
anonpenguin23 2026-01-30 05:35:50 +02:00
parent 46aa2f2869
commit 9a8fba3f47
11 changed files with 106 additions and 83 deletions

View File

@ -65,7 +65,7 @@ func TestNamespaceCluster_FullProvisioning(t *testing.T) {
// Verify we can use the namespace for deployments // Verify we can use the namespace for deployments
t.Run("Deployments work on namespace", func(t *testing.T) { t.Run("Deployments work on namespace", func(t *testing.T) {
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
if _, err := os.Stat(tarballPath); os.IsNotExist(err) { if _, err := os.Stat(tarballPath); os.IsNotExist(err) {
t.Skip("Test tarball not found - skipping deployment test") t.Skip("Test tarball not found - skipping deployment test")
} }
@ -396,7 +396,7 @@ func TestDeployment_SubdomainFormat(t *testing.T) {
env, err := e2e.LoadTestEnv() env, err := e2e.LoadTestEnv()
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
if _, err := os.Stat(tarballPath); os.IsNotExist(err) { if _, err := os.Stat(tarballPath); os.IsNotExist(err) {
t.Skip("Test tarball not found") t.Skip("Test tarball not found")
} }

View File

@ -25,7 +25,7 @@ func TestNamespaceIsolation_Deployments(t *testing.T) {
envB, err := e2e.LoadTestEnvWithNamespace("namespace-b-" + fmt.Sprintf("%d", time.Now().Unix())) envB, err := e2e.LoadTestEnvWithNamespace("namespace-b-" + fmt.Sprintf("%d", time.Now().Unix()))
require.NoError(t, err, "Failed to create namespace B environment") require.NoError(t, err, "Failed to create namespace B environment")
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
// Create deployment in namespace-a // Create deployment in namespace-a
deploymentNameA := "test-app-ns-a" deploymentNameA := "test-app-ns-a"

View File

@ -9,6 +9,7 @@ import (
"io" "io"
"net/http" "net/http"
"os" "os"
"os/exec"
"path/filepath" "path/filepath"
"testing" "testing"
"time" "time"
@ -30,7 +31,7 @@ func TestGoBackendWithSQLite(t *testing.T) {
deploymentName := fmt.Sprintf("go-sqlite-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("go-sqlite-test-%d", time.Now().Unix())
dbName := fmt.Sprintf("test-db-%d", time.Now().Unix()) dbName := fmt.Sprintf("test-db-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/apps/go-backend.tar.gz") tarballPath := filepath.Join("../../testdata/apps/go-api")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test
@ -82,11 +83,11 @@ func TestGoBackendWithSQLite(t *testing.T) {
var health map[string]interface{} var health map[string]interface{}
require.NoError(t, json.Unmarshal(body, &health)) require.NoError(t, json.Unmarshal(body, &health))
assert.Equal(t, "healthy", health["status"]) assert.Contains(t, []string{"healthy", "ok"}, health["status"])
t.Logf("Health response: %+v", health) t.Logf("Health response: %+v", health)
}) })
t.Run("POST /api/users - create user", func(t *testing.T) { t.Run("POST /api/notes - create note", func(t *testing.T) {
deployment := e2e.GetDeployment(t, env, deploymentID) deployment := e2e.GetDeployment(t, env, deploymentID)
nodeURL := extractNodeURL(t, deployment) nodeURL := extractNodeURL(t, deployment)
if nodeURL == "" { if nodeURL == "" {
@ -95,14 +96,13 @@ func TestGoBackendWithSQLite(t *testing.T) {
domain := extractDomain(nodeURL) domain := extractDomain(nodeURL)
// Create a test user noteData := map[string]string{
userData := map[string]string{ "title": "Test Note",
"name": "Test User", "content": "This is a test note",
"email": "test@example.com",
} }
body, _ := json.Marshal(userData) body, _ := json.Marshal(noteData)
req, err := http.NewRequest("POST", env.GatewayURL+"/api/users", bytes.NewBuffer(body)) req, err := http.NewRequest("POST", env.GatewayURL+"/api/notes", bytes.NewBuffer(body))
require.NoError(t, err) require.NoError(t, err)
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
req.Host = domain req.Host = domain
@ -111,20 +111,17 @@ func TestGoBackendWithSQLite(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
defer resp.Body.Close() defer resp.Body.Close()
assert.Equal(t, http.StatusCreated, resp.StatusCode, "Should create user successfully") assert.Equal(t, http.StatusCreated, resp.StatusCode, "Should create note successfully")
var result map[string]interface{} var note map[string]interface{}
require.NoError(t, json.NewDecoder(resp.Body).Decode(&result)) require.NoError(t, json.NewDecoder(resp.Body).Decode(&note))
assert.True(t, result["success"].(bool), "Success should be true") assert.Equal(t, "Test Note", note["title"])
user := result["user"].(map[string]interface{}) assert.Equal(t, "This is a test note", note["content"])
assert.Equal(t, "Test User", user["name"]) t.Logf("Created note: %+v", note)
assert.Equal(t, "test@example.com", user["email"])
t.Logf("Created user: %+v", user)
}) })
t.Run("GET /api/users - list users", func(t *testing.T) { t.Run("GET /api/notes - list notes", func(t *testing.T) {
deployment := e2e.GetDeployment(t, env, deploymentID) deployment := e2e.GetDeployment(t, env, deploymentID)
nodeURL := extractNodeURL(t, deployment) nodeURL := extractNodeURL(t, deployment)
if nodeURL == "" { if nodeURL == "" {
@ -132,35 +129,28 @@ func TestGoBackendWithSQLite(t *testing.T) {
} }
domain := extractDomain(nodeURL) domain := extractDomain(nodeURL)
resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/api/users") resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/api/notes")
defer resp.Body.Close() defer resp.Body.Close()
assert.Equal(t, http.StatusOK, resp.StatusCode) assert.Equal(t, http.StatusOK, resp.StatusCode)
var result map[string]interface{} var notes []map[string]interface{}
require.NoError(t, json.NewDecoder(resp.Body).Decode(&result)) require.NoError(t, json.NewDecoder(resp.Body).Decode(&notes))
users := result["users"].([]interface{}) assert.GreaterOrEqual(t, len(notes), 1, "Should have at least one note")
total := int(result["total"].(float64))
assert.GreaterOrEqual(t, total, 1, "Should have at least one user")
// Find our test user
found := false found := false
for _, u := range users { for _, note := range notes {
user := u.(map[string]interface{}) if note["title"] == "Test Note" {
if user["email"] == "test@example.com" {
found = true found = true
assert.Equal(t, "Test User", user["name"])
break break
} }
} }
assert.True(t, found, "Test user should be in the list") assert.True(t, found, "Test note should be in the list")
t.Logf("Notes count: %d", len(notes))
t.Logf("Users response: total=%d", total)
}) })
t.Run("DELETE /api/users - delete user", func(t *testing.T) { t.Run("DELETE /api/notes - delete note", func(t *testing.T) {
deployment := e2e.GetDeployment(t, env, deploymentID) deployment := e2e.GetDeployment(t, env, deploymentID)
nodeURL := extractNodeURL(t, deployment) nodeURL := extractNodeURL(t, deployment)
if nodeURL == "" { if nodeURL == "" {
@ -169,26 +159,23 @@ func TestGoBackendWithSQLite(t *testing.T) {
domain := extractDomain(nodeURL) domain := extractDomain(nodeURL)
// First get the user ID // First get the note ID
resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/api/users") resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/api/notes")
defer resp.Body.Close() defer resp.Body.Close()
var result map[string]interface{} var notes []map[string]interface{}
require.NoError(t, json.NewDecoder(resp.Body).Decode(&result)) require.NoError(t, json.NewDecoder(resp.Body).Decode(&notes))
users := result["users"].([]interface{}) var noteID int
var userID int for _, note := range notes {
for _, u := range users { if note["title"] == "Test Note" {
user := u.(map[string]interface{}) noteID = int(note["id"].(float64))
if user["email"] == "test@example.com" {
userID = int(user["id"].(float64))
break break
} }
} }
require.NotZero(t, userID, "Should find test user ID") require.NotZero(t, noteID, "Should find test note ID")
// Delete the user req, err := http.NewRequest("DELETE", fmt.Sprintf("%s/api/notes/%d", env.GatewayURL, noteID), nil)
req, err := http.NewRequest("DELETE", fmt.Sprintf("%s/api/users?id=%d", env.GatewayURL, userID), nil)
require.NoError(t, err) require.NoError(t, err)
req.Host = domain req.Host = domain
@ -196,9 +183,8 @@ func TestGoBackendWithSQLite(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
defer deleteResp.Body.Close() defer deleteResp.Body.Close()
assert.Equal(t, http.StatusOK, deleteResp.StatusCode, "Should delete user successfully") assert.Equal(t, http.StatusOK, deleteResp.StatusCode, "Should delete note successfully")
t.Logf("Deleted note ID: %d", noteID)
t.Logf("Deleted user ID: %d", userID)
}) })
} }
@ -206,11 +192,39 @@ func TestGoBackendWithSQLite(t *testing.T) {
func createGoDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath string, envVars map[string]string) string { func createGoDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath string, envVars map[string]string) string {
t.Helper() t.Helper()
var fileData []byte
info, err := os.Stat(tarballPath)
if err != nil {
t.Fatalf("failed to stat tarball path: %v", err)
}
if info.IsDir() {
// Build Go binary for linux/amd64, then tar it
tmpDir, err := os.MkdirTemp("", "go-deploy-*")
if err != nil {
t.Fatalf("failed to create temp dir: %v", err)
}
defer os.RemoveAll(tmpDir)
binaryPath := filepath.Join(tmpDir, "app")
buildCmd := exec.Command("go", "build", "-o", binaryPath, ".")
buildCmd.Dir = tarballPath
buildCmd.Env = append(os.Environ(), "GOOS=linux", "GOARCH=amd64", "CGO_ENABLED=0")
if out, err := buildCmd.CombinedOutput(); err != nil {
t.Fatalf("failed to build Go app: %v\n%s", err, string(out))
}
fileData, err = exec.Command("tar", "-czf", "-", "-C", tmpDir, ".").Output()
if err != nil {
t.Fatalf("failed to create tarball: %v", err)
}
} else {
file, err := os.Open(tarballPath) file, err := os.Open(tarballPath)
if err != nil { if err != nil {
t.Fatalf("failed to open tarball: %v", err) t.Fatalf("failed to open tarball: %v", err)
} }
defer file.Close() defer file.Close()
fileData, _ = io.ReadAll(file)
}
// Create multipart form // Create multipart form
body := &bytes.Buffer{} body := &bytes.Buffer{}
@ -233,7 +247,6 @@ func createGoDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath str
body.WriteString("Content-Disposition: form-data; name=\"tarball\"; filename=\"app.tar.gz\"\r\n") body.WriteString("Content-Disposition: form-data; name=\"tarball\"; filename=\"app.tar.gz\"\r\n")
body.WriteString("Content-Type: application/gzip\r\n\r\n") body.WriteString("Content-Type: application/gzip\r\n\r\n")
fileData, _ := io.ReadAll(file)
body.Write(fileData) body.Write(fileData)
body.WriteString("\r\n--" + boundary + "--\r\n") body.WriteString("\r\n--" + boundary + "--\r\n")

View File

@ -24,7 +24,7 @@ func TestNodeJSDeployment_FullFlow(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("test-nodejs-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("test-nodejs-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/apps/nodejs-backend.tar.gz") tarballPath := filepath.Join("../../testdata/apps/node-api")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test
@ -68,7 +68,8 @@ func TestNodeJSDeployment_FullFlow(t *testing.T) {
var health map[string]interface{} var health map[string]interface{}
require.NoError(t, json.Unmarshal(body, &health)) require.NoError(t, json.Unmarshal(body, &health))
assert.Equal(t, "healthy", health["status"]) assert.Contains(t, []string{"healthy", "ok"}, health["status"],
"Health status should be 'healthy' or 'ok'")
t.Logf("Health check passed: %v", health) t.Logf("Health check passed: %v", health)
}) })
@ -82,8 +83,8 @@ func TestNodeJSDeployment_FullFlow(t *testing.T) {
domain := extractDomain(nodeURL) domain := extractDomain(nodeURL)
// Test root endpoint // Test health endpoint (node-api app serves /health)
resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/") resp := e2e.TestDeploymentWithHostHeader(t, env, domain, "/health")
defer resp.Body.Close() defer resp.Body.Close()
assert.Equal(t, http.StatusOK, resp.StatusCode) assert.Equal(t, http.StatusOK, resp.StatusCode)
@ -94,8 +95,8 @@ func TestNodeJSDeployment_FullFlow(t *testing.T) {
var result map[string]interface{} var result map[string]interface{}
require.NoError(t, json.Unmarshal(body, &result)) require.NoError(t, json.Unmarshal(body, &result))
assert.Contains(t, result["message"], "Node.js") assert.NotEmpty(t, result["service"])
t.Logf("Root endpoint response: %v", result) t.Logf("API endpoint response: %v", result)
}) })
} }

View File

@ -9,6 +9,7 @@ import (
"io" "io"
"net/http" "net/http"
"os" "os"
"os/exec"
"path/filepath" "path/filepath"
"testing" "testing"
"time" "time"
@ -29,7 +30,7 @@ func TestDeploymentRollback_FullFlow(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("rollback-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("rollback-test-%d", time.Now().Unix())
tarballPathV1 := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPathV1 := filepath.Join("../../testdata/apps/react-app")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test
@ -120,9 +121,18 @@ func TestDeploymentRollback_FullFlow(t *testing.T) {
func updateDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath string) { func updateDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath string) {
t.Helper() t.Helper()
var fileData []byte
info, err := os.Stat(tarballPath)
require.NoError(t, err)
if info.IsDir() {
fileData, err = exec.Command("tar", "-czf", "-", "-C", tarballPath, ".").Output()
require.NoError(t, err)
} else {
file, err := os.Open(tarballPath) file, err := os.Open(tarballPath)
require.NoError(t, err, "Failed to open tarball") require.NoError(t, err, "Failed to open tarball")
defer file.Close() defer file.Close()
fileData, _ = io.ReadAll(file)
}
// Create multipart form // Create multipart form
body := &bytes.Buffer{} body := &bytes.Buffer{}
@ -138,7 +148,6 @@ func updateDeployment(t *testing.T, env *e2e.E2ETestEnv, name, tarballPath strin
body.WriteString("Content-Disposition: form-data; name=\"tarball\"; filename=\"app.tar.gz\"\r\n") body.WriteString("Content-Disposition: form-data; name=\"tarball\"; filename=\"app.tar.gz\"\r\n")
body.WriteString("Content-Type: application/gzip\r\n\r\n") body.WriteString("Content-Type: application/gzip\r\n\r\n")
fileData, _ := io.ReadAll(file)
body.Write(fileData) body.Write(fileData)
body.WriteString("\r\n--" + boundary + "--\r\n") body.WriteString("\r\n--" + boundary + "--\r\n")

View File

@ -20,7 +20,7 @@ func TestStaticDeployment_FullFlow(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("test-static-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("test-static-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test

View File

@ -22,7 +22,7 @@ func TestDomainRouting_BasicRouting(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("test-routing-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("test-routing-%d", time.Now().Unix())
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {
@ -121,7 +121,7 @@ func TestDomainRouting_MultipleDeployments(t *testing.T) {
env, err := e2e.LoadTestEnv() env, err := e2e.LoadTestEnv()
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
// Create multiple deployments // Create multiple deployments
deployment1Name := fmt.Sprintf("test-multi-1-%d", time.Now().Unix()) deployment1Name := fmt.Sprintf("test-multi-1-%d", time.Now().Unix())
@ -180,7 +180,7 @@ func TestDomainRouting_ContentTypes(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("test-content-types-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("test-content-types-%d", time.Now().Unix())
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {
@ -225,7 +225,7 @@ func TestDomainRouting_SPAFallback(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("test-spa-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("test-spa-%d", time.Now().Unix())
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {
@ -271,7 +271,7 @@ func TestDeployment_DomainFormat(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("format-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("format-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {

View File

@ -61,7 +61,7 @@ func TestFullStack_GoAPI_SQLite(t *testing.T) {
// Note: For now we test the Go backend deployment without actual DB connection // Note: For now we test the Go backend deployment without actual DB connection
// as that requires environment variable injection during deployment // as that requires environment variable injection during deployment
t.Run("Deploy Go backend", func(t *testing.T) { t.Run("Deploy Go backend", func(t *testing.T) {
tarballPath := filepath.Join("../testdata/tarballs/go-backend.tar.gz") tarballPath := filepath.Join("../../testdata/apps/go-api")
// Note: In a real implementation, we would pass DATABASE_NAME env var // Note: In a real implementation, we would pass DATABASE_NAME env var
// For now, we just test the deployment mechanism // For now, we just test the deployment mechanism
@ -252,7 +252,7 @@ func TestFullStack_StaticSite_SQLite(t *testing.T) {
e2e.ExecuteSQLQuery(t, env, dbName, "INSERT INTO page_views (page, count) VALUES ('home', 0)") e2e.ExecuteSQLQuery(t, env, dbName, "INSERT INTO page_views (page, count) VALUES ('home', 0)")
// Deploy frontend // Deploy frontend
tarballPath := filepath.Join("../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
frontendID = e2e.CreateTestDeployment(t, env, frontendName, tarballPath) frontendID = e2e.CreateTestDeployment(t, env, frontendName, tarballPath)
assert.NotEmpty(t, frontendID, "Frontend deployment should succeed") assert.NotEmpty(t, frontendID, "Frontend deployment should succeed")

View File

@ -28,7 +28,7 @@ func TestCrossNode_ProxyRouting(t *testing.T) {
} }
deploymentName := fmt.Sprintf("proxy-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("proxy-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {
@ -86,7 +86,7 @@ func TestCrossNode_APIConsistency(t *testing.T) {
} }
deploymentName := fmt.Sprintf("consistency-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("consistency-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {
@ -162,7 +162,7 @@ func TestCrossNode_DeploymentGetConsistency(t *testing.T) {
} }
deploymentName := fmt.Sprintf("get-consistency-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("get-consistency-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {

View File

@ -24,7 +24,7 @@ func TestHTTPS_CertificateValid(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("https-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("https-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath) deploymentID := e2e.CreateTestDeployment(t, env, deploymentName, tarballPath)
defer func() { defer func() {

View File

@ -36,7 +36,7 @@ func TestHTTPS_ExternalAccess(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("https-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("https-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test
@ -141,7 +141,7 @@ func TestHTTPS_DomainFormat(t *testing.T) {
require.NoError(t, err, "Failed to load test environment") require.NoError(t, err, "Failed to load test environment")
deploymentName := fmt.Sprintf("domain-test-%d", time.Now().Unix()) deploymentName := fmt.Sprintf("domain-test-%d", time.Now().Unix())
tarballPath := filepath.Join("../../testdata/tarballs/react-vite.tar.gz") tarballPath := filepath.Join("../../testdata/apps/react-app")
var deploymentID string var deploymentID string
// Cleanup after test // Cleanup after test