Skip to content

Commit 401e9fc

Browse files
committed
Store base variety data in repository
Reduces dependences and makes it easier to write scripts that depend on this repo such as https://github.com/OpenTechStrategies/permanent-rclone-iac/blob/main/provision Signed-off-by: Fon E. Noel NFEBE <[email protected]>
1 parent 5e005cf commit 401e9fc

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
test-tree/*
22
!test-tree/misc/
3+
test-tree/misc/variety/*
4+
!test-tree/misc/variety/files.zip
35
__pycache__
46
venv
57
log*.txt

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -227,27 +227,35 @@ For 1000, 5MB Files:
227227

228228
*Prepare data variety*
229229

230-
To test a variety of file types/sizes simply create a directory in `test-tree` such as `variety` and store a bunch of diffent files types in the range of a few kilo bytes to about 50 mega bytes. Ideally, a few images (`.png`, `.jpg`), document files (`.docx`, `.ppt`, `.xlxs`), video and sound files, and archive files.
230+
To test uploads with a variety of file types/sizes, unzip the files archive in `/test-tree/misc/variety/files.zip` into same directory `/test-tree/misc/variety/`
231+
232+
- Unzip : `unzip ./test-tree/misc/variety/files.zip -d ./test-tree/misc/variety`
231233

232234
*Otherwise*
233235

234-
- You can download our test data stored in aws via `aws s3 cp s3://permanent-repos/test_files/critical-path.zip ./test-tree/variety`. (Access required via aws authentication)
235-
- It's a zip file, so remember to unzip: `unzip -d ./test-tree/variety ./test-tree/variety/critical-path.zip`
236-
- Delete the zip or move it to avoid it being part of the test data `rm ./test-tree/variety/critical-path.zip`
236+
You can add your own files in the range of a few kilo bytes to about 50 mega bytes in the same location (`/test-tree/misc/variety/files`).
237+
238+
Ideally, a few images (`.png`, `.jpg`), document files (`.docx`, `.ppt`, `.xlxs`), video and sound files, and archive files.
239+
237240

238241
*Duplicate data*
239242

240243
Once you have the files in place, you duplicate the files to achieve a desire volume using the duplication script described in the next section.
241244

242245
The `./duplicate-files` script is designed to create multiple copies of files in a specified source directory. It allows you to make 'n' copies of each file found in the source directory and save them in either the same directory or a different destination directory.
243246

244-
Usage: `./script.sh <source_path> <n> <destination_path (optional)>`
247+
Usage: `./duplicate-files <source_path> <n> <destination_path (optional)>`
248+
249+
- Create a duplication by 10 `duplicate-files ./test-tree/misc/variety/files 10`
250+
251+
*You can change the number to reduce or increase the number of files and consequently the resulting size.
252+
245253

246254
##### *Variety upload test*
247255

248256
Now you can test uploads with the variety of files set up in `./test-tree/variety`
249257

250-
- Run `./upload-test.py test-tree/variety --remote-dir=variety --log-file=variety.txt --remote=prod --archive-path="/archives/QA (0a21-0000)/My Files/"`
258+
- Run `./upload-test.py test-tree/misc/variety/files --remote-dir=variety --log-file=variety.txt --remote=prod --archive-path="/archives/QA (0a21-0000)/My Files/"`
251259

252260

253261
#### Large number of downloads

test-tree/misc/variety/files.zip

78.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)