mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 11:30:15 +00:00
20 lines
402 B
Go
20 lines
402 B
Go
package monitoring
|
|
|
|
import "testing"
|
|
|
|
func TestMultiTenantMonitorRemoveTenant(t *testing.T) {
|
|
monitor := &Monitor{}
|
|
mtm := &MultiTenantMonitor{
|
|
monitors: map[string]*Monitor{
|
|
"org-1": monitor,
|
|
},
|
|
}
|
|
|
|
mtm.RemoveTenant("org-1")
|
|
if _, ok := mtm.monitors["org-1"]; ok {
|
|
t.Fatalf("expected org-1 to be removed")
|
|
}
|
|
|
|
// Ensure removal of missing orgs is a no-op.
|
|
mtm.RemoveTenant("missing")
|
|
}
|