Skip to content

Commit 87041d7

Browse files
committed
chore: add fixtures directory
1 parent 54276e9 commit 87041d7

File tree

24 files changed

+173
-0
lines changed

24 files changed

+173
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ target/
1212

1313
# Local files
1414
/local
15+
/tmp
1516

1617
### JavaScript ###
1718
node_modules/

fixtures/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# fixtures
2+
3+
This directory contains the fixtures for the tests.
4+
5+
## filesystem
6+
7+
The `fixtures/filesystem` directory contains files and directories that are meant to be used as source for:
8+
9+
- e2e testing the pluginlab crate - see [filesystem/README.rust.md](./filesystem/README.rust.md)
10+
- mounting a virtual filesystem in the browser - see [filesystem/README.browser.md](./filesystem/README.browser.md)
11+
12+
### e2e testing
13+
14+
The `fixtures/filesystem` is copied to `tmp/filesystem` before running the tests.
15+
16+
The tests are run with the `--dir tmp/filesystem` argument.
17+
18+
That way, the original `fixtures/filesystem` directory is not modified by the tests.
19+
20+
### mounting a virtual filesystem in the browser
21+
22+
TODO

fixtures/filesystem/.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Hidden configuration file
2+
# This file contains sensitive configuration data
3+
# Should be handled carefully in tests
4+
5+
[app]
6+
debug = true
7+
log_level = info
8+
max_connections = 10
9+
10+
[filesystem]
11+
root_path = /tmp/filesystem
12+
allow_hidden = false
13+
max_file_size = 1048576

fixtures/filesystem/.hidden_file

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is a hidden file
2+
# It should only be visible when explicitly requested
3+
# Used for testing hidden file operations
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# filesystem

fixtures/filesystem/README.rust.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# filesystem
2+
3+
This directory was mounted with the `--dir tmp/filesystem` argument, giving only access to the `tmp/filesystem` directory.
4+
5+
The `tmp/filesystem` directory is a copy of the `fixtures/filesystem` directory.
6+
7+
You can safely modify the `tmp/filesystem` directory in your tests.
8+
9+
The rest of the files are mock files.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file ensures the 2024 directory is tracked in git
2+
# Year-based nested directory for testing
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file ensures the 01 directory is tracked in git
2+
# Month-based nested directory for testing
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file ensures the 02 directory is tracked in git
2+
# Another month directory for testing
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file ensures the incoming directory is tracked in git
2+
# Raw data nested directory for testing

0 commit comments

Comments
 (0)