From cfd1df27be6fd41e1da94bd697b88617a114830a Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Sat, 6 Feb 2021 11:35:20 -0500 Subject: internal/postgres: read and write deprecated comment Insert the deprecated comment into the modules table, and read it back out. For golang/go#41321 Change-Id: Ib4f2c8ceb70e28940b18f52d25b2a0d05c57648d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/290098 Trust: Jonathan Amsterdam Run-TryBot: Jonathan Amsterdam TryBot-Result: kokoro Reviewed-by: Jamal Carvalho --- internal/postgres/insert_module_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/postgres/insert_module_test.go') diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index 617e7754..27d60262 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -57,6 +57,15 @@ func TestInsertModule(t *testing.T) { name: "stdlib", module: sample.Module("std", "v1.12.5", "context"), }, + { + name: "deprecated", + module: func() *internal.Module { + m := sample.DefaultModule() + c := "use v2" + m.DeprecatedComment = &c + return m + }(), + }, } { t.Run(test.name, func(t *testing.T) { defer ResetTestDB(testDB, t) -- cgit v1.3