Various unit test related improvements (#9865)
* api4: improved error handling * system_store: more logs * integrate go-junit-report into test-te/test-ee * add CI_MINIO_HOST and CI_INBUCKET_HOST instead of CI_HOST * comment re: minio configuration issue * fix TestStartServerPortUnavailable to pass even when root can bind to :21 * skip TestFindManifest_FolderPermission while running as root
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c24c518a14
Коммит
136d8ca5c4
@@ -186,14 +186,19 @@ func TestFindManifest_FileErrors(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFindManifest_FolderPermission(t *testing.T) {
|
||||
if os.Geteuid() == 0 {
|
||||
t.Skip("skipping test while running as root: can't effectively remove permissions")
|
||||
}
|
||||
|
||||
for _, tc := range []string{"plugin.yaml", "plugin.json"} {
|
||||
dir, err := ioutil.TempDir("", "mm-plugin-test")
|
||||
require.NoError(t, err)
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
path := filepath.Join(dir, tc)
|
||||
require.NoError(t, os.Mkdir(path, 0700))
|
||||
|
||||
//User does not have permission in the plugin folder
|
||||
// User does not have permission in the plugin folder
|
||||
err = os.Chmod(dir, 0066)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -202,7 +207,6 @@ func TestFindManifest_FolderPermission(t *testing.T) {
|
||||
assert.Equal(t, "", mpath)
|
||||
assert.Error(t, err, tc)
|
||||
assert.False(t, os.IsNotExist(err), tc)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user