mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 21:53:00 +08:00
CloudMigrations: Bulk update local resources (#96002)
* wip * make tests pass * get all tests passing * fixes * some small cleanup * fix test * convert delimiter keys to struct keys * dont execute empty sql statement * remove printlns * fix unit test * a bit more cleanup * whoops
This commit is contained in:
@ -114,11 +114,19 @@ func Test_GetSnapshotStatusFromGMS(t *testing.T) {
|
||||
assert.Equal(t, cloudmigration.SnapshotStatusCreating, snapshot.Status)
|
||||
assert.Never(t, func() bool { return gmsClientFake.GetSnapshotStatusCallCount() > 0 }, time.Second, 10*time.Millisecond)
|
||||
|
||||
// Make the status pending processing and ensure GMS gets called
|
||||
// Make the status pending processing to ensure GMS gets called and initialize a resource
|
||||
err = s.store.UpdateSnapshot(ctx, cloudmigration.UpdateSnapshotCmd{
|
||||
UID: uid,
|
||||
SessionID: sess.UID,
|
||||
Status: cloudmigration.SnapshotStatusPendingProcessing,
|
||||
LocalResourcesToCreate: []cloudmigration.CloudMigrationResource{
|
||||
{
|
||||
Name: "A name",
|
||||
Type: cloudmigration.DatasourceDataType,
|
||||
RefID: "A",
|
||||
Status: cloudmigration.ItemStatusPending,
|
||||
},
|
||||
},
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user