Register creation time for peer, user and account (#1654)

This change register creation time for new peers, users and accounts
This commit is contained in:
Maycon Santos
2024-03-02 13:49:40 +01:00
committed by GitHub
parent 452419c4c3
commit aa935bdae3
6 changed files with 36 additions and 6 deletions

View File

@ -94,6 +94,10 @@ func verifyNewAccountHasDefaultFields(t *testing.T, account *Account, createdBy
t.Errorf("expecting newly created account to be created by user %s, got %s", createdBy, account.CreatedBy)
}
if account.CreatedAt.IsZero() {
t.Errorf("expecting newly created account to have a non-zero creation time")
}
if account.Domain != domain {
t.Errorf("expecting newly created account to have domain %s, got %s", domain, account.Domain)
}
@ -1473,6 +1477,7 @@ func TestAccount_Copy(t *testing.T) {
account := &Account{
Id: "account1",
CreatedBy: "tester",
CreatedAt: time.Now().UTC(),
Domain: "test.com",
DomainCategory: "public",
IsDomainPrimaryAccount: true,