diff --git a/chaincode/tests/features/createNewLibrary.feature b/chaincode/tests/features/createNewLibrary.feature index a4033d1..5bf5620 100644 --- a/chaincode/tests/features/createNewLibrary.feature +++ b/chaincode/tests/features/createNewLibrary.feature @@ -4,7 +4,7 @@ Feature: Create New Library I want to make a request with the name of the desired library Scenario: Create a new library - Given there is a running "" test network + Given there is a running "" test network from scratch When I make a "POST" request to "/api/invoke/createNewLibrary" on port 80 with: """ { diff --git a/chaincode/tests/main_test.go b/chaincode/tests/main_test.go index 91d2e0a..131d29e 100644 --- a/chaincode/tests/main_test.go +++ b/chaincode/tests/main_test.go @@ -11,11 +11,11 @@ import ( var opts = godog.Options{ Output: colors.Colored(os.Stdout), - Format: "progress", // can define default values + Format: "progress", } func init() { - godog.BindCommandLineFlags("godog.", &opts) // godog v0.11.0 and later + godog.BindCommandLineFlags("godog.", &opts) } func TestMain(m *testing.M) { diff --git a/chaincode/tests/request_test.go b/chaincode/tests/request_test.go index b72f128..e49de62 100644 --- a/chaincode/tests/request_test.go +++ b/chaincode/tests/request_test.go @@ -336,27 +336,6 @@ func InitializeScenario(ctx *godog.ScenarioContext) { ctx.Step(`^there are (\d+) books with prefix "([^"]*)" by author "([^"]*)"$`, thereAreBooksWithPrefixByAuthor) ctx.Step(`^the "([^"]*)" field should have size (\d+)$`, theFieldShouldHaveSize) ctx.Step(`^there is a library with name "([^"]*)"$`, thereIsALibraryWithName) - - // ctx.Before(func(ctx context.Context, sc *godog.Scenario) (context.Context, error) { - // // Start test network with 1 org only - // cmd := exec.Command("../../startDev.sh", "-n", "1") - - // _, err := cmd.Output() - - // if err != nil { - // fmt.Println(err.Error()) - // return ctx, err - // } - - // // Wait for ccapi - // err = waitForNetwork("80") - // if err != nil { - // fmt.Println(err.Error()) - // return ctx, err - // } - - // return ctx, nil - // }) } func waitForNetwork(port string) error {