Skip to content

Commit

Permalink
tests: invalid reward address mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
khalifaa55 committed Jan 10, 2025
1 parent a83716e commit 592c1da
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions e2e/sedge/lidoStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestE2E_LidoStatus_InvalidRewardAddress(t *testing.T) {
e2eTest.run()
}

func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) {
func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) {
// Test context
var (
runErr error
Expand All @@ -128,7 +128,7 @@ func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) {
nil,
// Act
func(t *testing.T, binaryPath string, dataDirPath string) {
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xC870Fd7316956C1582A2c8Fd2c42552cCEC70C89", "--network", "holesky")
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0x0000000000000000000000000000000000000000", "--network", "holesky")
},
// Assert
func(t *testing.T, dataDirPath string) {
Expand All @@ -139,7 +139,7 @@ func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) {
e2eTest.run()
}

func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) {
func TestE2E_LidoStatus_ValidNodeID_Mainnet(t *testing.T) {
// Test context
var (
runErr error
Expand All @@ -151,18 +151,18 @@ func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) {
nil,
// Act
func(t *testing.T, binaryPath string, dataDirPath string) {
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0x0000000000000000000000000000000000000000", "--network", "holesky")
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "1", "--l", "--network", "mainnet")
},
// Assert
func(t *testing.T, dataDirPath string) {
assert.Error(t, runErr, "lido status command should fail")
assert.NoError(t, runErr, "lido status command should succeed with the given arguments")
},
)
// Run test case
e2eTest.run()
}

func TestE2E_LidoStatus_ValidNodeID_Mainnet(t *testing.T) {
func TestE2E_LidoStatus_InvalidNodeID_Mainnet(t *testing.T) {
// Test context
var (
runErr error
Expand All @@ -174,18 +174,19 @@ func TestE2E_LidoStatus_ValidNodeID_Mainnet(t *testing.T) {
nil,
// Act
func(t *testing.T, binaryPath string, dataDirPath string) {
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "1", "--l", "--network", "mainnet")
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "-30", "--l", "--network", "mainnet")
},
// Assert
func(t *testing.T, dataDirPath string) {
assert.NoError(t, runErr, "lido status command should succeed with the given arguments")
// Node ID can't be a negative value
assert.Error(t, runErr, "lido status command should fail")
},
)
// Run test case
e2eTest.run()
}

func TestE2E_LidoStatus_InvalidNodeID_Mainnet(t *testing.T) {
func TestE2E_LidoStatus_InvalidRewardAddress_Mainnet(t *testing.T) {
// Test context
var (
runErr error
Expand All @@ -197,19 +198,18 @@ func TestE2E_LidoStatus_InvalidNodeID_Mainnet(t *testing.T) {
nil,
// Act
func(t *testing.T, binaryPath string, dataDirPath string) {
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "-30", "--l", "--network", "mainnet")
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xccbhk45", "--network", "mainnet")
},
// Assert
func(t *testing.T, dataDirPath string) {
// Node ID can't be a negative value
assert.Error(t, runErr, "lido status command should fail")
},
)
// Run test case
e2eTest.run()
}

func TestE2E_LidoStatus_InvalidRewardAddress_Mainnet(t *testing.T) {
func TestE2E_LidoStatus_RewardAddressNotFound_Mainnet(t *testing.T) {
// Test context
var (
runErr error
Expand All @@ -221,7 +221,7 @@ func TestE2E_LidoStatus_InvalidRewardAddress_Mainnet(t *testing.T) {
nil,
// Act
func(t *testing.T, binaryPath string, dataDirPath string) {
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xccbhk45", "--network", "mainnet")
runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xC870Fd7316956C1582A2c8Fd2c42552cCEC70C89", "--network", "mainnet")
},
// Assert
func(t *testing.T, dataDirPath string) {
Expand Down

0 comments on commit 592c1da

Please sign in to comment.