mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
ensure federation info fqdn to lowercase
This commit is contained in:
parent
e05c810823
commit
5a7f6f15a6
5 changed files with 24 additions and 6 deletions
|
@ -39,6 +39,17 @@ func Test_FederationHostValidation(t *testing.T) {
|
|||
LatestActivity: time.Now().Add(1 * time.Hour),
|
||||
}
|
||||
if res, _ := validation.IsValid(sut); res {
|
||||
t.Errorf("sut should be invalid")
|
||||
t.Errorf("sut should be invalid: Future timestamp")
|
||||
}
|
||||
|
||||
sut = FederationHost{
|
||||
HostFqdn: "hOst.do.main",
|
||||
NodeInfo: NodeInfo{
|
||||
Source: "forgejo",
|
||||
},
|
||||
LatestActivity: time.Now(),
|
||||
}
|
||||
if res, _ := validation.IsValid(sut); res {
|
||||
t.Errorf("sut should be invalid: HostFqdn lower case")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue