-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #630: Fix bug: duplicate slash in torrent announce URL
784ac54 fix comment (Jose Celano) a3e162c refactor: simplify config files removing default values (Jose Celano) f0a5006 fix: [#628] rename config files for MySQL E2E test env too (Jose Celano) 564ef13 fix: [#628] bug, duplicate slash in tracker announce URL (Jose Celano) 96269cd test: [#628] add failing test for bug. Duplicate slash in announce URL (Jose Celano) Pull request description: When the tracker runs in private mode the announce URL in the torrent file includes a double slash `/`. For example: http://tracker:7070//KEY ### Subtasks - [x] Scaffolding to run E2E tests with tracker in private mode. We have been running E2E tests only for public mode so far. - [x] Add a failing test. - [x] Fix the failing test. - [x] Simplify config files removing defaults options. ACKs for top commit: josecelano: ACK 784ac54 Tree-SHA512: fdaa36a605becba8066bbbb77a0cf149b2db180ce10467104723090e5ec9dc57963a7a5f10bf3275c0d8a43600d2b21a40a6b9de65025d1fec68e815ca102c7c
- Loading branch information
Showing
24 changed files
with
181 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ | ||
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ | ||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.public.e2e.container.mysql.toml) \ | ||
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.public.e2e.container.sqlite3.toml) \ | ||
docker compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-down.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.private.e2e.container.sqlite3.toml) \ | ||
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.private.e2e.container.sqlite3.toml) \ | ||
docker compose down |
16 changes: 16 additions & 0 deletions
16
contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-up.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.private.e2e.container.sqlite3.toml) \ | ||
docker compose build | ||
|
||
USER_ID=${USER_ID:-1000} \ | ||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.private.e2e.container.sqlite3.toml) \ | ||
TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \ | ||
TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \ | ||
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ | ||
TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY="MaxVerstappenWC2021" \ | ||
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.private.e2e.container.sqlite3.toml) \ | ||
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ | ||
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \ | ||
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MyAccessToken" \ | ||
docker compose up --detach --pull always --remove-orphans |
5 changes: 5 additions & 0 deletions
5
contrib/dev-tools/container/e2e/sqlite/mode/public/e2e-env-down.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.public.e2e.container.sqlite3.toml) \ | ||
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.public.e2e.container.sqlite3.toml) \ | ||
docker compose down |
6 changes: 3 additions & 3 deletions
6
...-tools/container/e2e/sqlite/e2e-env-up.sh → ...iner/e2e/sqlite/mode/public/e2e-env-up.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
share/default/config/index.private.e2e.container.sqlite3.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
log_level = "info" | ||
|
||
[tracker] | ||
api_url = "http://tracker:1212" | ||
mode = "Private" | ||
url = "http://tracker:7070" | ||
|
||
[database] | ||
connect_url = "sqlite:///var/lib/torrust/index/database/e2e_testing_sqlite3.db?mode=rwc" | ||
|
||
[mail] | ||
port = 1025 | ||
server = "mailcatcher" |
4 changes: 0 additions & 4 deletions
4
...ult/config/index.e2e.container.mysql.toml → ...fig/index.public.e2e.container.mysql.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
...t/config/index.e2e.container.sqlite3.toml → ...g/index.public.e2e.container.sqlite3.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
share/default/config/tracker.private.e2e.container.sqlite3.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
db_driver = "Sqlite3" | ||
db_path = "/var/lib/torrust/tracker/database/e2e_testing_sqlite3.db" | ||
mode = "private" | ||
|
||
[[udp_trackers]] | ||
enabled = false | ||
|
||
[http_api] | ||
bind_address = "0.0.0.0:1212" | ||
|
6 changes: 6 additions & 0 deletions
6
share/default/config/tracker.public.e2e.container.sqlite3.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
db_driver = "Sqlite3" | ||
db_path = "/var/lib/torrust/tracker/database/e2e_testing_sqlite3.db" | ||
mode = "public" | ||
|
||
[http_api] | ||
bind_address = "0.0.0.0:1212" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.