Skip to content

Commit 52eb446

Browse files
cpugopherbot
authored andcommitted
internal/imports: adjust TestStdlibSelfImports pkg
This commit switches the test to use crypto/rc4 instead of crypto/ecdsa. The crypto.ecdsa package will soon be imported into the FIPS module, producing an unexpected import of crypto/internal/fips/ecdsa by the pre-existing test. Instead, use the rc4 stdlib package. This won't be under consideration for FIPS. Change-Id: I87bcaa04efe1138aa80bf7ce88f0df74469daf4d Reviewed-on: https://go-review.googlesource.com/c/tools/+/629115 Reviewed-by: Filippo Valsorda <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Filippo Valsorda <[email protected]> Reviewed-by: Peter Weinberger <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Daniel McCarney <[email protected]> Reviewed-by: Ian Cottrell <[email protected]>
1 parent b8ff201 commit 52eb446

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/imports/fix_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1652,9 +1652,9 @@ var _ = bytes.Buffer
16521652
}
16531653

16541654
func TestStdlibSelfImports(t *testing.T) {
1655-
const input = `package ecdsa
1655+
const input = `package rc4
16561656
1657-
var _ = ecdsa.GenerateKey
1657+
var _ = rc4.NewCipher
16581658
`
16591659

16601660
testConfig{
@@ -1663,7 +1663,7 @@ var _ = ecdsa.GenerateKey
16631663
Files: fm{"x.go": "package x"},
16641664
},
16651665
}.test(t, func(t *goimportTest) {
1666-
got, err := t.processNonModule(filepath.Join(t.goroot, "src/crypto/ecdsa/foo.go"), []byte(input), nil)
1666+
got, err := t.processNonModule(filepath.Join(t.goroot, "src/crypto/rc4/foo.go"), []byte(input), nil)
16671667
if err != nil {
16681668
t.Fatalf("Process() = %v", err)
16691669
}

0 commit comments

Comments
 (0)