Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Download Go modules
run: go mod download

- name: Build fetchr binary
- name: Build netkit binary
run: make build

- name: Run Go end-to-end tests
Expand Down
9 changes: 7 additions & 2 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,18 @@ type netkitCmd struct {

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

// Check if binary exists
if _, err := os.Stat(binaryPath); os.IsNotExist(err) {
// Try to build it
t.Log("Netkit binary not found, building it")
// Ensure bin directory exists
binDir := filepath.Join("..", "..", "bin")
if err := os.MkdirAll(binDir, 0755); err != nil {
t.Fatalf("Failed to create bin directory: %v", err)
}
buildCmd := exec.Command("go", "build", "-o", binaryPath, "../../cmd/netkit")
if err := buildCmd.Run(); err != nil {
t.Fatalf("Failed to build netkit binary: %v", err)
Expand Down