Cloud migrations: create snapshot files (#89693)
* Cloud migrations: create snapshot and store it on disk * fix merge conflicts * implement StartSnapshot for gms client * pass snapshot directory as argument to snapshot builder * ensure snapshot folder is set * make swagger-gen * remove Test_ExecuteAsyncWorkflow * pass signed in user to buildSnapshot method / use github.com/grafana/grafana-cloud-migration-snapshot to create snapshot files * fix FakeServiceImpl.CreateSnapshot * remove new line
This commit is contained in:
@@ -15,7 +15,7 @@ func NewInMemoryClient() Client {
|
||||
}
|
||||
|
||||
type memoryClientImpl struct {
|
||||
snapshot *cloudmigration.InitializeSnapshotResponse
|
||||
snapshot *cloudmigration.StartSnapshotResponse
|
||||
}
|
||||
|
||||
func (c *memoryClientImpl) ValidateKey(ctx context.Context, cm cloudmigration.CloudMigrationSession) error {
|
||||
@@ -48,11 +48,11 @@ func (c *memoryClientImpl) MigrateData(
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
func (c *memoryClientImpl) InitializeSnapshot(context.Context, cloudmigration.CloudMigrationSession) (*cloudmigration.InitializeSnapshotResponse, error) {
|
||||
c.snapshot = &cloudmigration.InitializeSnapshotResponse{
|
||||
EncryptionKey: util.GenerateShortUID(),
|
||||
GMSSnapshotUID: util.GenerateShortUID(),
|
||||
UploadURL: "localhost:3000",
|
||||
func (c *memoryClientImpl) StartSnapshot(context.Context, cloudmigration.CloudMigrationSession) (*cloudmigration.StartSnapshotResponse, error) {
|
||||
c.snapshot = &cloudmigration.StartSnapshotResponse{
|
||||
EncryptionKey: util.GenerateShortUID(),
|
||||
SnapshotID: util.GenerateShortUID(),
|
||||
UploadURL: "localhost:3000",
|
||||
}
|
||||
|
||||
return c.snapshot, nil
|
||||
|
||||
Reference in New Issue
Block a user