Skip to content

Commit

Permalink
add in missing zero-val'd errInit and errGetGen
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeph Grunschlag committed Jun 9, 2023
1 parent 92a503d commit b8fef8f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions conduit/plugins/importers/algod/algod_importer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ func TestInitCatchup(t *testing.T) {
GenesisResponder,
MakePostSyncRoundResponder(http.StatusOK),
MakeNodeStatusResponder(models.NodeStatus{LastRound: 1235})),
logs: []string{"No catchup required. Node round 1235, target round 1235, catchpoint round 1234."},
}, {
errInit: "",
errGetGen: "",
logs: []string{"No catchup required. Node round 1235, target round 1235, catchpoint round 1234."},
},
{
name: "start catchpoint catchup failure",
adminToken: "admin",
catchpoint: "1236#abcd",
Expand Down Expand Up @@ -233,7 +236,8 @@ func TestInitCatchup(t *testing.T) {
errInit: "received unexpected error getting node status: HTTP 400",
errGetGen: "",
logs: []string{},
}, {
},
{
name: "auto catchup used (even if the mocking isn't setup for it)",
adminToken: "admin",
catchpoint: "",
Expand All @@ -242,8 +246,11 @@ func TestInitCatchup(t *testing.T) {
MakePostSyncRoundResponder(http.StatusOK),
MakeJsonResponderSeries("/v2/status", []int{http.StatusOK, http.StatusBadRequest}, []interface{}{models.NodeStatus{LastRound: 1235}}),
),
logs: []string{"failed to lookup catchpoint label list"},
}, {
errInit: "",
errGetGen: "",
logs: []string{"failed to lookup catchpoint label list"},
},
{
name: "wait for node to catchup error",
adminToken: "admin",
targetRound: 1240,
Expand All @@ -256,7 +263,8 @@ func TestInitCatchup(t *testing.T) {
errInit: "received unexpected error (StatusAfterBlock) waiting for node to catchup: HTTP 400",
errGetGen: "",
logs: []string{},
}, {
},
{
name: "monitor catchup success",
adminToken: "admin",
targetRound: 1237,
Expand All @@ -273,6 +281,8 @@ func TestInitCatchup(t *testing.T) {
models.NodeStatus{LastRound: 1236},
}),
MakeMsgpStatusResponder("post", "/v2/catchup/", http.StatusOK, "")),
errInit: "",
errGetGen: "",
logs: []string{
"catchup phase Processed Accounts: 1 / 1",
"catchup phase Verified Accounts: 1 / 1",
Expand Down

0 comments on commit b8fef8f

Please sign in to comment.