2018-11-07 11:52:59 +00:00
|
|
|
package pkg
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2018-11-10 11:37:31 +00:00
|
|
|
func TestUnknownManager(t *testing.T) {
|
2018-11-07 11:52:59 +00:00
|
|
|
|
2018-11-10 11:37:31 +00:00
|
|
|
_, err := Load("apt-put")
|
|
|
|
if err != ErrUnknownManager {
|
|
|
|
t.Errorf("expected <%s>, got <%s>", ErrUnknownManager, err)
|
2018-11-07 11:52:59 +00:00
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-11-10 11:37:31 +00:00
|
|
|
func TestKnownManager(t *testing.T) {
|
2018-11-07 11:52:59 +00:00
|
|
|
|
2018-11-10 11:37:31 +00:00
|
|
|
_, err := Load("apt-get")
|
2018-11-07 11:52:59 +00:00
|
|
|
if err != nil {
|
2018-11-10 11:37:31 +00:00
|
|
|
t.Errorf("unexpected error <%s>", err)
|
2018-11-07 11:52:59 +00:00
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|