Merge branch 'io' into merge-upstream

This commit is contained in:
riku6460
2023-11-09 17:43:42 +09:00
59 changed files with 534 additions and 410 deletions

View File

@@ -1,13 +1,13 @@
version: "3"
services:
redistest:
image: redis:7
keydbtest:
image: eqalpha/keydb:latest
ports:
- "127.0.0.1:56312:6379"
dbtest:
image: postgres:13
image: postgres:15
ports:
- "127.0.0.1:54312:5432"
environment:

View File

@@ -21,9 +21,10 @@ import type { TestingModule } from '@nestjs/testing';
function mockRedis() {
const hash = {};
const set = jest.fn((key, value) => {
const ret = hash[key];
// このテストで呼び出すSETにはNXオプションが付いてる
if (hash[key]) return null;
hash[key] = value;
return ret;
return 'OK';
});
return set;
}