fix: call referenced api/testcase with relative path

This commit is contained in:
debugtalk
2022-03-27 13:05:20 +08:00
parent cdabde4dc8
commit 41f60d254f
23 changed files with 170 additions and 436 deletions

View File

@@ -1,6 +1,7 @@
package hrp
import (
"fmt"
"sort"
"testing"
"time"
@@ -742,7 +743,7 @@ func TestParseParameters(t *testing.T) {
}{
{
map[string]interface{}{
"username-password": "${parameterize(../examples/hrp/account.csv)}",
"username-password": fmt.Sprintf("${parameterize(%s/account.csv)}", hrpExamplesDir),
"user_agent": []interface{}{"IOS/10.1", "IOS/10.2"}},
6,
},
@@ -782,17 +783,17 @@ func TestParseParametersError(t *testing.T) {
}{
{
map[string]interface{}{
"username_password": "${parameterize(../examples/hrp/account.csv)}",
"username_password": fmt.Sprintf("${parameterize(%s/account.csv)}", hrpExamplesDir),
"user_agent": []interface{}{"IOS/10.1", "IOS/10.2"}},
},
{
map[string]interface{}{
"username-password": "${parameterize(../examples/hrp/account.csv)}",
"username-password": fmt.Sprintf("${parameterize(%s/account.csv)}", hrpExamplesDir),
"user-agent": []interface{}{"IOS/10.1", "IOS/10.2"}},
},
{
map[string]interface{}{
"username-password": "${param(../examples/hrp/account.csv)}",
"username-password": fmt.Sprintf("${param(%s/account.csv)}", hrpExamplesDir),
"user_agent": []interface{}{"IOS/10.1", "IOS/10.2"}},
},
}