Skip to content

#704 Add more tests to increase test coverage#755

Merged
AzizMukhtorjonov merged 17 commits into
zigbee-alliance:masterfrom
Abdulbois:#704-Improve-test-coverage
Jul 6, 2026
Merged

#704 Add more tests to increase test coverage#755
AzizMukhtorjonov merged 17 commits into
zigbee-alliance:masterfrom
Abdulbois:#704-Improve-test-coverage

Conversation

@Abdulbois

@Abdulbois Abdulbois commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator
  • Introduce two new error codes in the PKI module
  • Add more tests to reach 90% coverage
  • Set min coverage to 90%
  • Include URL liveness check tests in the coverage report

Closes #704

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
… offline tests, and clean up unused code.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
… into coverage report.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…overage threshold to 90%, and update dependencies.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…script.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
@Abdulbois Abdulbois marked this pull request as ready for review June 27, 2026 08:52
…er with non-CRL `DataFields`.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…catesBySubject` with offline and error scenarios.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…rs with extensive negative scenarios.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…ve scenarios, including invalid certificates, self-signed CRLs, and mismatched model versions.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…9Cert`, and validator handlers with additional edge and negative scenarios.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…ve scenarios involving invalid parent certificates.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Comment thread .github/workflows/verify.yml
Comment thread x/dclupgrade/types/message_propose_upgrade_test.go Outdated
Comment thread x/dclupgrade/types/message_propose_upgrade_test.go Outdated
Comment thread x/dclupgrade/types/message_propose_upgrade_test.go Outdated
Comment thread x/dclupgrade/types/message_propose_upgrade_test.go
Comment thread x/pki/keeper/all_certificates_test.go Outdated
Comment thread x/pki/tests/handler_add_pai_cert_test.go Outdated
Comment thread x/pki/tests/handler_propose_paa_cert_test.go Outdated
Comment thread x/pki/tests/handler_update_revocation_test.go Outdated
Comment thread x/validator/keeper/iterate_test.go

func TestSetLastValidatorPower_PanicsOnInvalidOwner(t *testing.T) {
k, ctx := testkeeper.ValidatorKeeper(t, nil)
require.Panics(t, func() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should expect Panic here....

@Abdulbois Abdulbois Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should panic on invalid bech32 address, see SetLastValidatorPower (last_validator_power.go:14-17)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean there are cases when we expect our node to crash? Please double-check if the business logic is correct here

@Abdulbois Abdulbois Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Business logic was built by following the cosmos-sdk(0.47.8) convention

Also, the SetLastValidatorPower second arg lastValidatorPower(LastValidatorPower) is constructed via types.NewLastValidatorPower(owner sdk.ValAddress), from already valid bech32 address

Abdulbois added 3 commits July 6, 2026 14:40
…dlers and tests

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…nt_NonCRL_DataFields` and improve assertions for `VVSC chain verification failed` and handler responses in PKI, validator, and upgrade tests.

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
…g and update related tests and messages

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
@Abdulbois Abdulbois requested a review from ashcherbakov July 6, 2026 10:41
@AzizMukhtorjonov AzizMukhtorjonov merged commit abf6933 into zigbee-alliance:master Jul 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve test coverage

3 participants