Skip to content

Commit

Permalink
fix(swingset): disable all non-SES tests
Browse files Browse the repository at this point in the history
The scaffolding is still in place, and should be torn down.
  • Loading branch information
warner committed Mar 18, 2020
1 parent ec5be6c commit b481008
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 179 deletions.
16 changes: 2 additions & 14 deletions packages/SwingSet/test/test-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('load empty', async t => {
vats: new Map(),
bootstrapIndexJS: undefined,
};
const controller = await buildVatController(config);
const controller = await buildVatController(config, true);
await controller.run();
t.ok(true);
t.end();
Expand Down Expand Up @@ -64,10 +64,6 @@ test('simple call with SES', async t => {
await simpleCall(t, true);
});

test('simple call non-SES', async t => {
await simpleCall(t, false);
});

test('reject module-like sourceIndex', async t => {
const vats = new Map();
// the keys of 'vats' have a 'sourcepath' property which are vat source
Expand All @@ -79,7 +75,7 @@ test('reject module-like sourceIndex', async t => {
// that.
vats.set('vat1', { sourcepath: 'vatsource' });
t.rejects(
async () => buildVatController({ vats }, false),
async () => buildVatController({ vats }, true),
/sourceIndex must be relative/,
);
t.end();
Expand All @@ -101,10 +97,6 @@ test('bootstrap with SES', async t => {
await bootstrap(t, true);
});

test('bootstrap without SES', async t => {
await bootstrap(t, false);
});

async function bootstrapExport(t, withSES) {
const config = await loadBasedir(
path.resolve(__dirname, 'basedir-controller-3'),
Expand Down Expand Up @@ -268,7 +260,3 @@ async function bootstrapExport(t, withSES) {
test('bootstrap export with SES', async t => {
await bootstrapExport(t, true);
});

test('bootstrap export without SES', async t => {
await bootstrapExport(t, false);
});
6 changes: 0 additions & 6 deletions packages/SwingSet/test/test-demos-comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ test('run encouragementBotComms Demo with SES', async t => {
t.end();
});

test('run encouragementBotComms Demo without SES', async t => {
const dump = await main(false, 'demo/encouragementBotComms');
t.deepEquals(dump.log, encouragementBotCommsGolden);
t.end();
});

test('run encouragementBotCommsWavyDot Demo with SES', async t => {
const dump = await main(true, 'demo/encouragementBotCommsWavyDot', []);
t.deepEquals(dump.log, encouragementBotCommsGolden);
Expand Down
6 changes: 0 additions & 6 deletions packages/SwingSet/test/test-demos.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@ test('run encouragementBot Demo with SES', async t => {
t.deepEquals(dump.log, encouragementBotGolden);
t.end();
});

test('run encouragementBot Demo without SES', async t => {
const dump = await main(false, 'demo/encouragementBot', []);
t.deepEquals(dump.log, encouragementBotGolden);
t.end();
});
48 changes: 0 additions & 48 deletions packages/SwingSet/test/test-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ test('d0 with SES', async t => {
await test0(t, true);
});

test('d0 without SES', async t => {
await test0(t, false);
});

async function test1(t, withSES) {
const sharedArray = [];
const config = {
Expand Down Expand Up @@ -80,10 +76,6 @@ test('d1 with SES', async t => {
await test1(t, true);
});

test('d1 without SES', async t => {
await test1(t, false);
});

async function test2(t, mode, withSES) {
const config = {
vats: new Map(),
Expand Down Expand Up @@ -148,42 +140,22 @@ test('d2.1 with SES', async t => {
await test2(t, '1', true);
});

test('d2.1 without SES', async t => {
await test2(t, '1', false);
});

test('d2.2 with SES', async t => {
await test2(t, '2', true);
});

test('d2.2 without SES', async t => {
await test2(t, '2', false);
});

test('d2.3 with SES', async t => {
await test2(t, '3', true);
});

test('d2.3 without SES', async t => {
await test2(t, '3', false);
});

test('d2.4 with SES', async t => {
await test2(t, '4', true);
});

test('d2.4 without SES', async t => {
await test2(t, '4', false);
});

test('d2.5 with SES', async t => {
await test2(t, '5', true);
});

test('d2.5 without SES', async t => {
await test2(t, '5', false);
});

async function testState(t, withSES) {
const { storage } = initSwingStore();
const config = {
Expand All @@ -210,10 +182,6 @@ test('device state with SES', async t => {
await testState(t, true);
});

test('device state without SES', async t => {
await testState(t, false);
});

async function testMailboxOutbound(t, withSES) {
const s = buildMailboxStateMap();
const mb = buildMailbox(s);
Expand Down Expand Up @@ -250,10 +218,6 @@ async function testMailboxOutbound(t, withSES) {
t.end();
}

test('mailbox outbound without SES', async t => {
await testMailboxOutbound(t, false);
});

test('mailbox outbound with SES', async t => {
await testMailboxOutbound(t, true);
});
Expand Down Expand Up @@ -371,10 +335,6 @@ async function testMailboxInbound(t, withSES) {
t.end();
}

test('mailbox inbound without SES', async t => {
await testMailboxInbound(t, false);
});

test('mailbox inbound with SES', async t => {
await testMailboxInbound(t, true);
});
Expand All @@ -395,10 +355,6 @@ async function testCommandBroadcast(t, withSES) {
t.end();
}

test('command broadcast without SES', async t => {
await testCommandBroadcast(t, false);
});

test('command broadcast with SES', async t => {
await testCommandBroadcast(t, true);
});
Expand Down Expand Up @@ -434,10 +390,6 @@ async function testCommandDeliver(t, withSES) {
t.end();
}

test('command deliver without SES', async t => {
await testCommandDeliver(t, false);
});

test('command deliver with SES', async t => {
await testCommandDeliver(t, true);
});
2 changes: 1 addition & 1 deletion packages/SwingSet/test/test-marshal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function prep() {
vats: new Map(),
bootstrapIndexJS: undefined,
};
const controller = await buildVatController(config, false);
const controller = await buildVatController(config, true);
await controller.run();
}

Expand Down
14 changes: 6 additions & 8 deletions packages/SwingSet/test/test-message-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,31 @@ async function runWithTrace(c) {
}
}

export async function runVatsLocally(t, withSES, name) {
export async function runVatsLocally(t, name) {
console.log(`------ testing pattern (local) -- ${name}`);
const bdir = path.resolve(__dirname, 'basedir-message-patterns');
const config = await loadBasedir(bdir);
config.bootstrapIndexJS = path.join(bdir, 'bootstrap-local.js');
const c = await buildVatController(config, withSES, [name]);
const c = await buildVatController(config, true, [name]);
// await runWithTrace(c);
await c.run();
return c.dump().log;
}

function testLocalPatterns() {
const withSES = false;
const bp = buildPatterns();
for (const name of Array.from(bp.patterns.keys()).sort()) {
const mode = bp.patterns.get(name).local;
modes[mode](`test pattern ${name} locally`, async t => {
const logs = await runVatsLocally(t, withSES, name);
const logs = await runVatsLocally(t, name);
t.deepEqual(logs, bp.expected[name]);
t.end();
});
}
}
testLocalPatterns();

export async function runVatsInComms(t, withSES, enablePipelining, name) {
export async function runVatsInComms(t, enablePipelining, name) {
console.log(`------ testing pattern (comms) -- ${name}`);
const bdir = path.resolve(__dirname, 'basedir-message-patterns');
const config = await loadBasedir(bdir);
Expand All @@ -85,20 +84,19 @@ export async function runVatsInComms(t, withSES, enablePipelining, name) {
config.vats.set('rightvattp', { sourcepath: getVatTPSourcePath() });
const ldSrcPath = require.resolve('../src/devices/loopbox-src');
config.devices = [['loopbox', ldSrcPath, {}]];
const c = await buildVatController(config, withSES, [name]);
const c = await buildVatController(config, true, [name]);
// await runWithTrace(c);
await c.run();
return c.dump().log;
}

function testCommsPatterns() {
const withSES = false;
const enablePipelining = true;
const bp = buildPatterns();
for (const name of Array.from(bp.patterns.keys()).sort()) {
const mode = bp.patterns.get(name).comms;
modes[mode](`test pattern ${name} locally`, async t => {
const logs = await runVatsInComms(t, withSES, enablePipelining, name);
const logs = await runVatsInComms(t, enablePipelining, name);
let expected = bp.expected[name];
if (enablePipelining && name in bp.expected_pipelined) {
expected = bp.expected_pipelined[name];
Expand Down
34 changes: 0 additions & 34 deletions packages/SwingSet/test/test-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ test('flush with SES', async t => {
await testFlush(t, true);
});

test('flush without SES', async t => {
await testFlush(t, false);
});

async function testEThen(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['e-then']);
Expand All @@ -38,10 +34,6 @@ test('E() resolve with SES', async t => {
await testEThen(t, true);
});

test('E() resolve without SES', async t => {
await testEThen(t, false);
});

async function testChain1(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['chain1']);
Expand Down Expand Up @@ -70,10 +62,6 @@ test('E(E(x).foo()).bar() with SES', async t => {
await testChain1(t, true);
});

test('E(E(x).foo()).bar() without SES', async t => {
await testChain1(t, false);
});

async function testChain2(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['chain2']);
Expand All @@ -93,10 +81,6 @@ test('E(Promise.resolve(presence)).foo() with SES', async t => {
await testChain2(t, true);
});

test('E(Promise.resolve(presence)).foo() without SES', async t => {
await testChain2(t, false);
});

async function testLocal1(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['local1']);
Expand All @@ -115,10 +99,6 @@ test('E(local).foo() with SES', async t => {
await testLocal1(t, true);
});

test('E(local).foo() without SES', async t => {
await testLocal1(t, false);
});

async function testLocal2(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['local2']);
Expand All @@ -138,10 +118,6 @@ test('resolve-to-local with SES', async t => {
await testLocal2(t, true);
});

test('resolve-to-local without SES', async t => {
await testLocal2(t, false);
});

async function testSendPromise1(t, withSES) {
const config = await loadBasedir(path.resolve(__dirname, 'basedir-promises'));
const c = await buildVatController(config, withSES, ['send-promise1']);
Expand All @@ -162,10 +138,6 @@ test('send-promise-resolve-to-local with SES', async t => {
await testSendPromise1(t, true);
});

test('send-promise-resolve-to-local without SES', async t => {
await testSendPromise1(t, false);
});

async function testHardenPromise1(t, withSES) {
const config = await loadBasedir(
path.resolve(__dirname, 'basedir-promises-2'),
Expand All @@ -192,9 +164,3 @@ async function testHardenPromise1(t, withSES) {
test('send-harden-promise-1 with SES', async t => {
await testHardenPromise1(t, true);
});

// TODO: if/when we re-enable the infix-bang x!foo(), this test will only run
// under SES, so disable the non-SES version
test('send-harden-promise-1 without SES', async t => {
await testHardenPromise1(t, false);
});
4 changes: 0 additions & 4 deletions packages/SwingSet/test/test-transcript-light.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,3 @@ async function testLoadState(t, withSES) {
test('transcript-light load with SES', async t => {
await testLoadState(t, true);
});

test('transcript-light load without SES', async t => {
await testLoadState(t, false);
});
8 changes: 0 additions & 8 deletions packages/SwingSet/test/test-transcript.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ test('transcript-one save with SES', async t => {
await testSaveState(t, true);
});

test('transcript-one save without SES', async t => {
await testSaveState(t, false);
});

async function testLoadState(t, withSES) {
const config = await loadBasedir(
path.resolve(__dirname, 'basedir-transcript'),
Expand Down Expand Up @@ -86,7 +82,3 @@ async function testLoadState(t, withSES) {
test('transcript-one load with SES', async t => {
await testLoadState(t, true);
});

test('transcript-one load without SES', async t => {
await testLoadState(t, false);
});
10 changes: 0 additions & 10 deletions packages/SwingSet/test/test-vat-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ test('vat can require harden with SES', async t => {
t.end();
});

test('vat can require harden without SES', async t => {
await requireHarden(t, false);
t.end();
});

async function requireEvaluate(t, withSES) {
const config = { bootstrapIndexJS: require.resolve('./vat-imports-1.js') };
const c = await buildVatController(config, withSES, ['evaluate']);
Expand All @@ -29,8 +24,3 @@ test('vat can require evaluate with SES', async t => {
await requireEvaluate(t, true);
t.end();
});

test('vat can require evaluate without SES', async t => {
await requireEvaluate(t, false);
t.end();
});
Loading

0 comments on commit b481008

Please sign in to comment.