e2e: add contexts and e2e generator tests (#9426)

This commit is contained in:
Callum Waters
2022-11-10 12:29:59 +01:00
committed by GitHub
parent 4f3e87b2e4
commit f8e453a245
14 changed files with 196 additions and 89 deletions
+2 -2
View File
@@ -124,8 +124,8 @@ type ManifestNode struct {
SnapshotInterval uint64 `toml:"snapshot_interval"`
// RetainBlocks specifies the number of recent blocks to retain. Defaults to
// 0, which retains all blocks. Must be greater that PersistInterval and
// SnapshotInterval.
// 0, which retains all blocks. Must be greater that PersistInterval,
// SnapshotInterval and EvidenceAgeHeight.
RetainBlocks uint64 `toml:"retain_blocks"`
// Perturb lists perturbations to apply to the node after it has been
+5
View File
@@ -105,6 +105,11 @@ func LoadTestnet(file string) (*Testnet, error) {
if err != nil {
return nil, err
}
return NewTestnetFromManifest(manifest, file)
}
// NewTestnetFromManifest creates and validates a testnet from a manifest
func NewTestnetFromManifest(manifest Manifest, file string) (*Testnet, error) {
dir := strings.TrimSuffix(file, filepath.Ext(file))
// Set up resource generators. These must be deterministic.