1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 06:45:32 +00:00
krust/tests/e2e/basic_test.rs
Jason Hall 5e89023925
Initial commit: krust - container image build tool for Rust
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>
2025-06-07 20:46:08 -04:00

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());
}