Skip to content

Commit 11bf491

Browse files
authored
fix: enable redis storage mode in tests (#2522)
* enable redis storage Signed-off-by: achmelo <a.chmelo@gmail.com> * run redis test only, use service name as host Signed-off-by: achmelo <a.chmelo@gmail.com> * remove publish results Signed-off-by: achmelo <a.chmelo@gmail.com> * do not expect sentinel setup in caching service Signed-off-by: achmelo <a.chmelo@gmail.com> * test redis only without tls Signed-off-by: achmelo <a.chmelo@gmail.com> * depends on correct job Signed-off-by: achmelo <a.chmelo@gmail.com> * typo Signed-off-by: achmelo <a.chmelo@gmail.com> * jobname Signed-off-by: achmelo <a.chmelo@gmail.com>
1 parent f7113ae commit 11bf491

File tree

3 files changed

+9
-78
lines changed

3 files changed

+9
-78
lines changed

.github/workflows/containers.yml

Lines changed: 7 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -373,70 +373,6 @@ jobs:
373373
374374
- uses: ./.github/actions/teardown
375375

376-
CITestsWithRedis:
377-
needs: PublishJibContainers
378-
runs-on: ubuntu-latest
379-
container: ubuntu:latest
380-
timeout-minutes: 15
381-
382-
services:
383-
api-catalog-services:
384-
image: ghcr.io/balhar-jakub/api-catalog-services:${{ github.event.pull_request.number || 'latest' }}
385-
volumes:
386-
- /api-defs:/api-defs
387-
caching-service:
388-
image: ghcr.io/balhar-jakub/caching-service:${{ github.event.pull_request.number || 'latest' }}
389-
env:
390-
ZWE_CACHING_SERVICE_PERSISTENT: 'redis'
391-
CACHING_STORAGE_REDIS_MASTERNODEURI: 'default:heslo@localhost:6379'
392-
CACHING_STORAGE_REDIS_SSL_ENABLED: true
393-
discoverable-client:
394-
image: ghcr.io/balhar-jakub/discoverable-client:${{ github.event.pull_request.number || 'latest' }}
395-
discovery-service:
396-
image: ghcr.io/balhar-jakub/discovery-service:${{ github.event.pull_request.number || 'latest' }}
397-
volumes:
398-
- /api-defs:/api-defs
399-
gateway-service:
400-
image: ghcr.io/balhar-jakub/gateway-service:${{ github.event.pull_request.number || 'latest' }}
401-
mock-services:
402-
image: ghcr.io/balhar-jakub/mock-services:${{ github.event.pull_request.number || 'latest' }}
403-
env:
404-
ZOSMF_APPLIEDAPARS: AuthenticateApar
405-
redis-master:
406-
image: redis:latest
407-
ports:
408-
- "6379:6379"
409-
410-
redis-replica:
411-
image: redis:latest
412-
ports:
413-
- "6380:6380"
414-
415-
steps:
416-
- uses: actions/checkout@v2
417-
with:
418-
ref: ${{ github.head_ref }}
419-
420-
- uses: ./.github/actions/setup
421-
422-
- name: Build with Gradle
423-
run: >
424-
./gradlew :integration-tests:runCachingServiceTests --info -Denvironment.config=-docker -Denvironment.offPlatform=true
425-
-Partifactory_user=${{ secrets.ARTIFACTORY_USERNAME }} -Partifactory_password=${{ secrets.ARTIFACTORY_PASSWORD }}
426-
427-
- uses: ./.github/actions/dump-jacoco
428-
if: always()
429-
430-
- name: Store results
431-
uses: actions/upload-artifact@v3
432-
if: always()
433-
with:
434-
name: ContainerCITestsWithRedis-${{ env.JOB_ID }}
435-
path: |
436-
integration-tests/build/reports/**
437-
results/**
438-
- uses: ./.github/actions/teardown
439-
440376
CITestsWithRedisWithoutSslVerification:
441377
needs: PublishJibContainers
442378
runs-on: ubuntu-latest
@@ -451,8 +387,8 @@ jobs:
451387
caching-service:
452388
image: ghcr.io/balhar-jakub/caching-service:${{ github.event.pull_request.number || 'latest' }}
453389
env:
454-
ZWE_CACHING_SERVICE_PERSISTENT: 'redis'
455-
CACHING_STORAGE_REDIS_MASTERNODEURI: 'default:heslo@localhost:6379'
390+
CACHING_STORAGE_MODE: 'redis'
391+
CACHING_STORAGE_REDIS_MASTERNODEURI: 'default:heslo@redis-master:6379'
456392
CACHING_STORAGE_REDIS_SSL_ENABLED: false
457393
VERIFY_CERTIFICATES: false
458394
discoverable-client:
@@ -500,6 +436,7 @@ jobs:
500436
name: ContainerCITestsWithRedisWithoutSslVerification-${{ env.JOB_ID }}
501437
path: |
502438
integration-tests/build/reports/**
439+
results/**
503440
504441
- uses: ./.github/actions/teardown
505442

@@ -1136,7 +1073,7 @@ jobs:
11361073
- uses: ./.github/actions/teardown
11371074

11381075
PublishResults:
1139-
needs: [CITests,CITestsWithInfinispan,CITestsZosmfRsu2012,CITestsWithRedis,CITestsInternalPort]
1076+
needs: [CITests,CITestsWithInfinispan,CITestsZosmfRsu2012,CITestsWithRedisWithoutSslVerification,CITestsInternalPort]
11401077
runs-on: ubuntu-latest
11411078
timeout-minutes: 15
11421079

@@ -1163,15 +1100,15 @@ jobs:
11631100
path: containercitestszosmfrsu2012
11641101
- uses: actions/download-artifact@v3
11651102
with:
1166-
name: ContainerCITestsWithRedis-${{ env.JOB_ID }}
1167-
path: containercitestswithredis
1103+
name: ContainerCITestsWithRedisWithoutSslVerification-${{ env.JOB_ID }}
1104+
path: containercitestswithrediswithoutsslverification
11681105
- uses: actions/download-artifact@v3
11691106
with:
11701107
name: ContainerCITestsInternalPort-${{ env.JOB_ID }}
11711108
path: containercitestsinternalport
11721109
- name: Code coverage and publish results
11731110
run: >
1174-
./gradlew --info coverage sonarqube -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,containercitestswithredis/results,containercitestsinternalport/results"
1111+
./gradlew --info coverage sonarqube -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,containercitestswithrediswithoutsslverification/results,containercitestsinternalport/results"
11751112
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_TOKEN
11761113
-Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
11771114
env:

caching-service/src/main/resources/application.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ caching:
1010
keyStorePassword: ${server.ssl.keyStorePassword}
1111
trustStore: ${server.ssl.trustStore}
1212
trustStorePassword: ${server.ssl.trustStorePassword}
13-
sentinel:
14-
masterInstance: redismaster
15-
nodes:
16-
- sentinelpassword@localhost:26379
17-
- sentinelpassword@localhost:26380
18-
- sentinelpassword@localhost:26381
1913
infinispan:
2014
initialHosts: localhost[7098]
2115
persistence:

docker/redis/docker-compose-replica-tls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
ports:
88
- "6379:6379"
99
volumes:
10-
- ../keystore:/usr/local/etc/keystore
10+
- ../../keystore:/usr/local/etc/keystore
1111
- ./config:/usr/local/etc/redis/
1212

1313
redis-replica:
@@ -17,7 +17,7 @@ services:
1717
ports:
1818
- "6380:6380"
1919
volumes:
20-
- ../keystore:/usr/local/etc/keystore
20+
- ../../keystore:/usr/local/etc/keystore
2121
- ./config:/usr/local/etc/redis/
2222
links:
2323
- redis-master

0 commit comments

Comments
 (0)