Web dashboard, task release, logs api

This commit is contained in:
simon987
2019-01-21 20:16:30 -05:00
parent 0346dd8b6b
commit cbd32daf02
65 changed files with 13430 additions and 114 deletions

28
test/api_index_test.go Normal file
View File

@@ -0,0 +1,28 @@
package test
import (
"encoding/json"
"io/ioutil"
"src/task_tracker/api"
"testing"
)
func TestIndex(t *testing.T) {
r := Get("/")
body, _ := ioutil.ReadAll(r.Body)
var info api.Info
err := json.Unmarshal(body, &info)
if err != nil {
t.Error(err.Error())
}
if len(info.Name) <= 0 {
t.Error()
}
if len(info.Version) <= 0 {
t.Error()
}
}