mirror of
https://github.com/imjasonh/krust
synced 2026-07-18 15:06:03 +00:00
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>
This commit is contained in:
commit
5e89023925
23 changed files with 1611 additions and 0 deletions
43
tests/integration_test.rs
Normal file
43
tests/integration_test.rs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
use anyhow::Result;
|
||||
use assert_cmd::Command;
|
||||
use predicates::prelude::*;
|
||||
|
||||
#[test]
|
||||
fn test_version_command() -> Result<()> {
|
||||
let mut cmd = Command::cargo_bin("krust")?;
|
||||
cmd.arg("--version");
|
||||
cmd.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("krust 0.1.0"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_version_subcommand() -> Result<()> {
|
||||
let mut cmd = Command::cargo_bin("krust")?;
|
||||
cmd.arg("version");
|
||||
cmd.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("krust 0.1.0"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_help_command() -> Result<()> {
|
||||
let mut cmd = Command::cargo_bin("krust")?;
|
||||
cmd.arg("--help");
|
||||
cmd.assert().success().stdout(predicate::str::contains(
|
||||
"A container image build tool for Rust applications",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_build_help() -> Result<()> {
|
||||
let mut cmd = Command::cargo_bin("krust")?;
|
||||
cmd.arg("build").arg("--help");
|
||||
cmd.assert().success().stdout(predicate::str::contains(
|
||||
"Build a container image from a Rust application",
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue