Uploaded image for project: 'mod-data-import'
  1. mod-data-import
  2. MODDATAIMP-97

Return error message upon updating file extension `extension` field with existing one

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      EPAM BatchLoader Sprint 12
    • Story Points:
      1
    • Development Team:
      Folijet

      Description

      Request URL: http://localhost:9130/data-import/fileExtensions/:id
      Request Method: PUT

      Current behaviour:

      {
        "errors" : [ {
          "message" : "duplicate key value violates unique constraint file_extensions_extension_idx_unique",
          "type" : "1",
          "code" : "-1",
          "parameters" : [ {
            "key" : "lower(f_unaccent(jsonb ->> 'extension'::text",
            "value" : ".csv"
          } ]
        } ]
      }
      

      Expected behavior:

      {
        "errors" : [ {
          "message" : "fileExtension.duplication.invalid",
          "parameters" : [ ]
        } ],
        "total_records" : 1
      }
      

      Additionally, check that formatting validation for an extension field is also exists and applies before duplication one.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                OleksiiKuzminov Oleksii Kuzminov
                Reporter:
                Viktor Soroka Viktor Soroka
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases