diff --git a/cmd/main_test.go b/cmd/main_test.go index 6b2b0b9c..752da376 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -413,6 +413,11 @@ func RunService_Online24(t *testing.T) { online := service.OnlineSince(SERVICE_SINCE) assert.Equal(t, float32(80), online) + service = core.SelectService(6) + assert.NotNil(t, service) + online = service.OnlineSince(SERVICE_SINCE) + assert.Equal(t, float32(0), online) + service = core.SelectService(18) assert.NotNil(t, service) online = service.OnlineSince(SERVICE_SINCE) diff --git a/dev/mysql_seed.sql b/dev/mysql_seed.sql index fde0dcf7..0f684c9a 100644 --- a/dev/mysql_seed.sql +++ b/dev/mysql_seed.sql @@ -56,7 +56,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-29 10:42:20'), (16,0.074584583,'2018-08-29 10:42:20'), (17,0.057086551,'2018-08-29 10:42:20'), - (18,0.020983572,'2018-08-29 10:42:20'), (5,0.006504081,'2018-08-30 10:42:08'), (3,0.202164333,'2018-08-30 10:42:08'), (4,0.376675172,'2018-08-30 10:42:09'), @@ -91,7 +90,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-30 10:42:20'), (16,0.074584583,'2018-08-30 10:42:20'), (17,0.057086551,'2018-08-30 10:42:20'), - (18,0.020983572,'2018-08-30 10:42:20'), (5,0.006504081,'2018-08-31 10:42:08'), (3,0.202164333,'2018-08-31 10:42:08'), (4,0.376675172,'2018-08-31 10:42:09'), @@ -125,8 +123,7 @@ INSERT INTO hits (service,latency,created_at) VALUES (16,0.058810662,'2018-08-31 10:42:20'), (17,0.061824594,'2018-08-31 10:42:20'), (16,0.074584583,'2018-08-31 10:42:20'), - (17,0.057086551,'2018-08-31 10:42:20'), - (18,0.020983572,'2018-08-31 10:42:20'); + (17,0.057086551,'2018-08-31 10:42:20'); INSERT INTO failures (issue,method,service,created_at) VALUES ('HTTP Status Code 200 did not match 0','',18,'2018-08-28 10:42:14'), ('HTTP Status Code 200 did not match 0','',6,'2018-08-28 10:42:14'), diff --git a/dev/postgres_seed.sql b/dev/postgres_seed.sql index 529eb42e..88f84ab4 100644 --- a/dev/postgres_seed.sql +++ b/dev/postgres_seed.sql @@ -56,7 +56,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-29 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-29 10:42:20.797581163-07:00'), (17,0.057086551,'2018-08-29 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-29 10:42:20.864610424-07:00'), (5,0.006504081,'2018-08-30 10:42:08.779875117-07:00'), (3,0.202164333,'2018-08-30 10:42:08.977187173-07:00'), (4,0.376675172,'2018-08-30 10:42:09.151858662-07:00'), @@ -91,7 +90,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-30 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-30 10:42:20.797581163-07:00'), (17,0.057086551,'2018-08-30 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-30 10:42:20.864610424-07:00'), (5,0.006504081,'2018-08-31 10:42:08.779875117-07:00'), (3,0.202164333,'2018-08-31 10:42:08.977187173-07:00'), (4,0.376675172,'2018-08-31 10:42:09.151858662-07:00'), @@ -125,8 +123,7 @@ INSERT INTO hits (service,latency,created_at) VALUES (16,0.058810662,'2018-08-31 10:42:20.712087274-07:00'), (17,0.061824594,'2018-08-31 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-31 10:42:20.797581163-07:00'), - (17,0.057086551,'2018-08-31 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-31 10:42:20.864610424-07:00'); + (17,0.057086551,'2018-08-31 10:42:20.854020864-07:00'); INSERT INTO failures (issue,method,service,created_at) VALUES ('HTTP Status Code 200 did not match 0','',18,'2018-08-28 10:42:14.271162743-07:00'), ('HTTP Status Code 200 did not match 0','',6,'2018-08-28 10:42:14.271162743-07:00'), diff --git a/dev/sqlite_seed.sql b/dev/sqlite_seed.sql index dfec3b10..e4faf563 100644 --- a/dev/sqlite_seed.sql +++ b/dev/sqlite_seed.sql @@ -56,7 +56,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-29 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-29 10:42:20.797581163-07:00'), (17,0.057086551,'2018-08-29 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-29 10:42:20.864610424-07:00'), (5,0.006504081,'2018-08-30 10:42:08.779875117-07:00'), (3,0.202164333,'2018-08-30 10:42:08.977187173-07:00'), (4,0.376675172,'2018-08-30 10:42:09.151858662-07:00'), @@ -91,7 +90,6 @@ INSERT INTO hits (service,latency,created_at) VALUES (17,0.061824594,'2018-08-30 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-30 10:42:20.797581163-07:00'), (17,0.057086551,'2018-08-30 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-30 10:42:20.864610424-07:00'), (5,0.006504081,'2018-08-31 10:42:08.779875117-07:00'), (3,0.202164333,'2018-08-31 10:42:08.977187173-07:00'), (4,0.376675172,'2018-08-31 10:42:09.151858662-07:00'), @@ -125,8 +123,7 @@ INSERT INTO hits (service,latency,created_at) VALUES (16,0.058810662,'2018-08-31 10:42:20.712087274-07:00'), (17,0.061824594,'2018-08-31 10:42:20.791266761-07:00'), (16,0.074584583,'2018-08-31 10:42:20.797581163-07:00'), - (17,0.057086551,'2018-08-31 10:42:20.854020864-07:00'), - (18,0.020983572,'2018-08-31 10:42:20.864610424-07:00'); + (17,0.057086551,'2018-08-31 10:42:20.854020864-07:00'); INSERT INTO failures (issue,method,service,created_at) VALUES ('HTTP Status Code 200 did not match 0','',18,'2018-08-28 10:42:14.271162743-07:00'), ('HTTP Status Code 200 did not match 0','',6,'2018-08-28 10:42:14.271162743-07:00'),