aboutsummaryrefslogtreecommitdiffstats
path: root/storage/memory/storage.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-24 13:39:08 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-24 13:39:08 +0200
commitb53b9073688df6cfc1698eef163ef4cc50a15758 (patch)
tree0df79a41b1c682f25c8f022db1f06fd8ffb5b0ae /storage/memory/storage.go
parent22068946ce5b83163a6c57db3ec2b7294ec549d1 (diff)
downloadgo-git-b53b9073688df6cfc1698eef163ef4cc50a15758.tar.gz
storage: memory test improvements and coverage
Diffstat (limited to 'storage/memory/storage.go')
-rw-r--r--storage/memory/storage.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/memory/storage.go b/storage/memory/storage.go
index 4fb6186..97e87c8 100644
--- a/storage/memory/storage.go
+++ b/storage/memory/storage.go
@@ -86,6 +86,10 @@ func (c *ConfigStorage) Remotes() ([]*config.RemoteConfig, error) {
return o, nil
}
func (c *ConfigStorage) SetRemote(r *config.RemoteConfig) error {
+ if err := r.Validate(); err != nil {
+ return err
+ }
+
c.RemotesConfig[r.Name] = r
return nil
}
@@ -124,7 +128,6 @@ func (o *ObjectStorage) Set(obj core.Object) (core.Hash, error) {
case core.TagObject:
o.Tags[h] = o.Objects[h]
default:
- fmt.Println(obj.Type())
return h, ErrUnsupportedObjectType
}