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
3 changes: 3 additions & 0 deletions crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# egress-proxy switch into a disposable copy of this file. Workload command and
# cwd are sandbox-scoped and passed separately through --driver-config-json.

[openshell]
version = 2

[openshell.drivers.mxc]
# Path to wxc-exec.exe on the box (patched by the run script; default is the
# location observed on the MXC test boxes).
Expand Down
3 changes: 3 additions & 0 deletions crates/openshell-driver-mxc/examples/mxc-ws-gateway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
# openshell-supervisor-relay kills the server directly and exits
# driver also kills wxc-exec as a backstop regardless

[openshell]
version = 2

[openshell.drivers.mxc]
# Path to wxc-exec.exe. Patched at runtime by run-ws-agent-test.ps1.
# Leave commented for mock-mode smoke tests (pass -Mock to the script).
Expand Down
18 changes: 18 additions & 0 deletions crates/openshell-driver-mxc/tests/demo_examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ fn read_example(name: &str) -> String {
.unwrap_or_else(|error| panic!("failed to read {}: {error}", path.display()))
}

#[test]
fn shipped_audit_and_websocket_configs_use_current_schema() {
for name in ["mxc-ocsf-audit.toml", "mxc-ws-gateway.toml"] {
let source = read_example(name);
let parsed: Value = toml::from_str(&source)
.unwrap_or_else(|error| panic!("failed to parse {name}: {error}"));
let openshell = parsed
.get("openshell")
.and_then(Value::as_table)
.unwrap_or_else(|| panic!("{name} is missing [openshell]"));
assert_eq!(
openshell.get("version").and_then(Value::as_integer),
Some(2),
"{name} must use schema version 2"
);
}
}

#[test]
fn shipped_inference_configs_declare_required_mxc_settings() {
for name in ["mxc-ollama.toml", "mxc-inference.toml"] {
Expand Down
Loading