Skip to content

Improve testBadOptions code coverage #4019

@gmlewis

Description

@gmlewis

For methods that contain a string type for one of their parameters, it is easy to add a testBadOptions call to their test functions in order to improve code coverage. For those that don't, it's not as easy.

Looking at #4016, it dawned on me that if a method has no string args but takes an opts parameter that has URL struct tags where at least one of them is of type string, that it may be possible to still call testBadOptions and change one or more of these strings to newlines (\n) in order to create malformed URL strings.

I'm opening this issue to test out this theory and see if code coverage can be improved across the entire repo based on this realization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions