test: add unit tests

This commit is contained in:
rramiachraf
2024-03-06 20:53:29 +01:00
parent c8747c0182
commit afc0347a1b
19 changed files with 358 additions and 31 deletions

View File

@ -20,7 +20,7 @@ func sendError(err error, status int, msg string, l *logrus.Logger, w http.Respo
}
}
func Instances(l *logrus.Logger) http.HandlerFunc {
func instances(l *logrus.Logger) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if instances, err := getCache[[]byte]("instances"); err == nil {
w.Header().Set("content-type", ContentTypeJSON)