You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*That said, the archive path used in the sample command would have to be updated to match some archive created on Permanent.org*
52
34
53
-
### Challenging Names
35
+
## Testing scope
36
+
37
+
The scope of testing here verifies the possibility of correctly uploading and downloading
38
+
a finite set of file types in a particular size range to [Permanent.org](Permanent.org) using [rclone](https://rclone.org/)
39
+
which talks to permanent using the [SFTP service](https://github.com/PermanentOrg/sftp-service)
40
+
41
+
### What file types are tested?
42
+
43
+
- Text and png images with obscure names generated via [generate-tree.py](generate-tree.py)
44
+
- Images in `.jpg` and `.png` format downloaded from [APOD](https://apod.nasa.gov/apod) via [apod-downloader.py](apod-downloader.py)
45
+
- Compressed files in `.zip` and `.tar`
46
+
- Videos in `.mp4`, `.webm`, `.gifs` and `.3gp` common in mobile devices.
47
+
- Executable files in `.exe`, `.run`, `.sh`, `.dep` and extension-less bin executables.
48
+
49
+
### What test cases are covered?
50
+
51
+
#### Challenging Names
54
52
55
53
Run `./generate-tree.py` to generate test data, which will be placed
56
54
in a new subdirectory named `test-tree/challenging-names`.
@@ -62,6 +60,93 @@ first, of course). See the long comment at the top of
62
60
[upload-test.sh](upload-test.sh) for information about what it's
63
61
trying to do and what problems we know about so far.
64
62
63
+
#### Duplicates
64
+
65
+
A duplicate is a file/folder with exactly the same name. Of course this is not possible on regular file systems but Permanent does support it.
66
+
There is a deduplication algorithm from Permanent that the `sftp-service` relies to ensure that files with identical names on Permanent won't be
67
+
be considered as the same on regular file systems.
68
+
69
+
##### How test duplicate
70
+
71
+
- Create a folder in the test archive of the remote (permanent.org or permanent.dev depending on your test target) e.g 'duplicates'.
72
+
- Upload at least two copies of multiple identical files into the folder `duplicates` for example (`file.txt`, `file.txt`, `file.txt` and `photo.png`, `photo.png` ...)
73
+
- Run the download test script against the duplicate folder. In this case:
- Check download folder and ensure that results looks like:
81
+
82
+
*Result from `tree` program*
83
+
```
84
+
├── file (1).txt
85
+
├── file (2).txt
86
+
├── file.txt
87
+
├── Photo (1).png
88
+
└── Photo.png
89
+
90
+
0 directories, 5 files
91
+
```
92
+
##### Multiple Identical Uploads
93
+
94
+
This test case captures what happens if you sync the same path with unchanged content multiples times.
95
+
96
+
##### How test identical uploads
97
+
98
+
- Generate challenging names if not generated earlier, see [Challenging Names](#challenging-names)
99
+
100
+
Run `./upload-test.py test-tree/challenging-names --only=414 --remote-dir=test-414 --log-file=duplicate-upload-log.txt --remote=prod --archive-path="/archives/QA (0a21-0000)/My Files/"`
101
+
102
+
*Notice the use of the `--only` flag which specifies only files containing the number `414` should be uploaded, you can change this number to follow a string pattern in the generated challenging names but the provide example works just fine.*
103
+
104
+
##### Expected results
105
+
106
+
-`rclone` should report `Sizes identical` and `Unchanged skipping`
- No duplicates should be be seen on Permanent UI.
113
+
114
+
##### Large uploads
115
+
###### Uploads
116
+
117
+
To test large file (`400MB` +) uploads, a couple of large files are required. Some ready-made test files can be downloaded via:
118
+
119
+
`./special-files-downloader.py --large`
120
+
121
+
If you have your own large files or other kinds of files you would like to run tests with, you can list the links to those files in a text file like so:
122
+
123
+
'my_files.txt'
124
+
```
125
+
https://link.com/to/file_1.extension
126
+
https://link.com/to/file_2.extension
127
+
https://link.com/to/file_3.extension
128
+
```
129
+
130
+
and then run `./special-files-downloader.py --my-source my_files.txt`
131
+
132
+
-*You can specify as many paths as you want inside the file*
133
+
-*You can name the the source text file anything you want but pass the right name and path to `--my-source`*
134
+
135
+
**You don't need to download any files if you already have some special files on your computer, simply copy such files into one of these directories `test-tree/special-files/`, `test-tree/special-files/large`, `test-tree/special-files/zips`, or `test-tree/special-files/custom`**
136
+
137
+
Once the files are on disk:
138
+
139
+
Run `./upload-test.py test-tree/special-files/large --remote-dir=large-files --log-file=large-files-log.txt --remote=prod --archive-path="/archives/QA (0a21-0000)/My Files/"`
140
+
141
+
### What file types and scenarios are left out?
142
+
143
+
Anything not included in the section above describing what is currently covered is by implication excluded from these tests.
144
+
145
+
## Troubleshooting
146
+
147
+
- Remember that the commands are examples and some of the arguments may not apply to your specific environment.
148
+
-*For example ensure that arguments such as `--remote`, `--archive-path` are updated and correct*
149
+
65
150
## Web Interface
66
151
67
152
For prod, just go to the site as per usual. For dev, go to
0 commit comments