Files
Beszel/internal/hub/hub_test_helpers.go
T
Tomas Dvorak 8011d487f1 Add public monitoring features and CI updates
- Add status pages, incidents, badges, maintenance, bulk ops, and metrics
- Add Docker packaging, env example, and frontend routes
- Refresh GitHub workflows and project metadata
2026-04-27 11:10:18 +02:00

39 lines
928 B
Go

//go:build testing
package hub
import (
"github.com/henrygd/beszel/internal/hub/domains"
"github.com/henrygd/beszel/internal/hub/monitors"
"github.com/henrygd/beszel/internal/hub/systems"
)
// TESTING ONLY: GetSystemManager returns the system manager
func (h *Hub) GetSystemManager() *systems.SystemManager {
return h.sm
}
// TESTING ONLY: GetPubkey returns the public key
func (h *Hub) GetPubkey() string {
return h.pubKey
}
// TESTING ONLY: SetPubkey sets the public key
func (h *Hub) SetPubkey(pubkey string) {
h.pubKey = pubkey
}
func (h *Hub) SetCollectionAuthSettings() error {
return setCollectionAuthSettings(h)
}
// TESTING ONLY: GetDomainScheduler returns the domain scheduler
func (h *Hub) GetDomainScheduler() *domains.Scheduler {
return h.domainSched
}
// TESTING ONLY: GetMonitorScheduler returns the monitor scheduler
func (h *Hub) GetMonitorScheduler() *monitors.Scheduler {
return h.monSched
}