diff options
Diffstat (limited to 'internal/postgres/insert_module_test.go')
| -rw-r--r-- | internal/postgres/insert_module_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index 5b26656c..981e7780 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -24,6 +24,7 @@ import ( "golang.org/x/pkgsite/internal" "golang.org/x/pkgsite/internal/database" "golang.org/x/pkgsite/internal/derrors" + "golang.org/x/pkgsite/internal/experiment" "golang.org/x/pkgsite/internal/licenses" "golang.org/x/pkgsite/internal/source" "golang.org/x/pkgsite/internal/stdlib" @@ -659,7 +660,15 @@ func TestIsAlternativeModulePath(t *testing.T) { func TestReInsertLatestVersion(t *testing.T) { t.Parallel() - ctx := context.Background() + t.Run("package_imports", func(t *testing.T) { + testReInsertLatestVersion(t, context.Background()) + }) + t.Run("imports", func(t *testing.T) { + testReInsertLatestVersion(t, experiment.NewContext(context.Background(), internal.ExperimentReadImports)) + }) +} + +func testReInsertLatestVersion(t *testing.T, ctx context.Context) { testDB, release := acquire(t) defer release() |
