expand volume.Spec to include full Volume and PV

This commit is contained in:
markturansky
2015-08-12 15:11:03 -04:00
parent b6f2f396ba
commit 0e7f73ad67
32 changed files with 148 additions and 142 deletions

View File

@@ -29,11 +29,11 @@ func TestSpecSourceConverters(t *testing.T) {
}
converted := NewSpecFromVolume(v)
if converted.VolumeSource.EmptyDir == nil {
if converted.Volume.EmptyDir == nil {
t.Errorf("Unexpected nil EmptyDir: %+v", converted)
}
if v.Name != converted.Name {
t.Errorf("Expected %v but got %v", v.Name, converted.Name)
if v.Name != converted.Name() {
t.Errorf("Expected %v but got %v", v.Name, converted.Name())
}
pv := &api.PersistentVolume{
@@ -44,10 +44,10 @@ func TestSpecSourceConverters(t *testing.T) {
}
converted = NewSpecFromPersistentVolume(pv, false)
if converted.PersistentVolumeSource.AWSElasticBlockStore == nil {
if converted.PersistentVolume.Spec.AWSElasticBlockStore == nil {
t.Errorf("Unexpected nil AWSElasticBlockStore: %+v", converted)
}
if pv.Name != converted.Name {
t.Errorf("Expected %v but got %v", pv.Name, converted.Name)
if pv.Name != converted.Name() {
t.Errorf("Expected %v but got %v", pv.Name, converted.Name())
}
}