From 8297a5d9b6534f37499704743ec4b69185b05a82 Mon Sep 17 00:00:00 2001 From: Mengran Lan Date: Wed, 3 Jul 2024 21:01:55 +0800 Subject: [PATCH] fix test issue --- coordinator/internal/types/prover.go | 5 +++-- coordinator/test/api_test.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/coordinator/internal/types/prover.go b/coordinator/internal/types/prover.go index 12c84a3def..52067652c0 100644 --- a/coordinator/internal/types/prover.go +++ b/coordinator/internal/types/prover.go @@ -33,8 +33,9 @@ func MakeProverType(proof_type message.ProofType) ProverType { switch proof_type { case message.ProofTypeChunk: return ProverTypeChunk - case message.ProofTypeBatch | message.ProofTypeBundle: + case message.ProofTypeBatch, message.ProofTypeBundle: return ProverTypeBatch + default: + return ProverTypeUndefined } - return ProverTypeUndefined } diff --git a/coordinator/test/api_test.go b/coordinator/test/api_test.go index 9c2f22367a..de780d91ae 100644 --- a/coordinator/test/api_test.go +++ b/coordinator/test/api_test.go @@ -332,8 +332,8 @@ func testValidProof(t *testing.T) { proofStatus := verifiedSuccess proverTask, errCode, errMsg := provers[i].getProverTask(t, proofType) - assert.Equal(t, errCode, types.Success) - assert.Equal(t, errMsg, "") + assert.Equal(t, types.Success, errCode) + assert.Equal(t, "", errMsg) assert.NotNil(t, proverTask) provers[i].submitProof(t, proverTask, proofStatus, types.Success) }