mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 03:08:30 +00:00
* add web_templates render tests * add ansic strip tests * move fixtures into testdata dir which is golang specific test dir name * add server/metrics tests * add recovery test * add runtime stats test
19 lines
373 B
Go
19 lines
373 B
Go
package scheduled
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/uber-go/tally"
|
|
)
|
|
|
|
func TestRuntimeStatCollector_Run(t *testing.T) {
|
|
scope := tally.NewTestScope("test", nil)
|
|
r := NewRuntimeStats(scope)
|
|
r.Run()
|
|
|
|
expGaugeCount := 25
|
|
if len(scope.Snapshot().Gauges()) != expGaugeCount {
|
|
t.Errorf("Expected %d gauges but got %d", expGaugeCount, len(scope.Snapshot().Gauges()))
|
|
}
|
|
}
|