mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
snappy/remove_test.go: add missing test
This commit is contained in:
@@ -10,6 +10,6 @@ func Remove(partName string) error {
|
||||
if err := part.Uninstall(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
14
snappy/remove_test.go
Normal file
14
snappy/remove_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package snappy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
. "launchpad.net/gocheck"
|
||||
)
|
||||
|
||||
func (s *SnapTestSuite) TestRemoveNonExistingRaisesError(c *C) {
|
||||
pkgName := "some-random-non-existing-stuff"
|
||||
err := Remove(pkgName)
|
||||
c.Assert(err, NotNil)
|
||||
c.Assert(err.Error(), Equals, fmt.Sprintf("Can not find snap %s", pkgName))
|
||||
}
|
||||
Reference in New Issue
Block a user