change: replace httpbin.org with docker service

This commit is contained in:
lilong.129
2023-07-22 00:18:21 +08:00
parent 52fc9c3a17
commit c712aa425e
7 changed files with 22 additions and 8 deletions

View File

@@ -12,6 +12,8 @@ import (
"github.com/stretchr/testify/assert"
)
const HTTP_BIN_URL = "http://127.0.0.1:80"
func buildHashicorpGoPlugin() {
log.Info().Msg("[init] build hashicorp go plugin")
err := BuildPlugin(tmpl("plugin/debugtalk.go"), tmpl("debugtalk.bin"))
@@ -63,7 +65,7 @@ func assertRunTestCases(t *testing.T) {
refCase := TestCasePath(demoTestCaseWithPluginJSONPath)
testcase1 := &TestCase{
Config: NewConfig("TestCase1").
SetBaseURL("https://httpbin.org"),
SetBaseURL(HTTP_BIN_URL),
TestSteps: []IStep{
NewStep("testcase1-step1").
GET("/headers").
@@ -77,7 +79,7 @@ func assertRunTestCases(t *testing.T) {
AssertEqual("headers.\"Content-Type\"", "application/json", "check http response Content-Type"),
NewStep("testcase1-step3").CallRefCase(
&TestCase{
Config: NewConfig("testcase1-step3-ref-case").SetBaseURL("https://httpbin.org"),
Config: NewConfig("testcase1-step3-ref-case").SetBaseURL(HTTP_BIN_URL),
TestSteps: []IStep{
NewStep("ip").
GET("/ip").