Skip to content

Commit

Permalink
feat(tests): replace privileged mode with --cap-add IPC_LOCK for TB (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sublimator authored Oct 24, 2022
1 parent e2af7c2 commit cd08cd1
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 99 deletions.
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"pg": "^8.6.0",
"pino": "^8.4.2",
"pino-pretty": "^9.0.1",
"testcontainers": "^8.12.0",
"testcontainers": "^8.16.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = async (globalConfig) => {
)
.withExposedPorts(TIGERBEETLE_PORT)
.withBindMount(tigerbeetleDir, TIGERBEETLE_DIR)
.withPrivilegedMode()
.withAddedCapabilities('IPC_LOCK')
.withCmd([
'init',
'--cluster=' + TIGERBEETLE_CLUSTER_ID,
Expand All @@ -103,7 +103,7 @@ module.exports = async (globalConfig) => {
'ghcr.io/coilhq/tigerbeetle:dj-request-dirty-prepare@sha256:c312832a460e7374bcbd4bd4a5ae79b8762f73df6363c9c8106c76d864e21303'
)
.withExposedPorts(TIGERBEETLE_PORT)
.withPrivilegedMode()
.withAddedCapabilities('IPC_LOCK')
.withBindMount(tigerbeetleDir, TIGERBEETLE_DIR)
.withCmd([
'start',
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"openapi-types": "^12.0.0",
"react": "~18.2.0",
"rosie": "^2.1.0",
"testcontainers": "^8.12.0",
"testcontainers": "^8.16.0",
"tmp": "^0.2.1",
"typescript": "^4.2.4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/tests/tigerbeetle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function startTigerbeetleContainer(
)
.withExposedPorts(TIGERBEETLE_PORT)
.withBindMount(tigerbeetleDir, TIGERBEETLE_DIR)
.withPrivilegedMode()
.withAddedCapabilities('IPC_LOCK')
.withCmd([
'init',
'--cluster=' + clusterId,
Expand All @@ -35,7 +35,7 @@ export async function startTigerbeetleContainer(
)
.withExposedPorts(TIGERBEETLE_PORT)
.withBindMount(tigerbeetleDir, TIGERBEETLE_DIR)
.withPrivilegedMode()
.withAddedCapabilities('IPC_LOCK')
.withCmd([
'start',
'--cluster=' + clusterId,
Expand Down
Loading

0 comments on commit cd08cd1

Please sign in to comment.