Skip to content

examples of mocking rely on internal package #266

@jeremyjjbrown

Description

@jeremyjjbrown

Please fill out the sections below to help us address your issue.

Version of AWS SDK for Go?

Latest

Version of Go (go version)?

1.11.4

What issue did you see?

examples are not usable outside of the project

Steps to reproduce

cp github.com/aws/aws-sdk-go-v2/example/service/s3/mockPaginator to your project and try to use the mocking example

$ go test -v gerrit.it.here.com/3dds/arch/nearmap/awstwo
# gerrit.it.here.com/3dds/arch/nearmap/awstwo
awstwo/mockPaginator_test.go:7:2: use of internal package github.com/aws/aws-sdk-go-v2/internal/awstesting/unit not allowed
FAIL	gerrit.it.here.com/3dds/arch/nearmap/awstwo [setup failed]

These examples are useless. And this code is basically impossible to test, so I can't meet my organizations requirements for testing if I use it. So it would be nice to have an example on how to test my code that uses aws-sdk-go-v2 that can work.

I did get past it by copying internal/awstesting/unit to my project. However, I think this is bad practice to copy dependant code by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions