planetmint-go/tests/e2e/dao/cli_test.go
Jürgen Eckel 5d3cd51ba3
281 implement pop corner cases (#282)
* ensure PoP is always initialized even without a defined challenger and challengee
* send the MQTT PoPInit if challenger and challengee are defined
* store the challenge in any case without regarding the minting of the rewards
* structured the added test and their staging
* fixed SelectPopParticipants bug
* restore the previous pop epoch after running dao/suite.go
* avoid popInit during machine attestations (within test cases)
---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-01-17 15:37:38 +01:00

46 lines
1000 B
Go

package dao
import (
"testing"
"github.com/planetmint/planetmint-go/config"
"github.com/planetmint/planetmint-go/testutil/network"
"github.com/stretchr/testify/suite"
)
func resetConfig() {
conf := config.GetConfig()
conf.PopEpochs = config.DefaultConfig().PopEpochs
}
func TestE2ETestSuite(t *testing.T) {
cfg := network.DefaultConfig()
suite.Run(t, NewE2ETestSuite(cfg))
resetConfig()
}
func TestPopE2ETestSuite(t *testing.T) {
cfg := network.DefaultConfig()
suite.Run(t, NewPopSelectionE2ETestSuite(cfg))
resetConfig()
}
func TestGasConsumptionE2ETestSuite(t *testing.T) {
cfg := network.DefaultConfig()
suite.Run(t, NewGasConsumptionE2ETestSuite(cfg))
resetConfig()
}
func TestRestrictedMsgsE2ETestSuite(t *testing.T) {
cfg := network.DefaultConfig()
suite.Run(t, NewRestrictedMsgsE2ESuite(cfg))
resetConfig()
}
func TestAssetDistributionE2ETestSuite(t *testing.T) {
cfg := network.DefaultConfig()
suite.Run(t, NewAssetDistributionE2ETestSuite(cfg))
resetConfig()
}