Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Fix test defer
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaubennassar committed Sep 29, 2023
1 parent 85dbd26 commit 4436d84
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ func TestEthTransfer(t *testing.T) {
t.Skip()
}
ctx := context.Background()
startCmd := exec.Command("make", "run")
stopCmd := exec.Command("make", "stop")
defer func() { stopCmd.Run() }()
msg, err := stopCmd.CombinedOutput()
defer func() {
msg, err := exec.Command("make", "stop").CombinedOutput()
require.NoError(t, err, string(msg))
}()
msg, err := exec.Command("make", "stop").CombinedOutput()
require.NoError(t, err, string(msg))
msg, err = startCmd.CombinedOutput()
msg, err = exec.Command("make", "run").CombinedOutput()
require.NoError(t, err, string(msg))
time.Sleep(5 * time.Second)

Expand Down

0 comments on commit 4436d84

Please sign in to comment.