forked from mtusi2026/mtusi2026lab7
Prepare verified laboratory 7 implementation and evidence
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { run, requireThat, safeFailure } from "./runtime";
|
||||
import { images } from "./topology";
|
||||
try {
|
||||
const source = await run([
|
||||
"docker",
|
||||
"run",
|
||||
"--pull=never",
|
||||
"--rm",
|
||||
"--entrypoint",
|
||||
"sh",
|
||||
images.s3,
|
||||
"-c",
|
||||
"command -v rustfs; rustfs --help",
|
||||
]);
|
||||
const combined = source.out + source.err;
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
service: "RustFS",
|
||||
binary: source.out.split("\n")[0],
|
||||
address_flag: combined.includes("--address"),
|
||||
console_enable_flag: combined.includes("--console-enable"),
|
||||
environment_names: [
|
||||
...new Set(combined.match(/\bRUSTFS_[A-Z_]+\b/g) ?? []),
|
||||
],
|
||||
stdout_length: source.out.length,
|
||||
stderr_length: source.err.length,
|
||||
}),
|
||||
);
|
||||
} catch (e) {
|
||||
safeFailure(e);
|
||||
}
|
||||
Reference in New Issue
Block a user