move server/* to scnserver/*

This commit is contained in:
2022-12-21 12:35:56 +01:00
parent 2b4d77bab4
commit bbf7962e29
123 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
package test
import (
tt "blackforestbytes.com/simplecloudnotifier/test/util"
"fmt"
"testing"
)
func TestWebserver(t *testing.T) {
_, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop()
fmt.Printf("URL := %s\n", baseUrl)
}
func TestPing(t *testing.T) {
_, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop()
_ = tt.RequestGet[tt.Void](t, baseUrl, "/api/ping")
_ = tt.RequestPut[tt.Void](t, baseUrl, "/api/ping", nil)
_ = tt.RequestPost[tt.Void](t, baseUrl, "/api/ping", nil)
_ = tt.RequestPatch[tt.Void](t, baseUrl, "/api/ping", nil)
_ = tt.RequestDelete[tt.Void](t, baseUrl, "/api/ping", nil)
}
func TestMongo(t *testing.T) {
_, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop()
_ = tt.RequestPost[tt.Void](t, baseUrl, "/api/db-test", nil)
}
func TestHealth(t *testing.T) {
_, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop()
_ = tt.RequestGet[tt.Void](t, baseUrl, "/api/health")
}