diff --git a/.dockerignore b/.dockerignore index a072a1b..9ec2639 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,5 +5,5 @@ bin/ charts/ config/ docs/ -e2e/ +test/ testbin/ diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index cc563cf..ec55e10 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -25,5 +25,5 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - run: make -C e2e create-cluster - - run: make -C e2e test + - run: make -C test/e2e create-cluster + - run: make -C test/e2e test diff --git a/.gitignore b/.gitignore index 141e756..3d1bb00 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,4 @@ testbin/* pie !pie/ -e2e/.kubeconfig +test/e2e/.kubeconfig diff --git a/README.md b/README.md index 3c1e096..14a015f 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,6 @@ TYPE: counter 2. Run e2e test on the local cluster. ```sh - make -C e2e create-cluster - make -C e2e test + make -C test/e2e create-cluster + make -C test/e2e test ``` diff --git a/e2e/Makefile b/test/e2e/Makefile similarity index 91% rename from e2e/Makefile rename to test/e2e/Makefile index 07e9e70..307de42 100644 --- a/e2e/Makefile +++ b/test/e2e/Makefile @@ -1,4 +1,4 @@ -include ../versions.mk +include ../../versions.mk PROJECT_ROOT := $(shell git rev-parse --show-toplevel) BINDIR := $(PROJECT_ROOT)/bin @@ -12,10 +12,10 @@ KIND_CLUSTER_NAME := pie-test .PHONY: create-cluster create-cluster: $(KIND) $(HELM) $(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image $(KIND_NODE_VERSION) - $(MAKE) -C ../ docker-build IMG=pie:dev + $(MAKE) -C ../../ docker-build IMG=pie:dev $(KIND) load docker-image pie:dev --name $(KIND_CLUSTER_NAME) $(MAKE) $(KUBECONFIG) - KUBECONFIG=$(KUBECONFIG) $(HELM) install --create-namespace -n e2e pie ../charts/pie/ -f values.yaml + KUBECONFIG=$(KUBECONFIG) $(HELM) install --create-namespace -n e2e pie ../../charts/pie/ -f values.yaml .PHONY: test test: $(KUBECONFIG) diff --git a/e2e/suite_test.go b/test/e2e/suite_test.go similarity index 99% rename from e2e/suite_test.go rename to test/e2e/suite_test.go index 29eff3e..750967b 100644 --- a/e2e/suite_test.go +++ b/test/e2e/suite_test.go @@ -57,7 +57,7 @@ func kubectlWithInput(input []byte, args ...string) ([]byte, []byte, error) { func TestMtest(t *testing.T) { if os.Getenv("E2ETEST") == "" { - t.Skip("Run under e2e/") + t.Skip("Run under test/e2e/") return } diff --git a/e2e/testdata/dummyStorageClass.yaml b/test/e2e/testdata/dummyStorageClass.yaml similarity index 100% rename from e2e/testdata/dummyStorageClass.yaml rename to test/e2e/testdata/dummyStorageClass.yaml diff --git a/e2e/values.yaml b/test/e2e/values.yaml similarity index 100% rename from e2e/values.yaml rename to test/e2e/values.yaml