Wire zappier-edge into the live stack and add billing department APIs
Some checks are pending
offline / test (push) Waiting to run
Some checks are pending
offline / test (push) Waiting to run
Fleet now spawns the real zappier and middleware processes. Metered timestamp/receipt/hash calls proxy to middleware when ZAPPIER_UPSTREAM is set. CS credits, sales per-customer pricing, and QuickBooks export are separate repos plugged into zappier-edge admin.
This commit is contained in:
parent
65bfa544b2
commit
a1a5b957fd
44 changed files with 822 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it, after } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { loadFleet, listServices, FLEET_ROOT } from '../src/load.js';
|
||||
import { Supervisor } from '../src/supervisor.js';
|
||||
import { Supervisor, spawnLocal } from '../src/supervisor.js';
|
||||
import { Monitor } from '../src/monitor.js';
|
||||
|
||||
function treeOnly(healthBase) {
|
||||
|
|
@ -32,6 +32,20 @@ describe('verae-fleet', () => {
|
|||
for (const s of supervisors) await s.stopAll();
|
||||
});
|
||||
|
||||
it('spawnLocal runs spawn.command instead of the stub worker', async () => {
|
||||
const child = spawnLocal(
|
||||
FLEET_ROOT,
|
||||
{ spawn: { command: process.execPath, args: ['-e', 'process.stdout.write("ok"); process.exit(0)'] } },
|
||||
{ ...process.env },
|
||||
9,
|
||||
);
|
||||
const out = [];
|
||||
child.stdout.on('data', (c) => out.push(c));
|
||||
const code = await new Promise((resolve) => child.on('exit', resolve));
|
||||
assert.equal(code, 0);
|
||||
assert.equal(Buffer.concat(out).toString(), 'ok');
|
||||
});
|
||||
|
||||
it('lists every service with a config file and central replica spec', () => {
|
||||
const loaded = loadFleet();
|
||||
const rows = listServices(loaded);
|
||||
|
|
@ -39,6 +53,9 @@ describe('verae-fleet', () => {
|
|||
for (const need of [
|
||||
'nats',
|
||||
'zappier-edge',
|
||||
'customer-service',
|
||||
'sales-pricing',
|
||||
'accounting-export',
|
||||
'middleware-http',
|
||||
'job-poller',
|
||||
'webhook-deliver',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue