ARO-9263: Update test to check issue date in constant time to avoid failure

This commit is contained in:
Edison Cardenas 2024-09-18 19:01:13 +12:00 коммит произвёл Amber Brown
Родитель f4093d4c83
Коммит 2226af0755
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -84,13 +84,13 @@ func TestEnsureACRToken(t *testing.T) {
{
Name: intACR,
Username: user,
IssueDate: &date.Time{Time: time.Date(2024, 1, 9, 0, 0, 0, 0, time.UTC)},
IssueDate: &date.Time{Time: time.Now().AddDate(0, 0, -100)},
},
},
},
}
},
wantErr: "TerminalError: azure container registry (acr) token has expired, 252 days have passed",
wantErr: "TerminalError: azure container registry (acr) token has expired, 100 days have passed",
},
{
name: "Should rotate token",