test: skip unwritable dir test when running as root
Docker self-hosted runners run as root, which can write anywhere. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cabaa0cc49
commit
23bf7835af
1 changed files with 3 additions and 0 deletions
|
|
@ -304,6 +304,9 @@ func TestConfig_SetProjectDir_Good(t *testing.T) {
|
|||
|
||||
func TestWriteConfig_Bad(t *testing.T) {
|
||||
t.Run("returns error for unwritable directory", func(t *testing.T) {
|
||||
if os.Geteuid() == 0 {
|
||||
t.Skip("root can write to any directory")
|
||||
}
|
||||
dir := t.TempDir()
|
||||
|
||||
// Create .core directory and make it unwritable
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue