ui: plan 01-27 done #1
@@ -21,6 +21,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package util_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"galaxy/util"
|
"galaxy/util"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -16,6 +17,9 @@ func TestWritable(t *testing.T) {
|
|||||||
assert.NoError(t, err, "directory writable check")
|
assert.NoError(t, err, "directory writable check")
|
||||||
assert.True(t, ok, "directory should be writable")
|
assert.True(t, ok, "directory should be writable")
|
||||||
|
|
||||||
|
if os.Geteuid() == 0 {
|
||||||
|
t.Skip("/usr/lib writability check is meaningful only for unprivileged users; root inside containers can write everywhere")
|
||||||
|
}
|
||||||
ok, err = util.Writable(nonWritableDir)
|
ok, err = util.Writable(nonWritableDir)
|
||||||
assert.NoError(t, err, "system directory writable check")
|
assert.NoError(t, err, "system directory writable check")
|
||||||
assert.False(t, ok, "system directory should not be writable")
|
assert.False(t, ok, "system directory should not be writable")
|
||||||
|
|||||||
Reference in New Issue
Block a user