Skip to content

Different start&end time in different time zones cause Test-AzureVmWorkloadRestoreAsFiles to fail in playback mode #11048

@msJinLei

Description

@msJinLei

Description

In the test case "Test-AzureVmWorkloadRestoreAsFiles", The stattime & endtime are different in different time zones, which causes the recorded response mismatch of Get-AzRecoveryServicesBackupRecoveryPoint

    $endtime = get-date -Year 2020 -Month 1 -Day 31 -Minute 35 -Hour 23 -Second 15
    $endtime = $endtime.ToUniversalTime()
    $starttime = $endtime.AddDays(-30)
    $starttime = $starttime.ToUniversalTime()

    $rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -Item $item -StartDate $starttime -EndDate $endtime
    $time = get-date -Year 2020 -Month 1 -Day 30 -Minute 5
    $config = Get-AzRecoveryServicesBackupWorkloadRecoveryConfig `
        -VaultId $vault.ID -PointInTime $time -Item $item -RestoreAsFiles `
        -FilePath $filepath -TargetContainer $container -FromFull $rp[3];

Cost

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions