aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/unit_test.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-06-09 13:49:25 -0400
committerJonathan Amsterdam <jba@google.com>2021-06-10 11:02:10 +0000
commitfa03708786f2dce02a5ad581e45e997017f72ddf (patch)
treeba9e1c2da2b190fd60b2c2205a63554f0fe7eff8 /internal/postgres/unit_test.go
parentbcf7e4ea58a11d8c48c6fb54d67ad16987d46b0c (diff)
downloadgo-x-pkgsite-fa03708786f2dce02a5ad581e45e997017f72ddf.tar.xz
internal/postgres: read from imports table
Read from the imports table instead of package_imports, under an experiment. Change-Id: Id5b61285325f28a168faeb25651839663269feaf Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326450 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/unit_test.go')
-rw-r--r--internal/postgres/unit_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/postgres/unit_test.go b/internal/postgres/unit_test.go
index 64e0b57f..c60941b7 100644
--- a/internal/postgres/unit_test.go
+++ b/internal/postgres/unit_test.go
@@ -743,7 +743,12 @@ func TestGetUnit(t *testing.T) {
test.want.IsRedistributable,
)
test.want.CommitTime = um.CommitTime
- checkUnit(ctx, t, testDB, um, test.want)
+ t.Run("none", func(t *testing.T) {
+ checkUnit(ctx, t, testDB, um, test.want)
+ })
+ t.Run(internal.ExperimentReadImports, func(t *testing.T) {
+ checkUnit(ctx, t, testDB, um, test.want, internal.ExperimentReadImports)
+ })
})
}
}