Skip to content

Guidance could be provided on where to put tests in library directories #191

@mancini0

Description

@mancini0

Hello,

Coming from a java background (where we put source code in /src/main/my/package, and tests in src/test/my/package), it's not obvious to me how Gophers typically structure their tests. Looking at istio's source, I see a test sub directory "pkg/test", but I also see tests directly in the pkg/ level:
For example: https://github.com/istio/istio/blob/master/pkg/channels/unbounded_test.go, https://github.com/istio/istio/blob/master/pkg/channels/unbounded.go.

Perhaps a contributor to this repository can provide their opinion on where tests belong in the pkg directory's README?

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