Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4678

Delete request on service/audit/metrics api is returning 204 for all type of params

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • Ranger
    • None

    Description

      PROBLEM STATEMENT:
      Delete request on service/audit/metrics Api is returning 204 status code for both existing param or non-existing param.

      Either make delete request with existing service name and type or non-existing service name and type in both cases its returning 204 as status code.

      STEPS TO REPRODUCE:
      1. Create metrics for serviceName="cm_hive" and serviceType="hive" by making POST call on "/service/audit/metrics" endpoint with following payload:

      {  "serviceType": "hive",  "serviceName": "cm_hive",  "appId": "hive",  "clusterName": "Cluster 1",  "throughPutUnit": "PER MINUTE",  "numberOfAudits": 6799,  "clientIP": "172.27.18.78",  "metricsText": {    "metrics": {      "1m": 5000    }  }} 

      2. Then Try to delete the metrics by making delete request on "/service/audit/metrics?retentionPeriod=1&serviceName=cm_hive&serviceType=hive" endpoint. The status code will be 204 without any response text. Here serviceName and serviceType are existent.

      3. But if a delete request is performed on "/service/audit/metrics?retentionPeriod=1&serviceName=cm_hive_unknown&serviceType=hive_unknown". Then also it will return 204 as status code without any response text for non-existent service name and type.

      CURRENT BEHAVIOUR:

      Right now getting 204 for both the cases even if the service name and type exist or not.

      EXPECTED BEHAVIOUR:
      The response code should be proper and different for both cases with proper response text.

      OCCURRENCE:
      manual testingĀ 

      IMPACT:
      User not able to identify is the delete operation went though correctly or not. The input param provided by user to delete is correct or not.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kundan.jha Kundan Kumar Jha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: