Make WaitForTailscaleLogout a Scenario method
This commit is contained in:
parent
8e8b65bb84
commit
2494e27a73
2 changed files with 17 additions and 17 deletions
|
@ -469,3 +469,19 @@ func (s *Scenario) ListTailscaleClientsFQDNs(namespaces ...string) ([]string, er
|
|||
|
||||
return allFQDNs, nil
|
||||
}
|
||||
|
||||
func (s *Scenario) WaitForTailscaleLogout() {
|
||||
for _, namespace := range s.namespaces {
|
||||
for _, client := range namespace.Clients {
|
||||
namespace.syncWaitGroup.Add(1)
|
||||
|
||||
go func(c TailscaleClient) {
|
||||
defer namespace.syncWaitGroup.Done()
|
||||
|
||||
// TODO(kradalby): error handle this
|
||||
_ = c.WaitForLogout()
|
||||
}(client)
|
||||
}
|
||||
namespace.syncWaitGroup.Wait()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue