Skip to content

Instantly share code, notes, and snippets.

@Fenn-CS
Last active June 6, 2022 18:52
Show Gist options
  • Save Fenn-CS/c7fabf467f45f9133f891a648756b38f to your computer and use it in GitHub Desktop.
Save Fenn-CS/c7fabf467f45f9133f891a648756b38f to your computer and use it in GitHub Desktop.
Review Assist DRAFT.md

Manual Test Guide For Generate Unique downloadName

Purpose

We have a downloadName field that was introduced on the record and folder tables. The goal of this field is simply to ensure that each file has a unique name with which it can be downloaded.

Why is that neccesary?

Permanent supports duplicate display names. In other words you can have two files named My File.txt and My File.txt in the same folder. That is not a problem in Permanent because the file id's differentiate them.

However, other file systems such as the one on windows or mac would not allow duplicate names in thesame folder. That's why we added this field.

Hence, the purpose of this document is to guide you on how to test whether the downloadName field is getting the correct values.

What you need to test/review the work

  • git fetch origin PER-8610-fix-generate-download-name-bug from this PR

  • Checkout that branch

  • Have a running local instance and be able to ssh (vagrant ssh) into your local VM

  • Obtain the mysql login credential (The details which I could provided in the chat)

  • Be able to login to the sql instance within the VM

  • select recordid, displayName, downloadName, status from record && select folderid, displayName, downloadName, status from folder should be able to show you the information you need to test the downloadName feature correctly. You can use WHERE CAST(displayDT AS DATE) = CAST(curdate() AS DATE) to get only the files/folder done today for the sake of simplicity.

Test Cases for downloadName generation

  • Upload a bunch of files with thesame : In this test you would check if upload itself is working and the instructions above would help you verify if the uploaded files have different downloadNames.
  • Create a folder with a name that is exactly like that of one of your files in the same location (folder). For example if you have a file name photo.png on your system create a folder name photo.png on permanent and in the same directory where photo.png lives upload the file photo.png: In this test, you check that files and folders with thesame displayname in one directory would have different downloadNames.

Test Cases for other functionality affected by the generation of downloadName

Test that you can do the following updates:

  • Rename a file/folder or update displayName
  • Update file/folder decription
  • Change file/folder date.
  • Update tags

Test for edge or weird cases.

  • Upload a file named something.something a couple times. Then another document called something.something.doc verify that the downloadName in the db is something.something.doc

  • Upload file named 2022.04.07.txt check that its properties in the database are as follows - displayName is 2022.04.07 - uploadFileName is 2022.04.07.txt - downloadName is 2022.04.07.txt

  • Upload the same file in the same directory and then check that the new files had the following db characteristics. - displayName is 2022.04.07 - uploadFileName is 2022.04.07.txt - downloadName is 2022.04.07 (1) .txt

  • Upload file named sneaky.txt(1) Verify that the displayName stays sneaky.txt(1) and the downloadName generated is stays sneaky.txt(1).

  • Upload another file still named sneaky.txt(1) Verify that the displayName stays sneaky.txt(1) and the downloadName.

Conclusion

This is only a guide to give you context and assist you with some quick tips, please take any other action you would take during your normal reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment