diff --git a/controller/handler/badge_test.go b/controller/handler/badge_test.go index e74bc583..0660280a 100644 --- a/controller/handler/badge_test.go +++ b/controller/handler/badge_test.go @@ -94,16 +94,6 @@ func TestUptimeBadge(t *testing.T) { Path: "/api/v1/endpoints/core_backend/response-times/24h/chart.svg", ExpectedCode: http.StatusOK, }, - { // XXX: Remove this in v4.0.0 - Name: "backward-compatible-services-badge-uptime-1h", - Path: "/api/v1/services/core_frontend/uptimes/1h/badge.svg", - ExpectedCode: http.StatusOK, - }, - { // XXX: Remove this in v4.0.0 - Name: "backward-compatible-services-chart-response-time-24h", - Path: "/api/v1/services/core_backend/response-times/24h/chart.svg", - ExpectedCode: http.StatusOK, - }, } for _, scenario := range scenarios { t.Run(scenario.Name, func(t *testing.T) { diff --git a/controller/handler/chart_test.go b/controller/handler/chart_test.go index f441ad0c..f15f5e6e 100644 --- a/controller/handler/chart_test.go +++ b/controller/handler/chart_test.go @@ -58,11 +58,6 @@ func TestResponseTimeChart(t *testing.T) { Path: "/api/v1/endpoints/invalid_key/response-times/7d/chart.svg", ExpectedCode: http.StatusNotFound, }, - { // XXX: Remove this in v4.0.0 - Name: "backward-compatible-services-chart-response-time-24h", - Path: "/api/v1/services/core_backend/response-times/24h/chart.svg", - ExpectedCode: http.StatusOK, - }, } for _, scenario := range scenarios { t.Run(scenario.Name, func(t *testing.T) { diff --git a/controller/handler/endpoint_status_test.go b/controller/handler/endpoint_status_test.go index 011f53b9..5b0093b8 100644 --- a/controller/handler/endpoint_status_test.go +++ b/controller/handler/endpoint_status_test.go @@ -127,11 +127,6 @@ func TestEndpointStatus(t *testing.T) { Path: "/api/v1/endpoints/invalid_key/statuses", ExpectedCode: http.StatusNotFound, }, - { // XXX: Remove this in v4.0.0 - Name: "backward-compatible-service-status", - Path: "/api/v1/services/core_frontend/statuses", - ExpectedCode: http.StatusOK, - }, } for _, scenario := range scenarios { t.Run(scenario.Name, func(t *testing.T) { @@ -197,12 +192,6 @@ func TestEndpointStatuses(t *testing.T) { ExpectedCode: http.StatusOK, ExpectedBody: `[{"name":"name","group":"group","key":"group_name","results":[{"status":200,"hostname":"example.org","duration":150000000,"conditionResults":[{"condition":"[STATUS] == 200","success":true},{"condition":"[RESPONSE_TIME] \u003c 500","success":true},{"condition":"[CERTIFICATE_EXPIRATION] \u003c 72h","success":true}],"success":true,"timestamp":"0001-01-01T00:00:00Z"},{"status":200,"hostname":"example.org","duration":750000000,"errors":["error-1","error-2"],"conditionResults":[{"condition":"[STATUS] == 200","success":true},{"condition":"[RESPONSE_TIME] \u003c 500","success":false},{"condition":"[CERTIFICATE_EXPIRATION] \u003c 72h","success":false}],"success":false,"timestamp":"0001-01-01T00:00:00Z"}]}]`, }, - { // XXX: Remove this in v4.0.0 - Name: "backward-compatible-service-status", - Path: "/api/v1/services/statuses", - ExpectedCode: http.StatusOK, - ExpectedBody: `[{"name":"name","group":"group","key":"group_name","results":[{"status":200,"hostname":"example.org","duration":150000000,"conditionResults":[{"condition":"[STATUS] == 200","success":true},{"condition":"[RESPONSE_TIME] \u003c 500","success":true},{"condition":"[CERTIFICATE_EXPIRATION] \u003c 72h","success":true}],"success":true,"timestamp":"0001-01-01T00:00:00Z"},{"status":200,"hostname":"example.org","duration":750000000,"errors":["error-1","error-2"],"conditionResults":[{"condition":"[STATUS] == 200","success":true},{"condition":"[RESPONSE_TIME] \u003c 500","success":false},{"condition":"[CERTIFICATE_EXPIRATION] \u003c 72h","success":false}],"success":false,"timestamp":"0001-01-01T00:00:00Z"}]}]`, - }, } for _, scenario := range scenarios { diff --git a/controller/handler/handler.go b/controller/handler/handler.go index d496bbd1..c38f6dc1 100644 --- a/controller/handler/handler.go +++ b/controller/handler/handler.go @@ -33,18 +33,10 @@ func CreateRouter(staticFolder string, securityConfig *security.Config, uiConfig unprotected.HandleFunc("/v1/endpoints/{key}/uptimes/{duration}/badge.svg", UptimeBadge).Methods("GET") unprotected.HandleFunc("/v1/endpoints/{key}/response-times/{duration}/badge.svg", ResponseTimeBadge).Methods("GET") unprotected.HandleFunc("/v1/endpoints/{key}/response-times/{duration}/chart.svg", ResponseTimeChart).Methods("GET") - // XXX: Remove the lines between this and the next XXX comment in v4.0.0 - protected.HandleFunc("/v1/services/statuses", EndpointStatuses).Methods("GET") // No GzipHandler for this one, because we cache the content as Gzipped already - protected.HandleFunc("/v1/services/{key}/statuses", GzipHandlerFunc(EndpointStatus)).Methods("GET") - unprotected.HandleFunc("/v1/services/{key}/uptimes/{duration}/badge.svg", UptimeBadge).Methods("GET") - unprotected.HandleFunc("/v1/services/{key}/response-times/{duration}/badge.svg", ResponseTimeBadge).Methods("GET") - unprotected.HandleFunc("/v1/services/{key}/response-times/{duration}/chart.svg", ResponseTimeChart).Methods("GET") - // XXX: Remove the lines between this and the previous XXX comment in v4.0.0 // Misc router.Handle("/health", health.Handler().WithJSON(true)).Methods("GET") router.HandleFunc("/favicon.ico", FavIcon(staticFolder)).Methods("GET") // SPA - router.HandleFunc("/services/{name}", SinglePageApplication(staticFolder, uiConfig)).Methods("GET") // XXX: Remove this in v4.0.0 router.HandleFunc("/endpoints/{name}", SinglePageApplication(staticFolder, uiConfig)).Methods("GET") router.HandleFunc("/", SinglePageApplication(staticFolder, uiConfig)).Methods("GET") // Everything else falls back on static content diff --git a/controller/handler/spa_test.go b/controller/handler/spa_test.go index 20838f7e..7d968fa8 100644 --- a/controller/handler/spa_test.go +++ b/controller/handler/spa_test.go @@ -48,11 +48,6 @@ func TestSinglePageApplication(t *testing.T) { Path: "/endpoints/core_frontend", ExpectedCode: http.StatusOK, }, - { // XXX: Remove this in v4.0.0 - Name: "frontend-service", - Path: "/services/core_frontend", - ExpectedCode: http.StatusOK, - }, } for _, scenario := range scenarios { t.Run(scenario.Name, func(t *testing.T) { diff --git a/storage/store/store_test.go b/storage/store/store_test.go index e2828dc4..aa561ca4 100644 --- a/storage/store/store_test.go +++ b/storage/store/store_test.go @@ -579,11 +579,6 @@ func TestInitialize(t *testing.T) { Cfg: &storage.Config{Type: storage.TypeMemory}, ExpectedErr: nil, }, - { // XXX: Remove for v4.0.0. See https://github.com/TwiN/gatus/issues/198 - Name: "memory-with-path", - Cfg: &storage.Config{Type: storage.TypeMemory, Path: t.TempDir() + "/TestInitialize_memory-with-path.db"}, - ExpectedErr: nil, - }, { Name: "sqlite-no-path", Cfg: &storage.Config{Type: storage.TypeSQLite}, diff --git a/web/app/src/router/index.js b/web/app/src/router/index.js index e525d7a8..b04bbd87 100644 --- a/web/app/src/router/index.js +++ b/web/app/src/router/index.js @@ -13,10 +13,6 @@ const routes = [ name: 'Details', component: Details, }, - { // XXX: Remove in v4.0.0 - path: '/services/:key', - redirect: {name: 'Details'} - }, ]; const router = createRouter({