Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/job_test_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Docker permissions
run: |
sudo chmod 666 /var/run/docker.sock
docker version
- name: Install goose
run: |
wget -qO- https://github.com/pressly/goose/releases/download/v3.20.0/goose_linux_x86_64 > /tmp/goose
chmod +x /tmp/goose
sudo mv /tmp/goose /usr/local/bin/goose
goose --version
- name: Setup Node
uses: ./.github/actions/setup-node
with:
Expand All @@ -21,3 +33,6 @@ jobs:
run: pnpm turbo run test --filter '!api'
env:
CI: 1
TESTCONTAINERS_RYUK_DISABLED: true
DOCKER_HOST: unix:///var/run/docker.sock
TESTCONTAINERS_HOST_OVERRIDE: localhost
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ describe.each([10, 100, 1_000, 10_000])("with %i verifications", (n) => {

const rawCounts = await ch.querier.query({
query: `
SELECT
outcome,
COUNT(*) as count
SELECT
outcome,
COUNT(*) as count
FROM verifications.raw_key_verifications_v1
WHERE
workspace_id = '${workspaceId}' AND
key_space_id = '${keySpaceId}' AND
WHERE
workspace_id = '${workspaceId}' AND
key_space_id = '${keySpaceId}' AND
key_id = '${keyId}'
GROUP BY outcome
`,
Expand All @@ -116,13 +116,13 @@ describe.each([10, 100, 1_000, 10_000])("with %i verifications", (n) => {
async function pollForAggregateData(maxAttempts = 15, intervalMs = 1000) {
for (let i = 0; i < maxAttempts; i++) {
const directQuery = `
SELECT
outcome,
SUM(count) as total
FROM verifications.key_verifications_per_day_v3
WHERE
workspace_id = '${workspaceId}' AND
key_space_id = '${keySpaceId}' AND
SELECT
outcome,
SUM(count) as total
FROM verifications.key_verifications_per_day_v3
WHERE
workspace_id = '${workspaceId}' AND
key_space_id = '${keySpaceId}' AND
key_id = '${keyId}'
GROUP BY outcome
`;
Expand Down Expand Up @@ -156,6 +156,7 @@ describe.each([10, 100, 1_000, 10_000])("with %i verifications", (n) => {
keyIds: null,
names: null,
outcomes: null,
tags: null,
});

if (daily && daily.length > 0) {
Expand Down