Skip to content

Commit c3cc6f9

Browse files
claudebiancarosa
authored andcommitted
fix: correct binary path in e2e tests to use bin directory
- Updated e2e test to look for binary in bin/netkit instead of root - Added bin directory creation in e2e test build fallback - Fixed misleading comment in GitHub Actions workflow (fetchr -> netkit) This ensures consistency with the Makefile build target which places the binary in bin/netkit, resolving CI failures where the binary couldn't be found in the expected location. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 852f0db commit c3cc6f9

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Download Go modules
3939
run: go mod download
4040

41-
- name: Build fetchr binary
41+
- name: Build netkit binary
4242
run: make build
4343

4444
- name: Run Go end-to-end tests

test/e2e/e2e_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,18 @@ type netkitCmd struct {
157157

158158
// startProxyServer starts the netkit proxy server with the given arguments
159159
func startProxyServer(t *testing.T, args ...string) *netkitCmd {
160-
// Build binary path - we assume the binary is in the root directory
161-
binaryPath := filepath.Join("..", "..", "netkit")
160+
// Build binary path - we assume the binary is in the bin directory
161+
binaryPath := filepath.Join("..", "..", "bin", "netkit")
162162

163163
// Check if binary exists
164164
if _, err := os.Stat(binaryPath); os.IsNotExist(err) {
165165
// Try to build it
166166
t.Log("Netkit binary not found, building it")
167+
// Ensure bin directory exists
168+
binDir := filepath.Join("..", "..", "bin")
169+
if err := os.MkdirAll(binDir, 0755); err != nil {
170+
t.Fatalf("Failed to create bin directory: %v", err)
171+
}
167172
buildCmd := exec.Command("go", "build", "-o", binaryPath, "../../cmd/netkit")
168173
if err := buildCmd.Run(); err != nil {
169174
t.Fatalf("Failed to build netkit binary: %v", err)

0 commit comments

Comments
 (0)