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:
Michael Mandrus
2024-07-17 11:53:21 -04:00
committed by GitHub
parent 970cafa20f
commit 9b7e9d992b
11 changed files with 75 additions and 12 deletions
@@ -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
}