CloudMigrations: Query GMS for a presigned upload url at upload time (#90505)
query GMS for an upload url at upload time
This commit is contained in:
@@ -449,9 +449,10 @@ func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Servi
|
||||
}
|
||||
|
||||
type gmsClientMock struct {
|
||||
validateKeyCalled int
|
||||
startSnapshotCalled int
|
||||
getStatusCalled int
|
||||
validateKeyCalled int
|
||||
startSnapshotCalled int
|
||||
getStatusCalled int
|
||||
createUploadUrlCalled int
|
||||
|
||||
getSnapshotResponse *cloudmigration.GetSnapshotStatusResponse
|
||||
}
|
||||
@@ -474,3 +475,8 @@ func (m *gmsClientMock) GetSnapshotStatus(_ context.Context, _ cloudmigration.Cl
|
||||
m.getStatusCalled++
|
||||
return m.getSnapshotResponse, nil
|
||||
}
|
||||
|
||||
func (m *gmsClientMock) CreatePresignedUploadUrl(ctx context.Context, session cloudmigration.CloudMigrationSession, snapshot cloudmigration.CloudMigrationSnapshot) (string, error) {
|
||||
m.createUploadUrlCalled++
|
||||
return "http://localhost:3000", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user