mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
Merge pull request #11779 from blatyo/add_ulimit_test
Add test for successful Ulimit Parse.
This commit is contained in:
@@ -2,6 +2,13 @@ package ulimit
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestParseValid(t *testing.T) {
|
||||
u1 := &Ulimit{"nofile", 1024, 512}
|
||||
if u2, _ := Parse("nofile=512:1024"); u1 == u2 {
|
||||
t.Fatalf("expected %s, but got %s", u1.String(), u2.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseInvalidLimitType(t *testing.T) {
|
||||
if _, err := Parse("notarealtype=1024:1024"); err == nil {
|
||||
t.Fatalf("expected error on invalid ulimit type")
|
||||
|
||||
Reference in New Issue
Block a user