test(commands): add coverage for error bubbling in shim-writing
This commit is contained in:
parent
037409a460
commit
ba3e490c36
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
defer testutils.SetupAndCleanupEnvironment(t)()
|
||||
|
||||
|
|
Loading…
Reference in a new issue