Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
d4b28605
Commit
d4b28605
authored
Dec 09, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal: skip test with other group if user is only 1 group
Change-Id: I59a1f187ff4c88bcefdb1e70c6461ca4b2a79c3b
parent
672815b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
internal/access_test.go
internal/access_test.go
+7
-4
No files found.
internal/access_test.go
View file @
d4b28605
...
...
@@ -53,18 +53,21 @@ func TestHasAccess(t *testing.T) {
_
=
myOtherGid
_
=
notMyGid
for
i
,
tc
:=
range
[]
testcase
{
cases
:=
[]
testcase
{
{
myUid
,
myGid
,
myUid
,
myGid
,
0100
,
01
,
true
},
{
myUid
,
myGid
,
myUid
+
1
,
notMyGid
,
0001
,
0001
,
true
},
{
myUid
,
myGid
,
myUid
+
1
,
notMyGid
,
0000
,
0001
,
false
},
{
myUid
,
myGid
,
myUid
+
1
,
notMyGid
,
0007
,
0000
,
true
},
{
myUid
,
myGid
,
myUid
+
1
,
myOtherGid
,
0020
,
002
,
true
},
{
myUid
,
myGid
,
myUid
+
1
,
notMyGid
,
0020
,
002
,
false
},
{
myUid
,
myGid
,
myUid
,
myGid
,
0000
,
01
,
false
},
{
myUid
,
myGid
,
myUid
,
myGid
,
0200
,
01
,
false
},
{
0
,
myGid
,
myUid
+
1
,
notMyGid
,
0700
,
01
,
true
},
}
{
}
if
myOtherGid
!=
0
{
cases
=
append
(
cases
,
testcase
{
myUid
,
myGid
,
myUid
+
1
,
myOtherGid
,
0020
,
002
,
true
})
}
for
i
,
tc
:=
range
cases
{
got
:=
HasAccess
(
tc
.
uid
,
tc
.
gid
,
tc
.
fuid
,
tc
.
fgid
,
tc
.
perm
,
tc
.
mask
)
if
got
!=
tc
.
want
{
t
.
Errorf
(
"%d: accessCheck(%v): got %v, want %v"
,
i
,
tc
,
got
,
tc
.
want
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment