Skip to content

Register vk.Stop() when spawning VKs in tests #7

@rflandau

Description

@rflandau

Currently, spawnVK(), a helper function for testing the vaultkeeper package, spawns a vk but does not register vk.Stop() to the tests's clean up functionality. As .Stop() is idempotent and good practice is to ensure all VKs are stopped during cleanup, spawnVK should just register vk.Stop() prior to returning.

The fix is simple enough: call t.Cleanup(vk.Stop) inside of spawnVK(). PRs resolving this issue should be sure to remove the now superfluous, external t.Cleanup() and defer calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SlimsIssue related to Orv SlimsenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions