Add basic nomad integration and runner provider

This commit is contained in:
Maximilian Paß
2021-05-04 13:04:37 +02:00
parent 40a22ecbb1
commit c092199693
24 changed files with 1141 additions and 34 deletions

View File

@@ -1,7 +1,6 @@
package api
import (
"encoding/json"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
@@ -15,10 +14,5 @@ func TestHealthRoute(t *testing.T) {
}
recorder := httptest.NewRecorder()
http.HandlerFunc(Health).ServeHTTP(recorder, request)
result := Message{}
_ = json.Unmarshal(recorder.Body.Bytes(), &result)
assert.Equal(t, http.StatusOK, recorder.Code)
assert.Equal(t, "application/json", recorder.Header().Get("Content-Type"))
assert.Equal(t, "I'm alive!", result.Message)
assert.Equal(t, http.StatusNoContent, recorder.Code)
}