20735: Override git directory ownership check.
authorTom Clegg <tom@curii.com>
Thu, 10 Aug 2023 21:18:27 +0000 (17:18 -0400)
committerTom Clegg <tom@curii.com>
Tue, 15 Aug 2023 18:04:54 +0000 (14:04 -0400)
Without this, `git diff --shortstat` returns an error "warning: Not a
git repository."

The real problem, as reported by `git status`, is "fatal: detected
dubious ownership in repository at '/path'".

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/install/deps_test.go

index 5b3f9d350f26daf5a8735e8fc08fd7ec3e936c50..08187ce9db444e00aded1c2546cb9bc03b4f3d63 100644 (file)
@@ -33,7 +33,9 @@ docker run -i --rm --workdir /arvados \
        --env http_proxy \
        --env https_proxy \
        debian:11 \
-       bash -c "/arvados-server install -type test && /arvados-server boot -type test -config doc/examples/config/zzzzz.yml -own-temporary-database -shutdown -timeout 9m"
+       bash -c "/arvados-server install -type test &&
+           git config --global --add safe.directory /arvados &&
+           /arvados-server boot -type test -config doc/examples/config/zzzzz.yml -own-temporary-database -shutdown -timeout 9m"
 `
        c.Check((&installCommand{}).runBash(script, os.Stdout, os.Stderr), check.IsNil)
 }