@@ -38,8 +38,8 @@ COHERENCE_WKA1 ?= server1
3838COHERENCE_WKA2 ?= server1
3939CLUSTER_PORT ?= 7574
4040# Profiles to include for building
41- PROFILES ?= ",- jakarta,javax"
42- COHERENCE_BASE_IMAGE ?= gcr.io/distroless/java17-debian11
41+ PROFILES ?= ",jakarta,- javax"
42+ COHERENCE_BASE_IMAGE ?= gcr.io/distroless/java17-debian12
4343
4444# ----------------------------------------------------------------------------------------------------------------------
4545# Set the location of various build tools
@@ -66,6 +66,27 @@ CURRDIR := $(shell pwd)
6666COMPOSE: =$(shell type -p docker-compose || echo docker compose)
6767$(info COMPOSE = $(COMPOSE))
6868
69+ # ----------------------------------------------------------------------------------------------------------------------
70+ # List of unit tests
71+ # ----------------------------------------------------------------------------------------------------------------------
72+ UNIT_TESTS := tests/unit/test_cache_options.py \
73+ tests/unit/test_local_cache.py \
74+ tests/unit/test_environment.py \
75+ tests/unit/test_serialization.py \
76+ tests/unit/test_extractors.py
77+
78+ # ----------------------------------------------------------------------------------------------------------------------
79+ # List of E2E tests
80+ # ----------------------------------------------------------------------------------------------------------------------
81+ E2E_TESTS := tests/e2e/test_session.py \
82+ tests/e2e/test_client.py \
83+ tests/e2e/test_events.py \
84+ tests/e2e/test_filters.py \
85+ tests/e2e/test_processors.py \
86+ tests/e2e/test_aggregators.py \
87+ tests/e2e/test_near_caching.py \
88+ # tests/e2e/test_ai.py \
89+
6990# ----------------------------------------------------------------------------------------------------------------------
7091# Clean-up all of the build artifacts
7192# ----------------------------------------------------------------------------------------------------------------------
@@ -116,21 +137,53 @@ generate-proto: ## Generate Proto Files
116137 sed -e ' s/import messages_pb2 as messages__pb2/import coherence.messages_pb2 as messages__pb2/' \
117138 < $(CURRDIR ) /src/coherence/services_pb2_grpc.py > $(CURRDIR ) /src/coherence/services_pb2_grpc.py.out
118139 mv $(CURRDIR ) /src/coherence/services_pb2_grpc.py.out $(CURRDIR ) /src/coherence/services_pb2_grpc.py
140+ curl -o $(PROTO_DIR ) /proxy_service_v1.proto \
141+ https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION ) /prj/coherence-grpc/src/main/proto/proxy_service_v1.proto
142+ curl -o $(PROTO_DIR ) /proxy_service_messages_v1.proto \
143+ https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION ) /prj/coherence-grpc/src/main/proto/proxy_service_messages_v1.proto
144+ curl -o $(PROTO_DIR ) /common_messages_v1.proto \
145+ https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION ) /prj/coherence-grpc/src/main/proto/common_messages_v1.proto
146+ curl -o $(PROTO_DIR ) /cache_service_messages_v1.proto \
147+ https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION ) /prj/coherence-grpc/src/main/proto/cache_service_messages_v1.proto
148+ python -m grpc_tools.protoc --proto_path=$(CURRDIR ) /etc/proto --pyi_out=$(CURRDIR ) /src/coherence --python_out=$(CURRDIR ) /src/coherence \
149+ --grpc_python_out=$(CURRDIR ) /src/coherence \
150+ $(CURRDIR ) /etc/proto/proxy_service_v1.proto \
151+ $(CURRDIR ) /etc/proto/proxy_service_messages_v1.proto \
152+ $(CURRDIR ) /etc/proto/common_messages_v1.proto \
153+ $(CURRDIR ) /etc/proto/cache_service_messages_v1.proto
154+ sed -e ' s/import proxy_service_messages_v1_pb2 as proxy__service__messages__v1__pb2/import coherence.proxy_service_messages_v1_pb2 as proxy__service__messages__v1__pb2/' \
155+ < $(CURRDIR ) /src/coherence/proxy_service_v1_pb2.py > $(CURRDIR ) /src/coherence/proxy_service_v1_pb2.py.out
156+ mv $(CURRDIR ) /src/coherence/proxy_service_v1_pb2.py.out $(CURRDIR ) /src/coherence/proxy_service_v1_pb2.py
157+ sed -e ' s/import common_messages_v1_pb2 as common__messages__v1__pb2/import coherence.common_messages_v1_pb2 as common__messages__v1__pb2/' \
158+ < $(CURRDIR ) /src/coherence/proxy_service_messages_v1_pb2.py > $(CURRDIR ) /src/coherence/proxy_service_messages_v1_pb2.py.out
159+ mv $(CURRDIR ) /src/coherence/proxy_service_messages_v1_pb2.py.out $(CURRDIR ) /src/coherence/proxy_service_messages_v1_pb2.py
160+ sed -e ' s/import proxy_service_messages_v1_pb2 as proxy__service__messages__v1__pb2/import coherence.proxy_service_messages_v1_pb2 as proxy__service__messages__v1__pb2/' \
161+ < $(CURRDIR ) /src/coherence/proxy_service_v1_pb2_grpc.py > $(CURRDIR ) /src/coherence/proxy_service_v1_pb2_grpc.py.out
162+ mv $(CURRDIR ) /src/coherence/proxy_service_v1_pb2_grpc.py.out $(CURRDIR ) /src/coherence/proxy_service_v1_pb2_grpc.py
163+ sed -e ' s/import common_messages_v1_pb2 as common__messages__v1__pb2/import coherence.common_messages_v1_pb2 as common__messages__v1__pb2/' \
164+ < $(CURRDIR ) /src/coherence/cache_service_messages_v1_pb2.py > $(CURRDIR ) /src/coherence/cache_service_messages_v1_pb2.py.out
165+ mv $(CURRDIR ) /src/coherence/cache_service_messages_v1_pb2.py.out $(CURRDIR ) /src/coherence/cache_service_messages_v1_pb2.py
119166
120167# ----------------------------------------------------------------------------------------------------------------------
121168# Run tests with code coverage
122169# ----------------------------------------------------------------------------------------------------------------------
123170.PHONY : test
124171test : # #
125- pytest -W error --cov src/coherence --cov-report=term --cov-report=html \
126- tests/test_serialization.py \
127- tests/test_extractors.py \
128- tests/test_session.py \
129- tests/test_client.py \
130- tests/test_events.py \
131- tests/test_filters.py \
132- tests/test_processors.py \
133- tests/test_aggregators.py \
172+ pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(UNIT_TESTS ) $(E2E_TESTS )
173+
174+ # ----------------------------------------------------------------------------------------------------------------------
175+ # Run unit tests with code coverage
176+ # ----------------------------------------------------------------------------------------------------------------------
177+ .PHONY : test-unit
178+ test-unit : # #
179+ pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(UNIT_TESTS )
180+
181+ # ----------------------------------------------------------------------------------------------------------------------
182+ # Run e2e tests with code coverage
183+ # ----------------------------------------------------------------------------------------------------------------------
184+ .PHONY : test-e2e
185+ test-e2e : # #
186+ pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(E2E_TESTS )
134187
135188# ----------------------------------------------------------------------------------------------------------------------
136189# Run standards validation across project
0 commit comments