1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/volume/drivers/extpoint_test.go
David Calavera 72bb56618b Move volume ref counting store to a package.
- Add unit tests to make sure the functionality is correct.
- Add FilterByDriver to allow filtering volumes by driver, for future
  `volume ls` filtering and whatnot.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-21 12:46:49 -04:00

23 lines
414 B
Go

package volumedrivers
import (
"testing"
"github.com/docker/docker/volume/testutils"
)
func TestGetDriver(t *testing.T) {
_, err := GetDriver("missing")
if err == nil {
t.Fatal("Expected error, was nil")
}
Register(volumetestutils.FakeDriver{}, "fake")
d, err := GetDriver("fake")
if err != nil {
t.Fatal(err)
}
if d.Name() != "fake" {
t.Fatalf("Expected fake driver, got %s\n", d.Name())
}
}