mitigate Block by future StartTime

This commit is contained in:
Michael Jerger 2024-01-14 14:53:00 +01:00
commit 0ddc2db46a
4 changed files with 21 additions and 2 deletions

View file

@ -30,4 +30,15 @@ func Test_FederationInfoValidation(t *testing.T) {
if res, _ := validation.IsValid(sut); res {
t.Errorf("sut should be invalid")
}
sut = FederationInfo{
HostFqdn: "host.do.main",
NodeInfo: NodeInfo{
Source: "forgejo",
},
LatestActivity: time.Now().Add(1 * time.Hour),
}
if res, _ := validation.IsValid(sut); res {
t.Errorf("sut should be invalid")
}
}