Skip to content

testify mock linked in the final binary #3598

@kruskall

Description

@kruskall

Describe the bug

testify is a test dependencies and should not be used outside tests

The dependency is currently linked in the final binary.

I suspect this is caused by mocks being defined in non-test packages and in non-test files. The github.com/stretchr/testify/mock.init symbol is linked in the binary likely due to the import causing the call to the init method

Preconditions
Environment state and/or platform-specific configurations.

To Reproduce
Write the exact actions one should perform in order to reproduce the bug.
Steps to reproduce the behavior:

  1. build cloudbeat
  2. go version -m cloudbeat
  3. observe testify in the dependency list

Expected behavior

testify is not included in the final binary

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:Cloud SecurityCloud Security team relatedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions