add a test case for UID/GID limits
This commit is contained in:
parent
2e6497ea17
commit
30ce6ef736
1 changed files with 14 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -419,6 +420,19 @@ func TestUserStatus(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestUidGidLimits(t *testing.T) {
|
||||
u := getTestUser()
|
||||
u.UID = math.MaxInt32
|
||||
u.GID = math.MaxInt32
|
||||
user, _, err := httpdtest.AddUser(u, http.StatusCreated)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, math.MaxInt32, user.GetUID())
|
||||
assert.Equal(t, math.MaxInt32, user.GetGID())
|
||||
|
||||
_, err = httpdtest.RemoveUser(user, http.StatusOK)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestAddUserNoCredentials(t *testing.T) {
|
||||
u := getTestUser()
|
||||
u.Password = ""
|
||||
|
|
Loading…
Reference in a new issue