Skip to content

Commit

Permalink
hotfix: fix controller panic (#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren authored May 24, 2023
1 parent e1b4bef commit c7dfad9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions server/http/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,16 +537,19 @@ func (c *controller) executeTransaction(ctx context.Context, transaction tests.T
resp, err := c.doCreateTransaction(ctx, transaction)
if err != nil {
if errors.Is(err, errTransactionExists) {
resp, err := c.doUpdateTransaction(ctx, transaction.ID, transaction)
resp, err = c.doUpdateTransaction(ctx, transaction.ID, transaction)
if err != nil {
return resp, err
}
} else {
return resp, err
}
} else {
// the transaction was created, make sure we have the correct ID
transaction = resp.Body.(tests.Transaction)
}

transactionID := resp.Body.(tests.Transaction).ID
transactionID := transaction.ID

// transaction ready, execute it
resp, err = c.RunTransaction(ctx, transactionID.String(), runInfo)
Expand Down
2 changes: 1 addition & 1 deletion testing/server-tracetesting/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if ! command -v "$TRACETEST_CLI" &> /dev/null; then
exit 2
fi

export TARGET_URL=${TARGET_URL:-"http://localhost:8081"}
export TARGET_URL=${TARGET_URL:-"http://localhost:11633"}
if [ "$TARGET_URL" = "" ]; then
echo "\$TARGET_URL not set";
exit 2
Expand Down

0 comments on commit c7dfad9

Please sign in to comment.