mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-27 08:47:10 +08:00
change: replace with assert err nil
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
hrp "github.com/httprunner/httprunner/v5"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -155,20 +156,12 @@ var demoTestCaseWithoutPlugin = &hrp.TestCase{
|
||||
|
||||
func TestGenDemoTestCase(t *testing.T) {
|
||||
err := demoTestCaseWithPlugin.Dump2JSON(demoTestCaseWithPluginJSONPath)
|
||||
if err != nil {
|
||||
t.Fatal()
|
||||
}
|
||||
assert.Nil(t, err)
|
||||
err = demoTestCaseWithPlugin.Dump2YAML(demoTestCaseWithPluginYAMLPath)
|
||||
if err != nil {
|
||||
t.Fatal()
|
||||
}
|
||||
assert.Nil(t, err)
|
||||
|
||||
err = demoTestCaseWithoutPlugin.Dump2JSON(demoTestCaseWithoutPluginJSONPath)
|
||||
if err != nil {
|
||||
t.Fatal()
|
||||
}
|
||||
assert.Nil(t, err)
|
||||
err = demoTestCaseWithoutPlugin.Dump2YAML(demoTestCaseWithoutPluginYAMLPath)
|
||||
if err != nil {
|
||||
t.Fatal()
|
||||
}
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user