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

Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

    XMLWordPrintableJSON

Details

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

    Description

      API being used POST - service/tags/tagdefs

      Case:
      1. There is an existing tagDef with name as SSN with no attributes.
      Payload -

      {"name":"SSN","attributeDefs":[]} 

      2. Now we are trying to create another tagDef with same name SSN but with attributes - name: expires_one, type: dateTime
      Payload -

      {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} 

      Actual Behaviour:
      The api returns 200, but the 2nd tagDef is not created and existing tagDef is also not updated with attributes which are added in 2nd step.
      Expected behaviour:
      Since this is a POST api, an exception with duplicate object should be thrown indicating that a tagDef with name as SSN already exists.

      Attachments

        Activity

          People

            anandNadar Anand Nadar
            anandNadar Anand Nadar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: