Skip to content

Commit

Permalink
Get ai tests to run with 24.09
Browse files Browse the repository at this point in the history
  • Loading branch information
dhirupandey committed Dec 4, 2024
1 parent aac752b commit c15b57d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 17 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,22 @@ test: ##
tests/test_processors.py \
tests/test_aggregators.py \

# ----------------------------------------------------------------------------------------------------------------------
# Run ai tests with code coverage
# ----------------------------------------------------------------------------------------------------------------------
.PHONY: test-with-ai
test: ##
pytest -W error --cov src/coherence --cov-report=term --cov-report=html \
tests/test_serialization.py \
tests/test_extractors.py \
tests/test_session.py \
tests/test_client.py \
tests/test_events.py \
tests/test_filters.py \
tests/test_processors.py \
tests/test_aggregators.py \
tests/test_ai.py \

# ----------------------------------------------------------------------------------------------------------------------
# Run standards validation across project
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
57 changes: 40 additions & 17 deletions tests/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,44 @@ if [ -z "${PROFILE_STR}" ] ; then
exit 1
fi

echo "Coherence CE 22.06.10"
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 \
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR \
make clean test-cluster-shutdown remove-app-images build-test-images test-cluster-startup just-wait test

echo "Coherence CE 22.06.10 with SSL"
RUN_SECURE=true COHERENCE_IGNORE_INVALID_CERTS=true \
COHERENCE_TLS_CERTS_PATH=$(pwd)/tests/utils/certs/guardians-ca.crt \
COHERENCE_TLS_CLIENT_CERT=$(pwd)/tests/utils/certs/star-lord.crt \
COHERENCE_TLS_CLIENT_KEY=$(pwd)/tests/utils/certs/star-lord.pem \
if [[ "${COH_VER}" =~ "22.06" ]] ; then
echo "Coherence CE 22.06"
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 \
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR,secure \
make clean certs test-cluster-shutdown remove-app-images \
build-test-images test-cluster-startup just-wait test
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR \
make clean test-cluster-shutdown remove-app-images build-test-images test-cluster-startup just-wait test
else
echo "Coherence CE 24.09"
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 \
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR \
make clean test-cluster-shutdown remove-app-images build-test-images test-cluster-startup just-wait test-with-ai
fi

if [[ "${COH_VER}" =~ "22.06" ]] ; then
echo "Coherence CE 22.06 with SSL"
RUN_SECURE=true COHERENCE_IGNORE_INVALID_CERTS=true \
COHERENCE_TLS_CERTS_PATH=$(pwd)/tests/utils/certs/guardians-ca.crt \
COHERENCE_TLS_CLIENT_CERT=$(pwd)/tests/utils/certs/star-lord.crt \
COHERENCE_TLS_CLIENT_KEY=$(pwd)/tests/utils/certs/star-lord.pem \
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 \
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR,secure \
make clean certs test-cluster-shutdown remove-app-images \
build-test-images test-cluster-startup just-wait test
else
echo "Coherence CE 22.06 with SSL"
RUN_SECURE=true COHERENCE_IGNORE_INVALID_CERTS=true \
COHERENCE_TLS_CERTS_PATH=$(pwd)/tests/utils/certs/guardians-ca.crt \
COHERENCE_TLS_CLIENT_CERT=$(pwd)/tests/utils/certs/star-lord.crt \
COHERENCE_TLS_CLIENT_KEY=$(pwd)/tests/utils/certs/star-lord.pem \
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 \
COHERENCE_VERSION=$COH_VER \
COHERENCE_BASE_IMAGE=$BASE_IMAGE \
PROFILES=$PROFILE_STR,secure \
make clean certs test-cluster-shutdown remove-app-images \
build-test-images test-cluster-startup just-wait test-with-ai
fi

0 comments on commit c15b57d

Please sign in to comment.