Skip to content

Commit a3e137e

Browse files
author
Tony Zhang
committed
adding back cleannetworkhard cmd
1 parent 70516b3 commit a3e137e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

tests/e2e/commands/network.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ func CleanNetwork() (string, error) {
3030
return output, err
3131
}
3232

33+
func CleanNetworkHard() (string, error) {
34+
output, err := utils.TestCommand(
35+
NetworkCmd,
36+
"clean",
37+
[]string{
38+
"--hard",
39+
"--" + constants.SkipUpdateFlag,
40+
},
41+
utils.GlobalFlags{},
42+
utils.TestFlags{},
43+
)
44+
if err != nil {
45+
fmt.Println(output)
46+
utils.PrintStdErr(err)
47+
}
48+
return output, err
49+
}
50+
3351
/* #nosec G204 */
3452
func StartNetwork() string {
3553
return StartNetworkWithParams(map[string]string{

tests/e2e/testcases/network/clean/suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var _ = ginkgo.Describe("[Local Network] Clean", ginkgo.Ordered, func() {
3333
out := commands.StartNetwork()
3434
gomega.Expect(out).Should(gomega.ContainSubstring("Network ready to use"))
3535

36-
out, err := commands.CleanNetwork()
36+
_, err := commands.CleanNetworkHard()
3737
gomega.Expect(err).Should(gomega.BeNil())
3838

3939
// check if binaries are removed

0 commit comments

Comments
 (0)