fix TODO use time.Time for createSnapshot & solute conflict

This commit is contained in:
zhucan
2019-04-30 16:39:12 +08:00
parent ac33959738
commit 26f95af09c
8 changed files with 121 additions and 129 deletions

View File

@@ -79,10 +79,10 @@ func TestSync(t *testing.T) {
parameters: class5Parameters,
secrets: map[string]string{"foo": "bar"},
// information to return
driverName: mockDriverName,
snapshotId: "sid2-3",
timestamp: timeNow,
readyToUse: false,
driverName: mockDriverName,
snapshotId: "sid2-3",
creationTime: timeNow,
readyToUse: false,
},
},
errors: noerrors,
@@ -114,10 +114,10 @@ func TestSync(t *testing.T) {
parameters: class5Parameters,
secrets: map[string]string{"foo": "bar"},
// information to return
driverName: mockDriverName,
snapshotId: "sid2-5",
timestamp: timeNow,
readyToUse: true,
driverName: mockDriverName,
snapshotId: "sid2-5",
creationTime: timeNow,
readyToUse: true,
},
},
errors: noerrors,
@@ -125,8 +125,8 @@ func TestSync(t *testing.T) {
},
{
name: "2-6 - snapshot bound to prebound content correctly, status ready false -> true, ref.UID '' -> 'snapuid2-6'",
initialContents: newContentArray("content2-6", validSecretClass, "sid2-6", noVolume, noVolume, noBoundUID, "snap2-6", &deletePolicy, nil, &timeNow, false),
expectedContents: newContentArray("content2-6", validSecretClass, "sid2-6", noVolume, noVolume, "snapuid2-6", "snap2-6", &deletePolicy, nil, &timeNow, false),
initialContents: newContentArray("content2-6", validSecretClass, "sid2-6", noVolume, noVolume, noBoundUID, "snap2-6", &deletePolicy, nil, &timeNowStamp, false),
expectedContents: newContentArray("content2-6", validSecretClass, "sid2-6", noVolume, noVolume, "snapuid2-6", "snap2-6", &deletePolicy, nil, &timeNowStamp, false),
initialSnapshots: newSnapshotArray("snap2-6", validSecretClass, "content2-6", "snapuid2-6", noClaim, false, nil, metaTimeNow, nil),
expectedSnapshots: newSnapshotArray("snap2-6", validSecretClass, "content2-6", "snapuid2-6", noClaim, true, nil, metaTimeNow, nil),
expectedListCalls: []listCall{
@@ -178,11 +178,11 @@ func TestSync(t *testing.T) {
parameters: class5Parameters,
secrets: map[string]string{"foo": "bar"},
// information to return
driverName: mockDriverName,
size: defaultSize,
snapshotId: "sid2-8",
timestamp: timeNow,
readyToUse: true,
driverName: mockDriverName,
size: defaultSize,
snapshotId: "sid2-8",
creationTime: timeNow,
readyToUse: true,
},
},
errors: []reactorError{