← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1487663] [NEW] no testcases to cover the region creation with invalid id

 

Public bug reported:

Regions use ID differently. The user can specify the ID or it will be
generated automatically. Region schema validation require the Region ID
is string type, but there is no testcase to cover this.

CURL
=====================================================================
- create region,
curl -g -i -X POST http://127.0.0.1:35357/v3/regions -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 9b7866d88de2408381549e9af55b0c07" -d '{"region": {"enabled": true, "id": 1234}}'

{"error": {"message": "Invalid input for field 'id'. The value is
'1234'.", "code": 400, "title": "Bad Request"}}

- create endpoint,
curl -g -i -X POST http://127.0.0.1:35357/v3/endpoints -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: af9a74ea521045b2880e2a364a16b05a" -d '{"endpoint": {"url": "192.168.1.1:78", "interface": "public", "region": 7891, "enabled": true, "service_id": "ce08ac9579fc4de78d0ee17efeca530e"}}'

{"error": {"message": "Invalid input for field 'region'. The value is
'7891'.", "code": 400, "title": "Bad Request"}}

** Affects: keystone
     Importance: Undecided
         Status: New

** Description changed:

  Regions use ID differently. The user can specify the ID or it will be
  generated automatically. Region schema validation require the Region ID
  is string type, but there is no testcase to cover this.
  
- 
- CURL 
- ===============================================
- create region,
+ CURL
+ =====================================================================
+ - create region,
  curl -g -i -X POST http://127.0.0.1:35357/v3/regions -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 9b7866d88de2408381549e9af55b0c07" -d '{"region": {"enabled": true, "id": 1234}}'
  
  {"error": {"message": "Invalid input for field 'id'. The value is
  '1234'.", "code": 400, "title": "Bad Request"}}
  
- 
- create endpoint,
+ - create endpoint,
  curl -g -i -X POST http://127.0.0.1:35357/v3/endpoints -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: af9a74ea521045b2880e2a364a16b05a" -d '{"endpoint": {"url": "192.168.1.1:78", "interface": "public", "region": 7891, "enabled": true, "service_id": "ce08ac9579fc4de78d0ee17efeca530e"}}'
  
- 
- {"error": {"message": "Invalid input for field 'region'. The value is '7891'.", "code": 400, "title": "Bad Request"}}
+ {"error": {"message": "Invalid input for field 'region'. The value is
+ '7891'.", "code": 400, "title": "Bad Request"}}

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1487663

Title:
  no testcases to cover the region creation with invalid id

Status in Keystone:
  New

Bug description:
  Regions use ID differently. The user can specify the ID or it will be
  generated automatically. Region schema validation require the Region
  ID is string type, but there is no testcase to cover this.

  CURL
  =====================================================================
  - create region,
  curl -g -i -X POST http://127.0.0.1:35357/v3/regions -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 9b7866d88de2408381549e9af55b0c07" -d '{"region": {"enabled": true, "id": 1234}}'

  {"error": {"message": "Invalid input for field 'id'. The value is
  '1234'.", "code": 400, "title": "Bad Request"}}

  - create endpoint,
  curl -g -i -X POST http://127.0.0.1:35357/v3/endpoints -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: af9a74ea521045b2880e2a364a16b05a" -d '{"endpoint": {"url": "192.168.1.1:78", "interface": "public", "region": 7891, "enabled": true, "service_id": "ce08ac9579fc4de78d0ee17efeca530e"}}'

  {"error": {"message": "Invalid input for field 'region'. The value is
  '7891'.", "code": 400, "title": "Bad Request"}}

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1487663/+subscriptions


Follow ups