-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Fixtures
dlitvakb edited this page Dec 18, 2012
·
19 revisions
This fixtures are being tested using the cdnintegration
account on staging
{
'uri': '/zones/pull.json',
'method': 'post',
'data': {
'name': 'itpasses',
'url': 'http://somewhere.com'
},
'return_field': 'id',
'expected_code': 201,
'rollback_information': {
'uri': '/zones/pull.json/%s/full',
'method': 'delete'
}
}
{
'uri': '/zones/push.json',
'method': 'post',
'data': {
'name': 'itpasses',
'password': '12345asd'
},
'return_field': 'id',
'expected_code': 201,
'rollback_information': {
'uri': '/zones/push.json/%s/full',
'method': 'delete'
}
}
{
'uri': '/zones/live.json',
'method': 'post',
'data': {
'name': 'itpasses',
},
'return_field': 'id',
'expected_code': 201,
'rollback_information': {
'uri': '/zones/live.json/%s/full',
'method': 'delete'
}
}
{
'uri': '/zones/vod.json',
'method': 'post',
'data': {
'name': 'itpasses',
'password': '12345asd'
},
'return_field': 'id',
'expected_code': 201,
'rollback_information': {
'uri': '/zones/vod.json/%s/full',
'method': 'delete'
}
}
{
'uri': '/zones/pull.json',
'method': 'post',
'data': {
'name': 'youshallnotpasssssssss',
'url': 'http://somewhere.com'
},
'expected_code': 400
}
{
'uri': '/zones/push.json',
'method': 'post',
'data': {
'name': 'youshallnotpasssssssss',
'password': '12345asd'
},
'expected_code': 400
}
{
'uri': '/zones/live.json',
'method': 'post',
'data': {
'name': 'youshallnotpasssssssss'
},
'expected_code': 400
}
{
'uri': '/zones/vod.json',
'method': 'post',
'data': {
'name': 'youshallnotpasssssssss',
'password': '12345asd'
},
'expected_code': 400
}
Default POP location (defaults to lax
)
{
'setup_information': {
'uri': '/zones/pull.json',
'method': 'post',
'data': {
'name': 'itpasses',
'url': 'http://somewhere.com'
},
'return_field': 'id'
},
'uri': '/zones/pull.json/%s/viewconfig',
'asserts': [
{'field': 'config', 'value': 'lax'},
{'field': 'lax', 'value': 'Zone'}
],
'rollback_information': {
'uri': '/zones/pull.json/%s/full',
'method': 'delete'
}
}
Only one location
{
'setup_information': {
'uri': '/zones/pull.json',
'method': 'post',
'data': {
'name': 'itpasses',
'url': 'http://somewhere.com'
},
'return_field': 'id'
},
'uri': '/zones/pull.json/%s/viewconfig',
'data': {'pop_name': 'lax'},
'asserts': [
{'field': 'config', 'value': 'lax'},
{'field': 'lax', 'value': 'Zone'}
],
'rollback_information': {
'uri': '/zones/pull.json/%s/full',
'method': 'delete'
}
}
All locations
{
'setup_information': {
'uri': '/zones/pull.json',
'method': 'post',
'data': {
'name': 'itpasses',
'url': 'http://somewhere.com'
},
'return_field': 'id'
},
'uri': '/zones/pull.json/%s/viewconfig',
'data': {'pop_name': 'all'},
'asserts': [
{'field': 'config', 'value': 'lax'},
{'field': 'lax', 'value': 'Zone'}
],
'rollback_information': {
'uri': '/zones/pull.json/%s/full',
'method': 'delete'
}
}