Skip to content
Unverified Commit 079790e3 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Fix `dubious ownership` error in runtime-versioner unit tests (#3668)

## Motivation and Context
In a Docker container we use in our release pipeline, we've got the
following error in `runtime-versioner` unit tests
```
     Running tests/test_audit.rs (src/smithy-rs/tools/target/debug/deps/test_audit-9e2b5cd76b506229)

running 6 tests
Cloning into 'test_base'...
Cloning into 'test_base'...
Cloning into 'test_base'...
Cloning into 'test_base'...
Cloning into 'test_base'...
Cloning into 'test_base'...
fatal: detected dubious ownership in repository at '/tmp/.tmpjwZMOW/test_base.git'
To add an exception for this directory, call:

    git config --global --add safe.directory /tmp/.tmpjwZMOW/test_base.git
fatal: detected dubious ownership in repository at '/tmp/.tmp9Aw4By/test_base.git'
```

`runtime-versioner` unit tests [unpacks a tar file for a fake git
repo](https://github.com/smithy-lang/smithy-rs/blob/cd0f0bac513a1f74e1d0fa232d753c0ac37d8348/tools/ci-build/runtime-versioner/test-common/src/lib.rs#L31-L39),
but for some reason, the resulting file had a strange owner:group
assigned to it
```
drwxr-xr-x 6  504 games  4096 Dec 20 00:46 test_base.git
``` 
The tests have been passing but they started breaking yesterday for some
reason. To side step this issue, this PR will ensure the resulting file
has the correct current user.

## Testing
Verified running unit tests in a container with the fix and confirmed it
passed.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 2cca202a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment