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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: cargo fmt --check --all

- name: Run tests
run: cargo test
run: ./run-tests.sh
21 changes: 21 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -e

(cd sdk/simulator && ./build.sh)

pushd sdk/simulator
./dstack-simulator &
SIMULATOR_PID=$!
echo "Simulator process (PID: $SIMULATOR_PID) started."
popd

export DSTACK_SIMULATOR_ENDPOINT=$(realpath sdk/simulator/dstack.sock)

echo "DSTACK_SIMULATOR_ENDPOINT: $DSTACK_SIMULATOR_ENDPOINT"

# Run the tests
cargo test

# Kill the simulator after tests finish
kill $SIMULATOR_PID
echo "Simulator process (PID: $SIMULATOR_PID) terminated."
7 changes: 4 additions & 3 deletions sdk/rust/src/dstack_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ pub struct EventLog {

#[derive(bon::Builder, Serialize)]
pub struct TlsKeyConfig {
#[builder(into)]
pub subject: Option<String>,
pub alt_names: Option<Vec<String>>,
#[builder(into, default = String::new())]
pub subject: String,
#[builder(default = Vec::new())]
pub alt_names: Vec<String>,
#[builder(default = false)]
pub usage_ra_tls: bool,
#[builder(default = true)]
Expand Down