Add local and NetBox server notes and improve reliability
Release / release (push) Successful in 6m52s

This commit is contained in:
Sebastian Unterschütz committed 2026-10-27 17:51:59 +01:00
1 parent 2852dff2c4
commit 12cc64fdd9
17 files changed
+848 -83

No files matched your search

+12
View File
@@ -471,3 +471,15 @@ func tempFile(t *testing.T, content []byte) string {
f.Close()
return f.Name()
}
func TestUpsertPreservesUsageHistory(t *testing.T) {
c := New("", 3600)
c.Upsert(Entry{Name: "web01", IP: "10.0.0.1"})
c.MarkUsed("web01")
before, _ := c.Get("web01")
c.Upsert(Entry{Name: "web01", IP: "10.0.0.2"})
after, _ := c.Get("web01")
if after.LastUsed != before.LastUsed || after.IP != "10.0.0.2" {
t.Fatalf("history lost: %+v", after)
}
}