Skip to content

Commit 730fc88

Browse files
committed
Fixes and debugging
1 parent 98e21ff commit 730fc88

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

integrationTests/security/crl-verification.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525

2626
const HTTPS_PORT = 9927;
2727
const FIXTURE_PATH = join(import.meta.dirname, 'fixture');
28-
const isBun = typeof globalThis.Bun !== 'undefined';
28+
const testsBun = process.env.HARPER_RUNTIME === 'bun';
2929

3030
// The last test stops the CRL server to verify caching, so tests must run sequentially.
3131
// Tests CANNOT run concurrently because the caching test stops the server that earlier tests need.
@@ -35,7 +35,7 @@ suite(
3535
(ctx: ContextWithHarper) => {
3636
let crlServer: CrlServerContext | null = null;
3737
let certsPath: string; // Track separately for cleanup even if server is stopped
38-
if (isBun) return; // no Bun testing for now
38+
if (testsBun) return; // no Bun testing for now
3939
before(async () => {
4040
// 1. Create temp directory for certificates
4141
certsPath = await mkdtemp(join(tmpdir(), 'harper-crl-test-'));

integrationTests/security/ocsp-verification.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { generateOcspCertificates } from '../utils/security/ocsp/generate-test-c
2525

2626
const HTTPS_PORT = 9927;
2727
const FIXTURE_PATH = join(import.meta.dirname, 'fixture');
28-
const isBun = typeof globalThis.Bun !== 'undefined';
28+
const testsBun = process.env.HARPER_RUNTIME === 'bun';
2929

3030
// The last test stops the OCSP responder to verify caching, so tests must run sequentially.
3131
// Tests CANNOT run concurrently because the caching test stops the responder that earlier tests need.
@@ -35,7 +35,7 @@ suite(
3535
(ctx: ContextWithHarper) => {
3636
let ocspResponder: OcspResponderContext | null = null;
3737
let certsPath: string; // Track separately for cleanup even if responder is stopped
38-
if (isBun) return; // no Bun testing for now
38+
if (testsBun) return; // no Bun testing for now
3939

4040
before(async () => {
4141
// 1. Create temp directory for certificates

integrationTests/upgrade/4.x-upgrade.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ suite('Start 4.x server and test upgrade', (ctx: ContextWithHarper) => {
2727
harperBinPath: join(legacyPath, 'bin', 'harperdb.js'),
2828
harperRuntime: 'node', // legacy harperdb.js is node only
2929
});
30+
console.log('Started legacy harper on node', ctx.harper);
3031
await sendOperation(ctx.harper, {
3132
operation: 'create_table',
3233
table: 'test',
@@ -58,7 +59,10 @@ suite('Start 4.x server and test upgrade', (ctx: ContextWithHarper) => {
5859

5960
test('upgrade and start', async () => {
6061
await killHarper(ctx); // kill old 4.x harper
62+
console.log('Killed legacy harper on node', ctx.harper);
63+
6164
await startHarper(ctx, { config: {}, env: {} }); // start on v5
65+
console.log('Starting new harper on node', ctx.harper);
6266
let response = await sendOperation(ctx.harper, {
6367
operation: 'search_by_conditions',
6468
table: 'test',

integrationTests/utils/harperLifecycle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ function runHarperCommand({
145145
harperRuntime === 'bun'
146146
? [harperScript, ...args]
147147
: ['--trace-warnings', '--force-node-api-uncaught-exceptions-policy=true', harperScript, ...args];
148+
console.log('running', harperRuntime, runtimeArgs);
148149
const proc = spawn(harperRuntime, runtimeArgs, {
149150
env: { ...process.env, ...env },
150151
});

0 commit comments

Comments
 (0)