diff --git a/tests/integration/cli/query.go b/tests/integration/cli/query.go index 383ecd9b0..bb067784a 100644 --- a/tests/integration/cli/query.go +++ b/tests/integration/cli/query.go @@ -125,7 +125,6 @@ func QueryTxn(hash string) (sdk.TxResponse, error) { var resp sdk.TxResponse err = helpers.Codec.UnmarshalJSON([]byte(res), &resp) - if err != nil { return sdk.TxResponse{}, err } diff --git a/tests/integration/cli_diddoc_negative_test.go b/tests/integration/cli_diddoc_negative_test.go index 21cd4732b..ad2461aa0 100644 --- a/tests/integration/cli_diddoc_negative_test.go +++ b/tests/integration/cli_diddoc_negative_test.go @@ -107,9 +107,11 @@ var _ = Describe("cheqd cli - negative did", func() { // c. missing payload, account _, err = cli.CreateDidDoc(tmpDir, didcli.DIDDocument{}, signInputs2, "", "", helpers.GenerateFees(feeParams.CreateDid.String())) + Expect(err).ToNot(BeNil()) // d. missing sign inputs, account _, err = cli.CreateDidDoc(tmpDir, payload2, []didcli.SignInput{}, "", "", helpers.GenerateFees(feeParams.CreateDid.String())) + Expect(err).ToNot(BeNil()) // e. missing payload _, err = cli.CreateDidDoc(tmpDir, didcli.DIDDocument{}, signInputs2, "", testdata.BASE_ACCOUNT_2, helpers.GenerateFees(feeParams.CreateDid.String())) @@ -145,6 +147,7 @@ var _ = Describe("cheqd cli - negative did", func() { PrivKey: privKey, }, }, "", testdata.BASE_ACCOUNT_2, helpers.GenerateFees(feeParams.CreateDid.String())) + Expect(err).ToNot(BeNil()) AddReportEntry("Integration", fmt.Sprintf("%sNegative: %s", cli.Purple, "cannot create diddoc with non-supported VM type")) // Fail to create a new DID Doc with non-supported VM type diff --git a/tests/integration/cli_diddoc_pricing_test.go b/tests/integration/cli_diddoc_pricing_test.go index 3c3796060..a23b02b7d 100644 --- a/tests/integration/cli_diddoc_pricing_test.go +++ b/tests/integration/cli_diddoc_pricing_test.go @@ -1,5 +1,3 @@ -//go:build integration - package integration import ( @@ -85,7 +83,10 @@ var _ = Describe("cheqd cli - positive diddoc pricing", func() { Expect(diff).To(Equal(tax.Amount)) By("exporting a readable tx event log") - events := helpers.ReadableEvents(res.Events) + txResp, err := cli.QueryTxn(res.TxHash) + Expect(err).To(BeNil()) + + events := helpers.ReadableEvents(txResp.Events) By("ensuring the events contain the expected tax event") Expect(events).To(ContainElement( @@ -166,7 +167,10 @@ var _ = Describe("cheqd cli - positive diddoc pricing", func() { Expect(diff).To(Equal(tax.Amount)) By("exporting a readable tx event log") - events := helpers.ReadableEvents(res.Events) + txResp, err := cli.QueryTxn(res.TxHash) + Expect(err).To(BeNil()) + + events := helpers.ReadableEvents(txResp.Events) By("ensuring the events contain the expected tax event") Expect(events).To(ContainElement( @@ -237,7 +241,10 @@ var _ = Describe("cheqd cli - positive diddoc pricing", func() { Expect(diff).To(Equal(tax.Amount)) By("exporting a readable tx event log") - events := helpers.ReadableEvents(res.Events) + txResp, err := cli.QueryTxn(res.TxHash) + Expect(err).To(BeNil()) + + events := helpers.ReadableEvents(txResp.Events) By("ensuring the events contain the expected tax event") Expect(events).To(ContainElement( diff --git a/tests/integration/cli_resource_negative_test.go b/tests/integration/cli_resource_negative_test.go index 6cf5de9a7..ca3fdb3ba 100644 --- a/tests/integration/cli_resource_negative_test.go +++ b/tests/integration/cli_resource_negative_test.go @@ -124,6 +124,7 @@ var _ = Describe("cheqd cli - negative resource", func() { Version: resourceVersion, ResourceType: resourceType, }, signInputs, resourceFile, testdata.BASE_ACCOUNT_1, helpers.GenerateFees(resourceFeeParams.Json.String())) + Expect(err).ToNot(BeNil()) // b. missing resource id - works because it is generated by the cli _, err = cli.CreateResource(tmpDir, resourcetypes.MsgCreateResourcePayload{ diff --git a/tests/integration/cli_resource_pricing_negative_test.go b/tests/integration/cli_resource_pricing_negative_test.go index 188114af7..f054082f1 100644 --- a/tests/integration/cli_resource_pricing_negative_test.go +++ b/tests/integration/cli_resource_pricing_negative_test.go @@ -316,6 +316,7 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { By("querying the fee payer account balance after the transaction") balanceAfter, err := cli.QueryBalance(testdata.BASE_ACCOUNT_4_ADDR, resourcetypes.BaseMinimalDenom) + Expect(err).ToNot(BeNil()) By("checking that the fee payer account balance has been decreased by the tax") diff := balanceBefore.Amount.Sub(balanceAfter.Amount) @@ -349,6 +350,7 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { By("querying the fee payer account balance after the transaction") balanceAfter, err := cli.QueryBalance(testdata.BASE_ACCOUNT_4_ADDR, resourcetypes.BaseMinimalDenom) + Expect(err).ToNot(BeNil()) By("checking that the fee payer account balance has been decreased by the tax") diff := balanceBefore.Amount.Sub(balanceAfter.Amount) @@ -382,6 +384,7 @@ var _ = Describe("cheqd cli - negative resource pricing", func() { By("querying the fee payer account balance after the transaction") balanceAfter, err := cli.QueryBalance(testdata.BASE_ACCOUNT_4_ADDR, resourcetypes.BaseMinimalDenom) + Expect(err).ToNot(BeNil()) By("checking that the fee payer account balance has been decreased by the tax") diff := balanceBefore.Amount.Sub(balanceAfter.Amount)