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
7 changes: 7 additions & 0 deletions sdk/tests/backlog-picker-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ function run(command: string, cwd: string): string {
return execFileSync('sh', ['-c', command], {
cwd,
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
// Capture stderr instead of letting it through to ours. Several tests here
// assert that a step FAILS, and `execFileSync` otherwise echoes the child's
// stack trace into the suite's output -- so a passing run prints
// `ENOENT ... .relayflow/backlog-picker-entry.json` and looks broken.
// #156 was filed on exactly that appearance. The text is still available on
// the thrown error for a test that wants to assert on it.
env: { ...process.env, RELAYFLOWS_SDK_DIST: join(__dirname, '..', 'dist') },
});
}
Expand Down
3 changes: 2 additions & 1 deletion sdk/tests/work-package-consumer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ describe('the Garden join: picker output feeds the consumer', () => {
const flowPath = join(__dirname, '..', '..', 'testdata', 'backlog-picker.flow.yaml');
const flow = load(readFileSync(flowPath, 'utf8')) as { steps: Array<{ id: string; command: string }> };
const step = (id: string) => flow.steps.find((s) => s.id === id)!.command;
const run = (cmd: string, cwd: string) => execFileSync('sh', ['-c', cmd], { cwd, encoding: 'utf8', env: { ...process.env, RELAYFLOWS_SDK_DIST: join(__dirname, '..', 'dist') }, });
// stdio: stderr captured, not echoed -- see backlog-picker-flow.test.ts.
const run = (cmd: string, cwd: string) => execFileSync('sh', ['-c', cmd], { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, RELAYFLOWS_SDK_DIST: join(__dirname, '..', 'dist') }, });

const dir = mkdtempSync(join(tmpdir(), 'garden-join-'));
try {
Expand Down
Loading