forked from forgejo/forgejo
add go functest
This commit is contained in:
parent
587e6d8089
commit
9acc1c33be
4 changed files with 19 additions and 18 deletions
17
tests/default_test.go
Normal file
17
tests/default_test.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(t *testing.T) {
|
||||
r, err := http.Get("http://localhost:3000/")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer r.Body.Close()
|
||||
if r.StatusCode != http.StatusOK {
|
||||
t.Error(r.StatusCode)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue