Skip to content

Commit

Permalink
chore: Fix redis cache plugin tests (#3186)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley authored Nov 5, 2024
1 parent e0f2118 commit 0cd0ef2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ jobs:
ports:
- 9200
options: --health-cmd="curl --silent --fail localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: bitnami/redis:7.4.1
env:
ALLOW_EMPTY_PASSWORD: yes
ports:
- 6379
strategy:
fail-fast: false
matrix:
Expand All @@ -121,5 +127,6 @@ jobs:
E2E_MARIADB_PORT: ${{ job.services.mariadb.ports['3306'] }}
E2E_POSTGRES_PORT: ${{ job.services.postgres.ports['5432'] }}
E2E_ELASTIC_PORT: ${{ job.services.elastic.ports['9200'] }}
E2E_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
DB: ${{ matrix.db }}
run: npm run e2e
4 changes: 1 addition & 3 deletions packages/core/e2e/cache-service-redis.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { CacheService, mergeConfig, RedisCachePlugin } from '@vendure/core';
import { createTestEnvironment } from '@vendure/testing';
import path from 'path';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { afterAll, beforeAll, describe, it } from 'vitest';

import { initialData } from '../../../e2e-common/e2e-initial-data';
import { TEST_SETUP_TIMEOUT_MS, testConfig } from '../../../e2e-common/test-config';

import {
deletesAKey,
evictsTheOldestKeyWhenCacheIsFull,
getReturnsUndefinedForNonExistentKey,
invalidatesALargeNumberOfKeysByTag,
invalidatesByMultipleTags,
invalidatesBySingleTag,
invalidatesManyByMultipleTags,
setsAKey,
setsAKeyWithTtl,
setsArrayOfObjects,
setsArrayValue,
setsObjectValue,
Expand Down

0 comments on commit 0cd0ef2

Please sign in to comment.