test(commands): add coverage for error bubbling in shim-writing

This commit is contained in:
Marc 2024-01-31 20:10:11 -05:00
parent 037409a460
commit ba3e490c36
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -32,6 +32,17 @@ func TestWriteShim(t *testing.T) {
} }
func TestWriteShimBubblesError(t *testing.T) {
defer testutils.SetupAndCleanupEnvironment(t)()
testShimPath := state.GetStatePath("shims", "testshim")
err := writeShim(testShimPath, "testcommand")
if err == nil {
t.Errorf("Expected error")
}
}
func TestInitializeCreatesStateDirectories(t *testing.T) { func TestInitializeCreatesStateDirectories(t *testing.T) {
defer testutils.SetupAndCleanupEnvironment(t)() defer testutils.SetupAndCleanupEnvironment(t)()