Skip to content

Commit

Permalink
Migrate Lettuce test setup to use client-lib-test (redis#3158)
Browse files Browse the repository at this point in the history
* add initial skeleton without stunnel

* fix up some paths

* fix the standalone ones.

* fix issues which crash the containers.

* add more file renames.

* add missed configs

* Fix up the docker-compose. TODO: actual testing, after being compliant

* fix sentinel to work

* fix 70 out of 80 failing tests by fixing configuration

* fix make file, this should be committed

* fix up more tests, now only ssl stuff seems to remain. (4 tests)

* fix up one tls, but we need to fix up the java code for the store

* fix some of the ssl tests

* reduce test failures to 3

* fix java

* fix the last of ssl tests. TODO: retest the key tests

* add docker to the makefile

* add fixes for several tests

* formatting

* attempt to create keystore file via java

* format

* Revert "format"

This reverts commit 79c2171.

* Revert "attempt to create keystore file via java"

This reverts commit c4e3b08.

* ad some path fixes

* Fix standaloneWithClientCertificates
   - configure keystore
   - boostrap a redis server requiring tls-auth-clients

* Remove some of old makefile work + fix up paths so they are not destroyed by mvn clean

* attempt integration.yml to work with docker

* experiment with version

* fix clean-up-step

* ordering

* fix up move versioning and try to debug folder+unix issue

* try a sock solution proposed by Ivo

* fix up supported version

* possible fix

* make file name shorte

* fix up paths, yet again, idk why there was docker

* test out new waiting strategy

* revet old waiting

* fix default version and disable a test with server regression

* "Fix" test. Problem is that acldeluser doesn't delete previous Japanese user.

* further fix up acl, and later will create a PR for it

* fix up benchmarks + fix up integration sudo and makefile.

* format

* add some readme fixes

* fix docker compose down

* fix up benchmarks

* remove useless files

* Revert ""Fix" test. Problem is that acldeluser doesn't delete previous Japanese user."

This reverts commit f30a3d6.

* Revert "further fix up acl, and later will create a PR for it"

This reverts commit 1aad1a8.

* Revert ""Fix" test. Problem is that acldeluser doesn't delete previous Japanese user."

This reverts commit f30a3d6.

* "Fix" test. Problem is that acldeluser doesn't delete previous Japanese user.

* fix up merge issues

* fix more merge issues

* fix addjirahere thing

* fix review issues

---------

Co-authored-by: ggivo <[email protected]>
  • Loading branch information
kiryazovi-redis and ggivo authored Feb 17, 2025
1 parent 805c8e0 commit d3848d1
Show file tree
Hide file tree
Showing 47 changed files with 686 additions and 763 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,24 @@ jobs:
- name: Install missing dependencies to container
run: |
sudo apt update
sudo apt install -y stunnel make git gcc
- name: Maven offline
run: |
mvn -q dependency:go-offline
- name: Clean environment
- name: Set up Docker Compose environment
run: |
make cleanup
mkdir -m 777 $REDIS_ENV_WORK_DIR
make docker-start
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: Start servers
REDIS_ENV_WORK_DIR: ${{ github.workspace }}/work
- name: Maven offline
run: |
make start
mvn -q dependency:go-offline
- name: Run benchmarks
run: |
mvn -Pjmh clean test
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: Tear down Docker Compose environment
run: |
docker compose $COMPOSE_ENV_FILES -f src/test/resources/docker-env/docker-compose.yml down
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v4
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,27 @@ jobs:
fail-fast: false
matrix:
redis_version:
- "unstable"
- "8.0"
- "7.4"
- "7.2"
env:
REDIS_ENV_WORK_DIR: ${{ github.workspace }}/work

steps:
- name: Test Redis Server Version
id: map-tags
run: |
# Map requested version to github or tag
case "${{ matrix.redis_version }}" in
"unstable") redis_branch="unstable" stack_version="8.0-M04-pre" ;;
"8.0") redis_branch="8.0" stack_version="8.0-M04-pre" ;;
"7.4") redis_branch="7.4" stack_version="rs-7.4.0-v2" ;;
"7.2") redis_branch="7.2" stack_version="rs-7.2.0-v14" ;;
"8.0") redis_branch="8.0" stack_version="8.0-M04-pre" redis_test_version="8.0-M04-pre";;
"7.4") redis_branch="7.4" stack_version="rs-7.4.0-v2" redis_test_version="7.4.2";;
"7.2") redis_branch="7.2" stack_version="rs-7.2.0-v14" redis_test_version="7.2.7";;
*) echo "Unsupported version: ${{ matrix.redis_version }}" && exit 1 ;;
esac
# Save them as outputs for later use
echo "redis_branch=$redis_branch" >> $GITHUB_OUTPUT
echo "redis_stack_version=$stack_version" >> $GITHUB_OUTPUT
echo "redis_test_version=$redis_test_version" >> $GITHUB_OUTPUT
- name: Checkout project
uses: actions/checkout@v4
- name: Set Java up in the runner
Expand All @@ -59,24 +60,28 @@ jobs:
- name: Install missing dependencies to container
run: |
sudo apt update
sudo apt install -y stunnel make git gcc
- name: Set up Docker Compose environment
run: |
mkdir -m 777 $REDIS_ENV_WORK_DIR
export REDIS_VERSION="${{ steps.map-tags.outputs.redis_test_version }}"
make docker-start version=$REDIS_VERSION
- name: Maven offline
run: |
mvn -q dependency:go-offline
- name: Clean environment
run: |
make cleanup
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
continue-on-error: true
- name: Run tests
run: |
export TEST_WORK_FOLDER=$REDIS_ENV_WORK_DIR
echo $TEST_WORK_FOLDER
ls -la $TEST_WORK_FOLDER
make test-coverage
env:
REDIS: ${{ steps.map-tags.outputs.redis_branch }}
REDIS_STACK_VERSION: ${{ steps.map-tags.outputs.redis_stack_version }}
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: Tear down Docker Compose environment
run: |
docker compose $COMPOSE_ENV_FILES -f src/test/resources/docker-env/docker-compose.yml down
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ work/
dependency-reduced-pom.xml
.idea
.flattened-pom.xml
*.java-version
*.DS_Store
Loading

0 comments on commit d3848d1

Please sign in to comment.