-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5324 from oasisprotocol/peternose/trivial/reorgan…
…ize-e2e-tests go/oasis-test-runner: Reorganize e2e tests
- Loading branch information
Showing
60 changed files
with
2,683 additions
and
2,471 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common" | ||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common/flags" | ||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/debug/fixgenesis" | ||
) | ||
|
||
// DebugHelpers contains the oasis-node debug CLI helpers. | ||
type DebugHelpers struct { | ||
*helpersBase | ||
} | ||
|
||
// FixGenesis is a wrapper for "debug fix-genesis" subcommand. | ||
func (d *DebugHelpers) FixGenesis( | ||
genesisFilePath string, | ||
fixedGenesisFilePath string, | ||
) error { | ||
d.logger.Info("fixing genesis file") | ||
|
||
args := []string{ | ||
"debug", "fix-genesis", | ||
"--" + flags.CfgGenesisFile, genesisFilePath, | ||
"--" + fixgenesis.CfgNewGenesisFile, fixedGenesisFilePath, | ||
"--" + flags.CfgDebugDontBlameOasis, | ||
"--" + common.CfgDebugAllowTestKeys, | ||
} | ||
|
||
if out, err := d.runSubCommandWithOutput("debug-fix-genesis", args); err != nil { | ||
return fmt.Errorf("failed to run 'debug fix-genesis': error: %w output: %s", err, out.String()) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common" | ||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common/flags" | ||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common/grpc" | ||
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/stake" | ||
) | ||
|
||
// GenesisHelpers contains the oasis-node genesis CLI helpers. | ||
type GenesisHelpers struct { | ||
*helpersBase | ||
} | ||
|
||
// Check is a wrapper for "genesis check" subcommand. | ||
func (g *GenesisHelpers) Check( | ||
genesisFilePath string, | ||
) (string, error) { | ||
g.logger.Info("checking genesis file") | ||
|
||
args := []string{ | ||
"genesis", "check", | ||
"--" + flags.CfgGenesisFile, genesisFilePath, | ||
"--" + flags.CfgDebugDontBlameOasis, | ||
"--" + common.CfgDebugAllowTestKeys, | ||
} | ||
|
||
out, err := g.runSubCommandWithOutput("genesis-check", args) | ||
if err != nil { | ||
return "", fmt.Errorf("failed to run 'genesis check': error: %w output: %s", err, out.String()) | ||
} | ||
|
||
return out.String(), nil | ||
} | ||
|
||
// Dump is a wrapper for "genesis dump" subcommand. | ||
func (g *GenesisHelpers) Dump( | ||
genesisFilePath string, | ||
) error { | ||
g.logger.Info("dumping network state to genesis file") | ||
|
||
args := []string{ | ||
"genesis", "dump", | ||
"--" + stake.CfgHeight, "0", | ||
"--" + flags.CfgGenesisFile, genesisFilePath, | ||
"--" + grpc.CfgAddress, "unix:" + g.cfg.NodeSocketPath, | ||
} | ||
|
||
if out, err := g.runSubCommandWithOutput("genesis-dump", args); err != nil { | ||
return fmt.Errorf("failed to run 'genesis dump': error: %w output: %s", err, out.String()) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.