[PR #985] test(settings): take into account the OS specific file separator #931

Open
opened 2025-11-20 04:26:34 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qdm12/ddns-updater/pull/985
Author: @jccint
Created: 4/26/2025
Status: 🔄 Open

Base: masterHead: test-fix


📝 Commits (1)

  • 2f31c15 test(settings): take into account the OS specific file separator

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 internal/config/settings_test.go (+3 -2)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qdm12/ddns-updater/pull/985 **Author:** [@jccint](https://github.com/jccint) **Created:** 4/26/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `test-fix` --- ### 📝 Commits (1) - [`2f31c15`](https://github.com/qdm12/ddns-updater/commit/2f31c1571f134b542aa798c2632697765e6d0a8e) test(settings): take into account the OS specific file separator ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/config/settings_test.go` (+3 -2) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:26:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#931