update fails
This commit is contained in:
@@ -8,15 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type URL struct {
|
||||
Protocol string `bson:"protocol" json:"protocol"`
|
||||
Path string `bson:"path" json:"path"`
|
||||
Protocol string `bson:"protocol,omitempty" json:"protocol"`
|
||||
Path string `bson:"path,omitempty" json:"path"`
|
||||
}
|
||||
|
||||
type StorageResource struct {
|
||||
resources.AbstractResource
|
||||
|
||||
Capacity uint `bson:"capacity,omitempty" json:"capacity,omitempty"`
|
||||
Url URL `bson:"url,omitempty" json:"url,omitempty"` // Will allow to select between several protocols
|
||||
Url *URL `bson:"url,omitempty" json:"url,omitempty"` // Will allow to select between several protocols
|
||||
|
||||
Encryption bool `bson:"encryption,omitempty" json:"encryption,omitempty"`
|
||||
Redundancy string `bson:"redundancy,omitempty" json:"redundancy,omitempty"`
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStoreOneStorage(t *testing.T) {
|
||||
s := StorageResource{Capacity: 123, Url: URL{Protocol: "http", Path: "azerty.fr"},
|
||||
s := StorageResource{Capacity: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
AbstractResource: resources.AbstractResource{
|
||||
AbstractObject: utils.AbstractObject{Name: "testData"},
|
||||
Description: "Lorem Ipsum",
|
||||
@@ -28,7 +28,7 @@ func TestStoreOneStorage(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadOneStorage(t *testing.T) {
|
||||
s := StorageResource{Capacity: 123, Url: URL{Protocol: "http", Path: "azerty.fr"},
|
||||
s := StorageResource{Capacity: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
AbstractResource: resources.AbstractResource{
|
||||
AbstractObject: utils.AbstractObject{Name: "testData"},
|
||||
Description: "Lorem Ipsum",
|
||||
|
Reference in New Issue
Block a user