From 5cf9fe05271e345832056a9f3386379d85bec8c1 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 21 Jun 2024 20:10:48 +0000 Subject: [PATCH] test: add unit tests for whiteouts Signed-off-by: Ramkumar Chinchani --- go.mod | 2 +- go.sum | 4 +-- test/whiteout.bats | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 test/whiteout.bats diff --git a/go.mod b/go.mod index 354a1307..31a22119 100644 --- a/go.mod +++ b/go.mod @@ -284,6 +284,6 @@ require ( ) replace ( - github.com/opencontainers/umoci => github.com/rchincha/umoci v0.0.0-20240624222738-f537fd2733f9 + github.com/opencontainers/umoci => github.com/rchincha/umoci v0.0.0-20240626041051-8a70aa6ab09f stackerbuild.io/stacker-bom => github.com/project-stacker/stacker-bom v0.0.0-20240509203427-4d685e046780 ) diff --git a/go.sum b/go.sum index bda24529..ce19ba19 100644 --- a/go.sum +++ b/go.sum @@ -816,8 +816,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rchincha/umoci v0.0.0-20240624222738-f537fd2733f9 h1:zVLb+d07fy3soRSqjhreRNkfQjYqoEF4bNnoVLMC9DE= -github.com/rchincha/umoci v0.0.0-20240624222738-f537fd2733f9/go.mod h1:XUXUpCpA/Y8aJWezK1i8o4WDR0Y/vhMcWg+FUNQkKMQ= +github.com/rchincha/umoci v0.0.0-20240626041051-8a70aa6ab09f h1:kb6KNqJtAu7bF//luRE42U3ySX79bn0iO+5FVXuEnLo= +github.com/rchincha/umoci v0.0.0-20240626041051-8a70aa6ab09f/go.mod h1:XUXUpCpA/Y8aJWezK1i8o4WDR0Y/vhMcWg+FUNQkKMQ= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/test/whiteout.bats b/test/whiteout.bats new file mode 100644 index 00000000..007cda1f --- /dev/null +++ b/test/whiteout.bats @@ -0,0 +1,73 @@ +load helpers + +function setup() { + stacker_setup +} + +function teardown() { + cleanup +} + +@test "test not adding extraneous whiteouts" { + cat > stacker.yaml < stacker.yaml <