diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-02-06 11:35:20 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-02-09 15:19:45 +0000 |
| commit | cfd1df27be6fd41e1da94bd697b88617a114830a (patch) | |
| tree | 14157195f0655890903882b9afe977d500ce7972 /internal/postgres/insert_module_test.go | |
| parent | f88089bebbc97760d09babe97bbc60a193ba0430 (diff) | |
| download | go-x-pkgsite-cfd1df27be6fd41e1da94bd697b88617a114830a.tar.xz | |
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 <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
| -rw-r--r-- | internal/postgres/insert_module_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
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) |
