mirror of https://github.com/ceph/go-ceph
cephfs: make statx test more robust
The TestStatxFieldsRootDir test was assuming that the nlink count returned by statx would be exactly 2. Make the test more robust against varying content the root dir of the volume might have by only asserting that the nlink be 2 or more. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
528893ce1d
commit
d535ef39de
|
@ -18,7 +18,10 @@ func TestStatxFieldsRootDir(t *testing.T) {
|
|||
assert.NotNil(t, st)
|
||||
|
||||
assert.Equal(t, StatxBasicStats, st.Mask&StatxBasicStats)
|
||||
assert.Equal(t, uint32(2), st.Nlink)
|
||||
// allow Nlink to be >= 2 in the case that some test(s) don't entirely
|
||||
// clean up after themselves or the environment is being used outside
|
||||
// of the go-ceph suite only.
|
||||
assert.GreaterOrEqual(t, st.Nlink, uint32(2))
|
||||
assert.Equal(t, uint32(0), st.Uid)
|
||||
assert.Equal(t, uint32(0), st.Gid)
|
||||
assert.NotEqual(t, uint16(0), st.Mode)
|
||||
|
|
Loading…
Reference in New Issue