Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const (
"value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACrHa8J7XPiLun7WZjdXyY7RZfWJT5n5NDnPq8T5Vtf9g=="
}
}`

// reasonRolloutComplete is the RolloutInProgress condition reason the SND
// controller stamps on a finished rollout (see nodedeployment/plan.go).
reasonRolloutComplete = "RolloutComplete"
)

// TestInPlaceRollout_BYOValidator_NoOperatorKeyring drives an image bump on
Expand Down Expand Up @@ -140,6 +144,6 @@ func TestInPlaceRollout_BYOValidator_NoOperatorKeyring(t *testing.T) {
latest.Status.Rollout == nil &&
cond != nil &&
cond.Status == metav1.ConditionFalse &&
cond.Reason == "RolloutComplete"
cond.Reason == reasonRolloutComplete
}, "SND rollout completes for the BYO validator (no operatorKeyring)")
}
12 changes: 7 additions & 5 deletions internal/planner/node_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const (
testSidecarImageV1 = "ghcr.io/sei-protocol/seictl@sha256:1111"
testSidecarImageV2 = "ghcr.io/sei-protocol/seictl@sha256:2222"
testSidecarOverrideV = "ghcr.io/sei-protocol/seictl@sha256:3333"
testSigningKeySecret = "validator-0-key"
testNodeKeySecret = "validator-0-nodekey"
)

func platformWithSidecar(image string) platform.Config {
Expand Down Expand Up @@ -333,10 +335,10 @@ func TestValidatorPlanner_ImageDrift_GatesOnDeclaredKeysOnly(t *testing.T) {
node.Spec.FullNode = nil
node.Spec.Validator = &seiv1alpha1.ValidatorSpec{
SigningKey: &seiv1alpha1.SigningKeySource{
Secret: &seiv1alpha1.SecretSigningKeySource{SecretName: "validator-0-key"},
Secret: &seiv1alpha1.SecretSigningKeySource{SecretName: testSigningKeySecret},
},
NodeKey: &seiv1alpha1.NodeKeySource{
Secret: &seiv1alpha1.SecretNodeKeySource{SecretName: "validator-0-nodekey"},
Secret: &seiv1alpha1.SecretNodeKeySource{SecretName: testNodeKeySecret},
},
}
node.Spec.Image = testImageV2
Expand Down Expand Up @@ -370,10 +372,10 @@ func TestValidatorPlanner_ImageDrift_IncludesOperatorKeyringGateWhenSet(t *testi
node.Spec.FullNode = nil
node.Spec.Validator = &seiv1alpha1.ValidatorSpec{
SigningKey: &seiv1alpha1.SigningKeySource{
Secret: &seiv1alpha1.SecretSigningKeySource{SecretName: "validator-0-key"},
Secret: &seiv1alpha1.SecretSigningKeySource{SecretName: testSigningKeySecret},
},
NodeKey: &seiv1alpha1.NodeKeySource{
Secret: &seiv1alpha1.SecretNodeKeySource{SecretName: "validator-0-nodekey"},
Secret: &seiv1alpha1.SecretNodeKeySource{SecretName: testNodeKeySecret},
},
OperatorKeyring: &seiv1alpha1.OperatorKeyringSource{
Secret: &seiv1alpha1.SecretOperatorKeyringSource{
Expand Down Expand Up @@ -419,7 +421,7 @@ func TestValidatorPlanner_ImageDrift_GenesisCeremonyRunning_NoGates(t *testing.T
GenesisCeremony: &seiv1alpha1.GenesisCeremonyNodeConfig{
ChainID: "atlantic-2",
StakingAmount: "10000000usei",
AccountBalance: "1000000usei",
AccountBalance: testAccountBalance,
},
}
node.Spec.Image = testImageV2
Expand Down
Loading