mirror of
https://github.com/imjasonh/krust
synced 2026-07-08 06:45:32 +00:00
krust builds container images for Rust applications without Docker: - Builds static binaries using musl libc - Creates minimal OCI container images - Pushes to any OCI-compliant registry - Outputs digest to stdout for composability Inspired by ko.build for Go applications. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
No EOL
645 B
Rust
25 lines
No EOL
645 B
Rust
use std::process::Command;
|
|
|
|
#[test]
|
|
fn test_help_flag() {
|
|
let output = Command::new("cargo")
|
|
.args(&["run", "--", "--version"])
|
|
.output()
|
|
.expect("Failed to execute command");
|
|
|
|
let stdout = String::from_utf8_lossy(&output.stdout);
|
|
assert!(stdout.contains("krust"));
|
|
assert!(output.status.success());
|
|
}
|
|
|
|
#[test]
|
|
fn test_basic_run() {
|
|
let output = Command::new("cargo")
|
|
.arg("run")
|
|
.output()
|
|
.expect("Failed to execute command");
|
|
|
|
let stdout = String::from_utf8_lossy(&output.stdout);
|
|
assert!(stdout.contains("Hello from krust!"));
|
|
assert!(output.status.success());
|
|
} |