X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/64d66bca9b9816d0ff025fbee91d04b1d7211f13..f6e063ed8afcdd868fe1eec2fa86ac8f0f61e18b:/services/crunch-run/git_mount_test.go diff --git a/services/crunch-run/git_mount_test.go b/services/crunch-run/git_mount_test.go index 0161abbc55..4dc95bc3df 100644 --- a/services/crunch-run/git_mount_test.go +++ b/services/crunch-run/git_mount_test.go @@ -67,6 +67,12 @@ func (s *GitMountSuite) TestextractTree(c *check.C) { // Ensure there's no extra stuff like a ".git" dir s.checkTmpdirContents(c, []string{"dir1"}) + + // Ensure tmpdir is world-readable and world-executable so the + // UID inside the container can use it. + fi, err = os.Stat(s.tmpdir) + c.Check(err, check.IsNil) + c.Check(fi.Mode()&os.ModePerm, check.Equals, os.FileMode(0755)) } // Commit 5ebfab0 is not the tip of any branch or tag, but is @@ -167,6 +173,15 @@ func (s *GitMountSuite) TestInvalid(c *check.C) { }, matcher: ".*UUID.*", }, + { + gm: gitMount{ + Path: "/", + UUID: arvadostest.Repository2UUID, + Commit: "5ebfab0522851df01fec11ec55a6d0f4877b542e", + Writable: true, + }, + matcher: ".*writable.*", + }, } { err := trial.gm.extractTree(&ArvTestClient{}, s.tmpdir, arvadostest.ActiveToken) c.Check(err, check.NotNil)