summaryrefslogtreecommitdiff
path: root/libpod/driver
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-02 11:02:09 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-02 22:44:40 +0000
commit6ba6ecf59b9204d36388de07b866f157a4d13957 (patch)
tree53bc85dd3e9820eb09014b1db2f8d136e86f6799 /libpod/driver
parent3ea23f84818a816104ccdcf6b836ac4bb3a7c366 (diff)
downloadpodman-6ba6ecf59b9204d36388de07b866f157a4d13957.tar.gz
podman-6ba6ecf59b9204d36388de07b866f157a4d13957.tar.bz2
podman-6ba6ecf59b9204d36388de07b866f157a4d13957.zip
Migrate Create|Commit to ginkgo
Migrate create and commit bats tests to the ginkgo test suite. In doing so, some structures had to be moved to pkg/podmanstructs/podmanstructs.go so we could do better verification of test results. Signed-off-by: baude <bbaude@redhat.com> Closes: #286 Approved by: rhatdan
Diffstat (limited to 'libpod/driver')
-rw-r--r--libpod/driver/driver.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/libpod/driver/driver.go b/libpod/driver/driver.go
index 8475810a8..d84ce8d3c 100644
--- a/libpod/driver/driver.go
+++ b/libpod/driver/driver.go
@@ -1,12 +1,9 @@
package driver
-import cstorage "github.com/containers/storage"
-
-// Data handles the data for a storage driver
-type Data struct {
- Name string `json:"Name"`
- Data map[string]string `json:"Data"`
-}
+import (
+ cstorage "github.com/containers/storage"
+ "github.com/projectatomic/libpod/pkg/inspect"
+)
// GetDriverName returns the name of the driver for the given store
func GetDriverName(store cstorage.Store) (string, error) {
@@ -27,7 +24,7 @@ func GetDriverMetadata(store cstorage.Store, layerID string) (map[string]string,
}
// GetDriverData returns the Data struct with information of the driver used by the store
-func GetDriverData(store cstorage.Store, layerID string) (*Data, error) {
+func GetDriverData(store cstorage.Store, layerID string) (*inspect.Data, error) {
name, err := GetDriverName(store)
if err != nil {
return nil, err
@@ -36,7 +33,7 @@ func GetDriverData(store cstorage.Store, layerID string) (*Data, error) {
if err != nil {
return nil, err
}
- return &Data{
+ return &inspect.Data{
Name: name,
Data: metaData,
}, nil