Skip to content

Commit

Permalink
update http tests to run benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Oct 29, 2024
1 parent e51ca51 commit 4843f21
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 43 deletions.
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/apollo_server/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('apollo_server');
const canisterName = 'apollo_server';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/audio_and_video/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('backend');
const canisterName = 'backend';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/autoreload/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('autoreload');
const canisterName = 'autoreload';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/bitcoinjs_lib/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('bitcoinjs_lib');
const canisterName = 'bitcoinjs_lib';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/bitcore_lib/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('bitcore_lib');
const canisterName = 'bitcore_lib';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/ethers/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('ethers');
const canisterName = 'ethers';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/ethers_base/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('server');
const canisterName = 'server';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/express/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('express');
const canisterName = 'express';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
4 changes: 3 additions & 1 deletion tests/end_to_end/http_server/fetch_ic/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

runTests(getTests('backend'));
const canisterName = 'backend';

runTests(getTests(canisterName), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/file_protocol/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('backend');
const canisterName = 'backend';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/fs/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('fs');
const canisterName = 'fs';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/http_outcall_fetch/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('server');
const canisterName = 'server';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/ic_evm_rpc/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('server');
const canisterName = 'server';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
4 changes: 3 additions & 1 deletion tests/end_to_end/http_server/internet_identity/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

runTests(getTests('backend'));
const canisterName = 'backend';

runTests(getTests(canisterName), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/large_files/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('backend');
const canisterName = 'backend';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/nest/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('api');
const canisterName = 'api';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
6 changes: 4 additions & 2 deletions tests/end_to_end/http_server/open_value_sharing/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { agent, consumerActor } from './consumer_actor';
import { createActor as createWalletActor } from './dfx_generated/wallet';
import { getTests } from './tests';

const walletActor = createWalletActor(getCanisterId('wallet'), {
const canisterName = 'backend';
const canisterId = getCanisterId(canisterName);
const walletActor = createWalletActor(canisterId, {
agentOptions: {
host: 'http://127.0.0.1:8000'
}
});

runTests(getTests(consumerActor, walletActor, agent));
runTests(getTests(consumerActor, walletActor, agent), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/sqlite/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('sqlite');
const canisterName = 'sqlite';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
7 changes: 4 additions & 3 deletions tests/end_to_end/http_server/sqlite_drizzle/test/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getCanisterId } from 'azle/dfx';
import { runTests } from 'azle/test';
import { getTests } from 'sqlite_example/test/tests';
import { getTests } from 'sqlite_drizzle/test/tests';

const canisterId = getCanisterId('sqlite_drizzle');
const canisterName = 'sqlite_drizzle';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/sqlite_typeorm/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getCanisterId } from 'azle/dfx';
import { runTests } from 'azle/test';
import { getTests } from 'sqlite_example/test/tests';

const canisterId = getCanisterId('sqlite_typeorm');
const canisterName = 'sqlite_typeorm';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/tfjs/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('api');
const canisterName = 'api';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);
5 changes: 3 additions & 2 deletions tests/end_to_end/http_server/web_assembly/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { runTests } from 'azle/test';

import { getTests } from './tests';

const canisterId = getCanisterId('web_assembly');
const canisterName = 'web_assembly';
const canisterId = getCanisterId(canisterName);

runTests(getTests(canisterId));
runTests(getTests(canisterId), canisterName);

0 comments on commit 4843f21

Please sign in to comment.