1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 14:55:35 +00:00
krust/tests/testdata/resolve_dedup.txt
Jason Hall 1ed99cbe07 implement resolve and apply
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 14:46:18 -04:00

38 lines
768 B
Text

# Test that multiple references to the same path are deduplicated
-- Cargo.toml --
[package]
name = "test-app"
version = "0.1.0"
edition = "2021"
[dependencies]
-- src/main.rs --
fn main() {
println!("Hello!");
}
-- deployment.yaml --
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: app1
image: krust://.
- name: app2
image: krust://.
initContainers:
- name: init
image: krust://.
# Should find only 1 unique reference and build once
env KRUST_REPO=ttl.sh/test
exec ./krust resolve -f deployment.yaml
stdout 'ttl.sh/test/test-app@sha256:'
stderr 'Found 1 unique krust:// reference'
! stderr 'Found 3'
# All three references should be replaced with same digest
stdout -count=3 'ttl.sh/test/test-app@sha256:'