GoogleCloudPlatform / gke-networking-recipes

Apache License 2.0
307 stars 86 forks source link

Adds test framework and an example test scripts. #158

Closed sawsa307 closed 1 year ago

sawsa307 commented 1 year ago
bowei commented 1 year ago

Can you make the following changes to the Makefile Also, fix the copyright in the Makefile

diff --git a/Makefile b/Makefile
index 2a89aef..10d9f68 100644
--- a/Makefile
+++ b/Makefile
@@ -15,11 +15,14 @@
 RUN_IN_PROW ?= false
 NUM_NODES ?= 3
 TEST_TO_RUN ?= .*
+TEST_GOFILES := $(shell find ./test -name \*.go)

 all: bin/recipes-test

-bin/recipes-test:
-       mkdir bin/
+bin:
+       mkdir ./bin
+
+bin/recipes-test: bin $(TEST_GOFILES)
        go test -c -o $@ ./test

 .PHONY: test
@@ -35,4 +38,4 @@ cleanenv:

 .PHONY: clean
 clean:
-       rm -rf bin/
+       rm -rf ./bin
sawsa307 commented 1 year ago

Can you make the following changes to the Makefile Also, fix the copyright in the Makefile

diff --git a/Makefile b/Makefile
index 2a89aef..10d9f68 100644
--- a/Makefile
+++ b/Makefile
@@ -15,11 +15,14 @@
 RUN_IN_PROW ?= false
 NUM_NODES ?= 3
 TEST_TO_RUN ?= .*
+TEST_GOFILES := $(shell find ./test -name \*.go)

 all: bin/recipes-test

-bin/recipes-test:
-       mkdir bin/
+bin:
+       mkdir ./bin
+
+bin/recipes-test: bin $(TEST_GOFILES)
        go test -c -o $@ ./test

 .PHONY: test
@@ -35,4 +38,4 @@ cleanenv:

 .PHONY: clean
 clean:
-       rm -rf bin/
+       rm -rf ./bin

Updated. Also deleted TEST_TO_RUN since we only have one test now. I'll create a separate PR #159 for cleaning up the existing code that does switch project and create cluster since they are no longer needed based on the discussion offline.