Remove superfluous test support code. Fix bug in node list cli command.
Add tests.
This commit is contained in:
parent
6a3b171e99
commit
d1c3faae5f
4 changed files with 42 additions and 7 deletions
5
app.go
5
app.go
|
@ -100,11 +100,6 @@ func (h *Headscale) redirect(w http.ResponseWriter, req *http.Request) {
|
|||
// ExpireEphemeralNodes deletes ephemeral machine records that have not been
|
||||
// seen for longer than h.cfg.EphemeralNodeInactivityTimeout
|
||||
func (h *Headscale) ExpireEphemeralNodes(milliSeconds int64) {
|
||||
if milliSeconds == 0 {
|
||||
// For testing
|
||||
h.expireEphemeralNodesWorker()
|
||||
return
|
||||
}
|
||||
ticker := time.NewTicker(time.Duration(milliSeconds) * time.Millisecond)
|
||||
for range ticker.C {
|
||||
h.expireEphemeralNodesWorker()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue