google-cloud-go icon indicating copy to clipboard operation
google-cloud-go copied to clipboard

spanner: third party dependency exception for github.com/stretchr/testify

Open noahdietz opened this issue 1 year ago • 2 comments

Module: spanner Usage(s): spanner/integration_test.go

For the time being, it will be exempt from the third party dep check, but please do one of the following:

A. Remove the dependency by switching to a package own directly by Google, handwriting necessary functionality, or using stdlib B. Justify the exception and ack the risks, maintaining the exception indefinitely

noahdietz avatar Feb 06 '24 01:02 noahdietz

Used in tests only.

rahul2393 avatar Feb 12 '24 06:02 rahul2393

I don't have any concerns with testify package personally, but in this case the dependency removal is trivial. i.e. https://github.com/googleapis/google-cloud-go/blob/7bf49049cdc44ca260d1c1354bc7661de9ed8585/spanner/integration_test.go#L2254

// replace
require.NoError(t, err)

// with
if err != nil {
    t.Errorf("Apply returns error %v, want nil", err)
}

EDIT: just realized that it's also used via mockery.

egonelbre avatar Apr 10 '24 13:04 egonelbre

Awesome, thank you @egonelbre

noahdietz avatar May 02 '24 15:05 noahdietz

Need to remove the exemption now, oops

noahdietz avatar May 02 '24 15:05 noahdietz