mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +01:00
Test group file permissions.
This commit is contained in:
parent
a3f894a31e
commit
3ee5290b71
1 changed files with 9 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
@ -204,6 +205,14 @@ func TestWritableGroups(t *testing.T) {
|
|||
t.Errorf("GetDescription: got %v", err)
|
||||
}
|
||||
|
||||
fi, err := os.Stat(filepath.Join(Directory, "test.json"))
|
||||
if err != nil {
|
||||
t.Errorf("Stat: %v", err)
|
||||
}
|
||||
if mode := fi.Mode(); mode != 0o600 {
|
||||
t.Errorf("Mode is 0o%03o (expected 0o600)\n", mode)
|
||||
}
|
||||
|
||||
desc, token, err := GetSanitisedDescription("test")
|
||||
if err != nil || token == "" {
|
||||
t.Errorf("GetSanitisedDescription: got %v", err)
|
||||
|
|
Loading…
Reference in a new issue