Running the test suite alters your actual ToolHive config file, leaving it in a different state than expected.
The tests should operate on a transient/temporary config file, not the user's actual config.
To reproduce, run the client tests without cache:
go test -v -count=1 ./pkg/client
My ~/Library/Application\ Support/toolhive/config.yaml before running tests:
secrets:
provider_type: encrypted
setup_completed: true
clients:
registered_clients:
- roo-code
- cline
- vscode-insider
- vscode
- cursor
- claude-code
auto_discovery: false
registry_url: ""
allow_private_registry_ip: false
And after running client tests:
secrets:
provider_type: ""
setup_completed: false
clients:
registered_clients:
- claude-code
auto_discovery: false
registry_url: ""
allow_private_registry_ip: false
Running the test suite alters your actual ToolHive config file, leaving it in a different state than expected.
The tests should operate on a transient/temporary config file, not the user's actual config.
To reproduce, run the client tests without cache:
go test -v -count=1 ./pkg/clientMy
~/Library/Application\ Support/toolhive/config.yamlbefore running tests:And after running client tests: