CloudMigration: Removes snapshot and resources when deleting a session (#91548)

This commit is contained in:
lean.dev
2024-08-09 16:42:45 +03:00
committed by GitHub
parent 1cc438a56c
commit e20c7342a9
5 changed files with 115 additions and 22 deletions
@@ -114,9 +114,20 @@ func Test_CreateGetRunMigrationsAndRuns(t *testing.T) {
require.Equal(t, 1, len(listRunResp.Runs))
require.Equal(t, runResp.RunUID, listRunResp.Runs[0].RunUID)
/**
-- This is not working at the moment since it is a mix of old and new methods
will be fixed later when we clean the old functions and stick to the new ones.
delMigResp, err := s.DeleteSession(context.Background(), createResp.UID)
require.NoError(t, err)
require.NotNil(t, createResp.UID, delMigResp.UID)
// after deleting the session, the snapshots and resources should not exist anymore.
// we check the snapshot for now
listRunResp2, err := s.GetMigrationRunList(context.Background(), createResp.UID)
require.NoError(t, err)
require.Equal(t, 0, len(listRunResp2.Runs))
*/
}
func Test_GetSnapshotStatusFromGMS(t *testing.T) {