both -1 and 0 are accepted as "no limit", so don't send the
limit option if no limit was set. For simplicity, we're ignoring
values <= 0.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -39,8 +39,8 @@ func TestContainerList(t *testing.T) {
|
| 39 | 39 |
return nil, fmt.Errorf("all not set in URL query properly. Expected '1', got %s", all)
|
| 40 | 40 |
} |
| 41 | 41 |
limit := query.Get("limit")
|
| 42 |
- if limit != "0" {
|
|
| 43 |
- return nil, fmt.Errorf("limit should have not be present in query. Expected '0', got %s", limit)
|
|
| 42 |
+ if limit != "" {
|
|
| 43 |
+ return nil, fmt.Errorf("limit should have not be present in query, got %s", limit)
|
|
| 44 | 44 |
} |
| 45 | 45 |
since := query.Get("since")
|
| 46 | 46 |
if since != "container" {
|
| ... | ... |
@@ -48,7 +48,7 @@ func TestContainerList(t *testing.T) {
|
| 48 | 48 |
} |
| 49 | 49 |
before := query.Get("before")
|
| 50 | 50 |
if before != "" {
|
| 51 |
- return nil, fmt.Errorf("before should have not be present in query, go %s", before)
|
|
| 51 |
+ return nil, fmt.Errorf("before should have not be present in query, got %s", before)
|
|
| 52 | 52 |
} |
| 53 | 53 |
size := query.Get("size")
|
| 54 | 54 |
if size != "1" {
|