Skip to content

Running pkg/client tests alters "real" config #894

Description

@danbarr

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions