Skip to content
dlitvakb edited this page Dec 18, 2012 · 19 revisions

This fixtures are being tested using the cdnintegration account on staging

RWS-150 fixtures (Limit zone name number of characters)

Expected success

{
  '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'
  }
}

Expected failure

{
  '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
}

RWS-174 fixtures (View Nginx Config)

Expected success

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'
  }
}