Skip to content

Probably ineffective code in internal/mkcw/archive_test.go:TestArchive #6662

@mtrmac

Description

@mtrmac
  • (Original motivation) The linter reports tautological condition: nil == nil after the “bail now if we got an error we didn't expect” code, the if err == nil is always true
  • It turns out ignoreChainRetrievalErrors is only consulted within the error handling, it is not an input to anything
  • If IgnoreAttestationErrors, the errors are turned into warnings, so they should never be reported to the caller; the test sees them, that’s a problem, regardless of the ignore… values
  • For any kind of completely unexpected error type, the test just returns and does not fail. This might be intentional but I see no evidence for it.

Cc: @nalind

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions