Myroslav Papirkovskyi created AMBARI-17588:
----------------------------------------------

             Summary: Creation of config groups with invalid config type 
doesn't throw any error
                 Key: AMBARI-17588
                 URL: https://issues.apache.org/jira/browse/AMBARI-17588
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.4.0
            Reporter: Myroslav Papirkovskyi
            Assignee: Myroslav Papirkovskyi
            Priority: Critical
             Fix For: 2.4.0


user should not be able to create a config group with invalid config type. 
Ambari should throw a 500 Server Error. Please see below where tests fail as 
the POST call succeeds with a '201 Created' response for an invalid config type.
{code}
2016-06-30 03:00:24,164 INFO 
com.hw.ambari.ui.util.cluster_managers.APIManager.doPost(): executing POST 
https://172.22.78.117:8443/api/v1/clusters/cl1/config_groups
{
                        "ConfigGroup": {
            "cluster_name": "cl1",
                    "group_name": "brokennewgroup",
                    "tag": "HDFS",
                    "description": "test",
                    "hosts": [],
            "desired_configs": [
            {
                "type": "brokencore-site",
                    "tag": "nextgen1",
                    "properties": {
                "key": "value"
            }
            }
            ]
        }
        }
2016-06-30 03:00:24,301 INFO 
com.hw.ambari.ui.util.cluster_managers.APIManager.getResponseBody(): HTTP/1.1 
201 Created
2016-06-30 03:00:24,302 INFO 
com.hw.ambari.ui.util.cluster_managers.APIManager.getResponseBody(): {
  "resources" : [
    {
      "href" : "https://172.22.78.117:8443/api/v1/clusters/cl1/config_groups/2";,
      "ConfigGroup" : {
        "id" : 2
      }
    }
  ]
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to