internal/worker: delete TestV1Path
V1Path is not a field on Unit, so this test is deleted. This database
value is tested in internal/postgres.
For golang/go#39629
Change-Id: Ic2611a4d7750959ec6a9130c428fcc849ead234b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258310
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/worker/fetch_test.go b/internal/worker/fetch_test.go
index 21888c4..2699230 100644
--- a/internal/worker/fetch_test.go
+++ b/internal/worker/fetch_test.go
@@ -6,7 +6,6 @@
import (
"context"
- "net/http"
"sort"
"strings"
"testing"
@@ -56,31 +55,6 @@
var html = testconversions.MakeHTMLForTest
-func TestFetch_V1Path(t *testing.T) {
- ctx, cancel := context.WithTimeout(context.Background(), testTimeout)
- defer cancel()
- defer postgres.ResetTestDB(testDB, t)
- proxyClient, tearDown := proxy.SetupTestClient(t, []*proxy.Module{
- {
- ModulePath: sample.ModulePath,
- Version: sample.VersionString,
- Files: map[string]string{
- "foo.go": "package foo\nconst Foo = 41",
- "LICENSE": testhelper.MITLicense,
- },
- },
- })
- defer tearDown()
- fetchAndCheckStatus(ctx, t, proxyClient, sample.ModulePath, sample.VersionString, http.StatusOK)
- pkg, err := testDB.LegacyGetPackage(ctx, sample.ModulePath, internal.UnknownModulePath, sample.VersionString)
- if err != nil {
- t.Fatal(err)
- }
- if got, want := pkg.V1Path, sample.ModulePath; got != want {
- t.Errorf("V1Path = %q, want %q", got, want)
- }
-}
-
func TestFetchAndUpdateState(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), testTimeout)
defer cancel()