Skip to content

Commit

Permalink
Reenable network creation on godog
Browse files Browse the repository at this point in the history
Signed-off-by: André Macedo <[email protected]>
  • Loading branch information
andremacedopv committed Jan 30, 2024
1 parent ad6397c commit 48f6108
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion chaincode/tests/features/createNewLibrary.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
{
Expand Down
4 changes: 2 additions & 2 deletions chaincode/tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
21 changes: 0 additions & 21 deletions chaincode/tests/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 48f6108

Please sign in to comment.