Actions
Bug #27542
closed/katello/api/srpms does not gives error on undefined parameter
Status:
Duplicate
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Description
/katello/api/srpms does not gives error on undefined parameter
Steps:
1. Create a yum repo.
2. Upload SRPM into that.
3. Try to list SRPM (i.e. here I am trying to list organization wise) and same happens for organization_id/repository_id/environment_id prams too.
a. When passing correct param(organization_id):
[vagrant@srpm-centos7-hammer-devel ~]$ curl --header "Accept:application/json,version=2" --header "Content-Type:application/json" --request GET --insecure --user admin:changeme https://srpm-centos7-katello-devel.vijsingh.example.com/katello/api/srpms --data "{\"organization_id\":[5]}"|python -m json.tool|grep nvr
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 772 0 749 100 23 1922 59 --:--:-- --:--:-- --:--:-- 1920
"nvra": "sasutils-0.3.9-2.el7.src",
"nvra": "SDL2_net-2.0.1-2.el7.src",
b. When passing incorrect params(organization_id1) then it does not gives the error i.e. undefined param or method.
[vagrant@srpm-centos7-hammer-devel ~]$ curl --header "Accept:application/json,version=2" --header "Content-Type:application/json" --request GET --insecure --user admin:changeme https://srpm-centos7-katello-devel.vijsingh.example.com/katello/api/srpms --data "{\"organization_id1\":[5]}"|python -m json.tool|grep nvr
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1468 0 1444 100 24 3450 57 --:--:-- --:--:-- --:--:-- 3446
"nvra": "sasutils-0.3.9-2.el7.src",
"nvra": "SDL2_net-2.0.1-2.el7.src",
"nvra": "viewvc-1.1.26-1.el7.src",
"nvra": "VMDKstream-0.3-1.el7.src",
Actions