Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 4c08749

Browse files
committed
Fix template tests
Signed-off-by: Joe Eltgroth <[email protected]>
1 parent 4978c29 commit 4c08749

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

tests/testdata/template_and_smoke/template-ce/Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ template-ce.path := $(abspath $(path))
77
$(eval $(call INCLUDE_FILE, $(ROOT_DIR)/builder))
88

99
template-ce.image := kn-fn-test/template-ce
10-
template-ce.image_paths := $(shell find $(template-ce.path) -mindepth 1 -maxdepth 1 -type l)
11-
$(template-ce.image_paths): $(PACK) $(builder.image.out)
12-
cd $@ && $(PACK) build $(template-ce.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --pull-policy if-not-present --clear-cache
10+
template-ce.java_image_paths := $(shell find $(template-ce.path) -mindepth 1 -maxdepth 1 -type l | grep java)
11+
template-ce.python_image_paths := $(shell find $(template-ce.path) -mindepth 1 -maxdepth 1 -type l | grep python)
12+
$(template-ce.java_image_paths): $(PACK) $(builder.image.out)
13+
cd $@ && $(PACK) build $(template-ce.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --env BP_FUNCTION=functions.Handler --pull-policy if-not-present --clear-cache
14+
$(template-ce.python_image_paths): $(PACK) $(builder.image.out)
15+
cd $@ && $(PACK) build $(template-ce.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --env BP_FUNCTION=func.main --pull-policy if-not-present --clear-cache
1316

1417
template-ce.clean := $(addsuffix .clean,$(template-ce.image_paths))
1518
$(template-ce.clean):
1619
-docker rmi -f $(template-ce.image):$(basename $(notdir $@))
1720

1821
.PHONY: template-tests.images
19-
template-tests.images .PHONY: $(template-ce.image_paths)
22+
template-tests.images .PHONY: $(template-ce.java_image_paths) $(template-ce.python_image_paths)
2023
clean .PHONY: $(template-ce.clean)

tests/testdata/template_and_smoke/template-http/Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ template-http.path := $(abspath $(path))
77
$(eval $(call INCLUDE_FILE, $(ROOT_DIR)/builder))
88

99
template-http.image := kn-fn-test/template-http
10-
template-http.image_paths := $(shell find $(template-http.path) -mindepth 1 -maxdepth 1 -type l)
11-
$(template-http.image_paths): $(PACK) $(builder.image.out)
12-
cd $@ && $(PACK) build $(template-http.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --pull-policy if-not-present --clear-cache
10+
template-http.java_image_paths := $(shell find $(template-http.path) -mindepth 1 -maxdepth 1 -type l | grep java)
11+
template-http.python_image_paths := $(shell find $(template-http.path) -mindepth 1 -maxdepth 1 -type l | grep python)
12+
$(template-http.java_image_paths): $(PACK) $(builder.image.out)
13+
cd $@ && $(PACK) build $(template-http.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --env BP_FUNCTION=functions.Handler --pull-policy if-not-present --clear-cache
14+
$(template-http.python_image_paths): $(PACK) $(builder.image.out)
15+
cd $@ && $(PACK) build $(template-http.image):$(notdir $@) --builder $(shell cat $(builder.image.out)) --env BP_FUNCTION=func.main --pull-policy if-not-present --clear-cache
1316

1417
template-http.clean := $(addsuffix .clean,$(template-http.image_paths))
1518
$(template-http.clean):
1619
-docker rmi -f $(template-http.image):$(basename $(notdir $@))
1720

1821
.PHONY: template-tests.images
19-
template-tests.images .PHONY: $(template-http.image_paths)
22+
template-tests.images .PHONY: $(template-http.java_image_paths) $(template-http.python_image_paths)
2023
clean .PHONY: $(template-http.clean)

0 commit comments

Comments
 (0)