diff --git a/test/test_ci_containment.rb b/test/test_ci_containment.rb
index 400766b..b394fdd 100644
--- a/test/test_ci_containment.rb
+++ b/test/test_ci_containment.rb
@@ -222,6 +222,19 @@ module CI
end
end
+ def test_chown_handler
+ Dir.chdir(@tmpdir) do
+ VCR.use_cassette(__method__) do
+ FileUtils.cp_r(Dir.glob("#{data}/*"), Dir.pwd)
+ c = Containment.new(@job_name, image: @image)
+ cmd = %w(usermod -u 5000 jenkins && groupmod -g 5000 jenkins)
+ c.run(Cmd: cmd)
+ assert_equal(5000, File.stat('my_file').uid)
+ assert_equal(5000, File.stat('my_file').gid)
+ end
+ end
+ end
+
def test_ZZZ_binds # Last test always! Changes VCR configuration.
# Container binds were overwritten by Containment at some point, make
# sure the binds we put in are the binds that are passed to docker.