Skip to content

Commit 193ec31

Browse files
spencercjhclaude
andcommitted
fix(test): address code review feedback for e2e tests
- error_test.go: fail test on wrong error type instead of just logging - error_test.go: remove unused targetDir variable - README.md: add prerequisites for Java 25 and goctl installation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: spencercjh <spencercjh@gmail.com>
1 parent 1f022f7 commit 193ec31

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

integration-tests/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ go test ./...
2222

2323
### End-to-End Tests
2424

25-
E2E tests require the build tools (Maven/Gradle) to be installed.
25+
E2E tests require the following tools to be installed:
26+
27+
- **Java 25** - Required for Spring Boot projects (Maven/Gradle wrappers are included in demo projects)
28+
- **goctl** - Required for go-zero projects. Install with:
29+
```bash
30+
go install github.com/zeromicro/go-zero/tools/goctl@latest
31+
```
2632

2733
```bash
2834
# Run all e2e tests

integration-tests/error_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ func TestE2E_ErrorHandling_CommandNotFound(t *testing.T) {
2121
t.Fatal(err)
2222
}
2323

24-
// Create target directory with a dummy spec (simulating pre-existing spec)
25-
targetDir := filepath.Join(tmpDir, "target")
26-
if err := os.Mkdir(targetDir, 0o755); err != nil {
27-
t.Fatal(err)
28-
}
29-
3024
ctx := context.Background()
3125
exec := executor.NewExecutor()
3226

@@ -42,6 +36,6 @@ func TestE2E_ErrorHandling_CommandNotFound(t *testing.T) {
4236

4337
// Verify it's a CommandNotFoundError
4438
if _, ok := errors.AsType[*executor.CommandNotFoundError](err); !ok {
45-
t.Logf("Got error type %T: %v", err, err)
39+
t.Fatalf("expected CommandNotFoundError, got %T: %v", err, err)
4640
}
4741
}

0 commit comments

Comments
 (0)