-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore docker on mac and fix prisma test
- Loading branch information
1 parent
0b38f4f
commit ff06b28
Showing
16 changed files
with
363 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import {assert} from '@augment-vir/assert'; | ||
import {describe, it} from '@augment-vir/test'; | ||
import {currentOperatingSystem, OperatingSystem} from './operating-system.js'; | ||
import {currentOperatingSystem, isOperatingSystem, OperatingSystem} from './operating-system.js'; | ||
|
||
describe('currentOperatingSystem', () => { | ||
it('has a valid value', () => { | ||
assert.isEnumValue(currentOperatingSystem, OperatingSystem); | ||
}); | ||
}); | ||
|
||
describe(isOperatingSystem.name, () => { | ||
it('returns a boolean', () => { | ||
assert.isBoolean(isOperatingSystem(OperatingSystem.Mac)); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 18 additions & 14 deletions
32
packages/node/src/docker/containers/container-info.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import {assert} from '@augment-vir/assert'; | ||
import {describe, it} from '@augment-vir/test'; | ||
import {docker} from '../../augments/docker.js'; | ||
import {dockerTest} from '../run-docker-test.mock.js'; | ||
import {runMockLongLivingContainer} from './run-container.mock.js'; | ||
|
||
const testContainerName = `test-${docker.container.getInfo.name}`; | ||
|
||
describe(docker.container.getInfo.name, () => { | ||
it('gets info', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const info = await docker.container.getInfo(testContainerName); | ||
assert.isObject(info); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
it('returns nothing if container is not running', async () => { | ||
await docker.container.kill(testContainerName); | ||
const info = await docker.container.getInfo(testContainerName); | ||
assert.isUndefined(info); | ||
}); | ||
}); | ||
describe( | ||
docker.container.getInfo.name, | ||
dockerTest(() => { | ||
it('gets info', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const info = await docker.container.getInfo(testContainerName); | ||
assert.isObject(info); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
it('returns nothing if container is not running', async () => { | ||
await docker.container.kill(testContainerName); | ||
const info = await docker.container.getInfo(testContainerName); | ||
assert.isUndefined(info); | ||
}); | ||
}), | ||
); |
46 changes: 25 additions & 21 deletions
46
packages/node/src/docker/containers/container-status.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
import {assert} from '@augment-vir/assert'; | ||
import {describe, it} from '@augment-vir/test'; | ||
import {docker} from '../../augments/docker.js'; | ||
import {dockerTest} from '../run-docker-test.mock.js'; | ||
import {runMockLongLivingContainer} from './run-container.mock.js'; | ||
|
||
const testContainerName = `test-${docker.container.getLogs.name}`; | ||
|
||
describe(docker.container.getLogs.name, () => { | ||
it('gets all logs', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const logs = await docker.container.getLogs(testContainerName); | ||
assert.strictEquals(logs, ''); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
it('gets the last log', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const logs = await docker.container.getLogs(testContainerName, 1); | ||
assert.strictEquals(logs, ''); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
it('errors if container does not exist', async () => { | ||
await docker.container.kill(testContainerName); | ||
await assert.throws(docker.container.getLogs(testContainerName, 1), { | ||
matchMessage: 'No such container', | ||
describe( | ||
docker.container.getLogs.name, | ||
dockerTest(() => { | ||
it('gets all logs', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const logs = await docker.container.getLogs(testContainerName); | ||
assert.strictEquals(logs, ''); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
}); | ||
}); | ||
it('gets the last log', async () => { | ||
await docker.container.kill(testContainerName); | ||
await runMockLongLivingContainer(testContainerName); | ||
const logs = await docker.container.getLogs(testContainerName, 1); | ||
assert.strictEquals(logs, ''); | ||
await docker.container.kill(testContainerName); | ||
}); | ||
it('errors if container does not exist', async () => { | ||
await docker.container.kill(testContainerName); | ||
await assert.throws(docker.container.getLogs(testContainerName, 1), { | ||
matchMessage: 'No such container', | ||
}); | ||
}); | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.