1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-10 07:42:27 +08:00

test: add parallel running for all unit test functions

This commit is contained in:
dudaodong
2023-06-30 10:18:45 +08:00
parent ab364744b6
commit 8229de2f10
15 changed files with 480 additions and 16 deletions

View File

@@ -126,6 +126,8 @@ func TestHttpDelete(t *testing.T) {
}
func TestConvertMapToQueryString(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestConvertMapToQueryString")
var m = map[string]any{
@@ -133,6 +135,7 @@ func TestConvertMapToQueryString(t *testing.T) {
"a": 1,
"b": 2,
}
assert.Equal("a=1&b=2&c=3", ConvertMapToQueryString(m))
}
@@ -163,6 +166,8 @@ func TestParseResponse(t *testing.T) {
}
func TestHttpClient_Get(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestHttpClient_Get")
request := &HttpRequest{
@@ -218,6 +223,8 @@ func TestHttpClent_Post(t *testing.T) {
}
func TestStructToUrlValues(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestStructToUrlValues")
type TodoQuery struct {