Skip to content

Commit

Permalink
Fix tests for adjustable block sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydavenport committed Oct 4, 2018
1 parent 2954dba commit 92dd395
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import:
- json
- package: github.com/projectcalico/go-yaml-wrapper
- package: github.com/projectcalico/libcalico-go
version: 4a9fc7d60f567f3d6841272e3801e493a96819c0
version: 2acf84885d63b4335dc346e22a6562f48685b3a2
subpackages:
- lib/apiconfig
- lib/apis/v1
Expand Down
6 changes: 3 additions & 3 deletions tests/st/calicoctl/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ class InvalidData(TestBase):
'ipipMode': 'Always',
'cidr': "10.0.250.0"} # no mask
}, "error with field IPpool.CIDR = '10.0.250.0/32' "
"(IP pool size is too small (min /26) for use with Calico IPAM)"),
"(IP pool size is too small for use with Calico IPAM. It must be equal to or greater than the block size.)"),
("pool-invalidNet4", {
'apiVersion': API_VERSION,
'kind': 'IPPool',
Expand Down Expand Up @@ -1838,15 +1838,15 @@ class InvalidData(TestBase):
}
# nothing
}, "error with field IPpool.CIDR = '::/128' "
"(IP pool size is too small (min /122) for use with Calico IPAM)"),
"(IP pool size is too small for use with Calico IPAM. It must be equal to or greater than the block size.)"),
("pool-invalidNet7", {
'apiVersion': API_VERSION,
'kind': 'IPPool',
'metadata': {'name': 'invalid-net-7'},
'spec': {
'cidr': "192.168.0.0/27"} # invalid mask
}, "error with field IPpool.CIDR = '192.168.0.0/27' "
"(IP pool size is too small (min /26) for use with Calico IPAM)"),
"(IP pool size is too small for use with Calico IPAM. It must be equal to or greater than the block size.)"),
("pool-invalidNet8", {
'apiVersion': API_VERSION,
'kind': 'IPPool',
Expand Down
2 changes: 2 additions & 0 deletions tests/st/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'spec': {
'cidr': "10.0.1.0/24",
'ipipMode': 'Always',
'blockSize': 27
}
}

Expand All @@ -64,6 +65,7 @@
'spec': {
'cidr': "fed0:8001::/64",
'ipipMode': 'Never',
'blockSize': 123
}
}

Expand Down

0 comments on commit 92dd395

Please sign in to comment.