mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
add go functest
This commit is contained in:
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user