forked from mtusi2026/mtusi2026lab3
Prepare verified laboratory 3 implementation and evidence
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
1 | import {resolve} from 'node:path';
|
||||
2 | const root=resolve(import.meta.dir,'..');
|
||||
3 | const p=Bun.spawn([resolve(root,'scripts/kube.sh'),'exec','-i','deployment/postgres','--','psql','-X','-qAt','-U','messenger','-d','messenger','-v','ON_ERROR_STOP=1'],{cwd:root,stdin:'pipe',stdout:'pipe',stderr:'pipe'});
|
||||
4 | p.stdin.write("SELECT 'stdin-boundary-ok';\n");p.stdin.end();
|
||||
5 | const [out,err]=await Promise.all([new Response(p.stdout).text(),new Response(p.stderr).text()]);
|
||||
6 | if(await p.exited!==0||out.trim()!=='stdin-boundary-ok')throw new Error('Kubernetes wrapper did not execute the stdin query');
|
||||
^
|
||||
error: Kubernetes wrapper did not execute the stdin query
|
||||
at /mnt/data/home/bench-saves/vp-k3s-nHACGCQi/lab3/student-tests/kube-stdin.ts:6:67
|
||||
|
||||
Bun v1.4.4 (Linux x64)
|
||||
Reference in New Issue
Block a user