Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-27111

Uploading same files with different names using hammer to different file repositories result in the each file reporting the first uploaded file's name

XMLWordPrintable

    • 3
    • False
    • Moderate
    • Artemis Refinement Backlog
    • sat-artemis
    • None
    • None
    • None
    • To Do

      Description of problem:

      Uploading same files with different names using hammer to different file repositories result in the each file reporting the first uploaded file's name.

      How reproducible:

      Always

      Is this issue a regression from an earlier version:

      Steps to Reproduce:

      1. Create two file repositories on the Satellite.

      2. Upload a file to the first file repository. 

      3. Upload the same file with a different name to the second repository.

      4. Check the name of the file uploaded to the second repository.

      5. Delete both the repositories and create another file repository. 

      6. Upload the same file with another name to the third repository.

      Actual behavior:

      The file names reflect the first file's name even if the actual file had a different name.

      Here is an example.

      data1.json and data2.json are same files with different names.

      Uploaded file data1.json to FILE_REPO_1

        hammer> repository upload-content --id 35 --path data1.json 
        [........................................................................................................................................] [100%]
        Successfully uploaded file data1.json

      List of files from FILE_REPO_1

        hammer> file list --repository-id 35
        ---|------------|-----------
        ID | NAME       | PATH      
        ---|------------|-----------
        1  | data1.json | data1.json
        ---|------------|-----------

      Uploaded data2.json file to FILE_REPO_2 

        hammer> repository upload-content --id 36 --path data2.json 
        [..........................................................................................................                               ] [  78%][........................................................................................................................................] [100%]
        Successfully uploaded file data2.json

      The confirmation message says the file is data2.json.

      Listing the files reports file1.json

        hammer> file list --repository-id 36
        ---|------------|-----------
        ID | NAME       | PATH      
        ---|------------|-----------
        1  | data1.json | data1.json
        ---|------------|-----------

      Deleted the two repositories and created another repository and uploaded the same file with different name to the repository.

      The file was uploaded to repository with ID 37. 

        hammer> repository upload-content --id 37 --path data3.json
        [........................................................................................................................................] [100%]
        Successfully uploaded file data3.json

      The message indicates the file name is data3.json but the file list shows the old name.

        hammer> file list --repository-id 37
        ---|------------|-----------
        ID | NAME       | PATH      
        ---|------------|-----------
        1  | data1.json | data1.json
        ---|------------|-----------

      Expected behavior:

      • File names should be different.

              Unassigned Unassigned
              rhn-support-msunil Manu Sunil
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: