diff --git a/test/integration/configuration.go b/test/configuration.go similarity index 98% rename from test/integration/configuration.go rename to test/configuration.go index 38ac350..418299d 100644 --- a/test/integration/configuration.go +++ b/test/configuration.go @@ -1,4 +1,4 @@ -package integration +package test import ( "archive/tar" @@ -169,7 +169,7 @@ type Logging interface { func SpoofDPIContainer(port uint16, log Logging, proxyRunArgs []string) (testcontainers.Container, error) { ctx := context.Background() - projectTar, err := MakeTar("../../", FilePredicateFn(func(i FileInfo) bool { + projectTar, err := MakeTar("../", FilePredicateFn(func(i FileInfo) bool { if i.Info.IsDir() { return false } diff --git a/test/integration/Dockerfile b/test/integration/Dockerfile deleted file mode 100644 index 474e52b..0000000 --- a/test/integration/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM golang:alpine as builder - -WORKDIR /go -COPY . . -RUN go build -o spoof-dpi ./cmd/spoof-dpi/main.go - -FROM alpine:latest - -WORKDIR / - -COPY --from=builder /go/bin/spoof-dpi . - -ARG RUN_ARGS - -ENTRYPOINT ["./spoof-dpi", "${RUN_ARGS}"] diff --git a/test/integration/proxy_integration_test.go b/test/proxy_integration_test.go similarity index 85% rename from test/integration/proxy_integration_test.go rename to test/proxy_integration_test.go index ed6f06f..5a44a24 100644 --- a/test/integration/proxy_integration_test.go +++ b/test/proxy_integration_test.go @@ -1,4 +1,4 @@ -package integration_test +package test import ( "context" @@ -10,7 +10,6 @@ import ( "testing" "github.com/sirupsen/logrus" - "github.com/xvzc/SpoofDPI/test/integration" ) type StdoutLogger struct { @@ -20,9 +19,10 @@ func (*StdoutLogger) Printf(format string, args ...interface{}) { fmt.Fprintf(os.Stdout, format, args...) } +// TODO: func TestTest(t *testing.T) { port := uint16(rand2.IntN(65536-2000) + 2000) - container, err := integration.SpoofDPIContainer(port, new(StdoutLogger), []string{"-debug"}) + container, err := SpoofDPIContainer(port, new(StdoutLogger), []string{"-debug"}) if err != nil { t.Fatal(err) }