Skip to content

Increase coverage in NGINX config unit tests  #276

Closed
@ja20222

Description

@ja20222

There are a few areas of improvement for the unit tests for parsing nginx configs with ssl directives and cert files that could be improved:

  1. Should test other ssl directives than just ssl_certificate since there are several that are supposed to add aux files.

  2. Should provide a way to ensure the various cert metadata are being determined properly

    1. Currently, the tests use the same exact code as the production code to parse the Validity.NotBefore, Validity.NotAfter, SerialNumber, Fingerprint, SubjectKeyIdentifier, AuthorityKeyIdentifier, which means the values are not being compared against expected knowns - they are being compared to themselves

    2. See here where these properties are simply being applied to the expected data before asserting equality:

      config_helpers_test.go

  3. Consider testing other supported algorithms than just RSA - like DSA, ECDSA, EdDSA and/or ECIES

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions