mirror of https://github.com/statping/statping
tests
parent
ef42b386cd
commit
70276d490d
|
@ -163,12 +163,6 @@ func TestUpdateCLI(t *testing.T) {
|
||||||
assert.Contains(t, gg, "version")
|
assert.Contains(t, gg, "version")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTestPackageCLI(t *testing.T) {
|
|
||||||
t.SkipNow()
|
|
||||||
run := catchCLI([]string{"test", "plugins"})
|
|
||||||
assert.EqualError(t, run, "end")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestHelpCLI(t *testing.T) {
|
func TestHelpCLI(t *testing.T) {
|
||||||
run := catchCLI([]string{"help"})
|
run := catchCLI([]string{"help"})
|
||||||
assert.EqualError(t, run, "end")
|
assert.EqualError(t, run, "end")
|
||||||
|
|
|
@ -3,13 +3,11 @@ package handlers
|
||||||
import (
|
import (
|
||||||
"github.com/statping/statping/notifiers"
|
"github.com/statping/statping/notifiers"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAttachment(t *testing.T) {
|
func TestAttachment(t *testing.T) {
|
||||||
err := notifiers.Migrate()
|
notifiers.InitNotifiers()
|
||||||
require.Nil(t, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestApiNotifiersRoutes(t *testing.T) {
|
func TestApiNotifiersRoutes(t *testing.T) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ func TestService_AvgTime(t *testing.T) {
|
||||||
item, err := Find(1)
|
item, err := Find(1)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
assert.Equal(t, "", item.AvgTime())
|
assert.Equal(t, int64(123456), item.AvgTime())
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestService_HitsSince(t *testing.T) {
|
func TestService_HitsSince(t *testing.T) {
|
||||||
|
@ -192,7 +192,7 @@ func TestService_OnlineDaysPercent(t *testing.T) {
|
||||||
|
|
||||||
amount := item.OnlineDaysPercent(1)
|
amount := item.OnlineDaysPercent(1)
|
||||||
|
|
||||||
assert.Equal(t, "", amount)
|
assert.Equal(t, float32(33.33), amount)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestService_Downtime(t *testing.T) {
|
func TestService_Downtime(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue