Skip to content

test(settings): take into account the OS specific file separator #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jccint
Copy link

@jccint jccint commented Apr 26, 2025

Test currently fails on Windows environments:

Error:      	Not equal: 
				expected: "Settings summary:\n├── HTTP client\n|   └── Timeout: 20s\n├── Update\n|   ├── Period: 10m0s\n|   └── Cooldown: 5m0s\n├── Public IP fetching\n|   ├── HTTP enabled: yes\n|   ├── HTTP IP providers\n|   |   └── all\n|   ├── HTTP IPv4 providers\n|   |   └── all\n|   ├── HTTP IPv6 providers\n|   |   └── all\n|   ├── DNS enabled: yes\n|   ├── DNS timeout: 3s\n|   └── DNS over TLS providers\n|       └── all\n├── Resolver: use Go default resolver\n├── Server\n|   ├── Listening address: :8000\n|   └── Root URL: /\n├── Health\n|   └── Server is disabled\n├── Paths\n|   ├── Data directory: ./data\n|   ├── Config file: data/config.json\n|   └── Umask: system default\n├── Backup: disabled\n└── Logger\n    ├── Level: INFO\n    └── Caller: hidden"
				actual  : "Settings summary:\n├── HTTP client\n|   └── Timeout: 20s\n├── Update\n|   ├── Period: 10m0s\n|   └── Cooldown: 5m0s\n├── Public IP fetching\n|   ├── HTTP enabled: yes\n|   ├── HTTP IP providers\n|   |   └── all\n|   ├── HTTP IPv4 providers\n|   |   └── all\n|   ├── HTTP IPv6 providers\n|   |   └── all\n|   ├── DNS enabled: yes\n|   ├── DNS timeout: 3s\n|   └── DNS over TLS providers\n|       └── all\n├── Resolver: use Go default resolver\n├── Server\n|   ├── Listening address: :8000\n|   └── Root URL: /\n├── Health\n|   └── Server is disabled\n├── Paths\n|   ├── Data directory: ./data\n|   ├── Config file: data\\config.json\n|   └── Umask: system default\n├── Backup: disabled\n└── Logger\n    ├── Level: INFO\n    └── Caller: hidden"
				
				Diff:
				--- Expected
				+++ Actual
				@@ -26,3 +26,3 @@
					|   ├── Data directory: ./data
				-|   ├── Config file: data/config.json
				+|   ├── Config file: data\config.json
					|   └── Umask: system default
Test:       	Test_Settings_String

By dynamically generating the expected filepath we ensure the corresponding OS file separator is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant