diff options
| author | Julie Qiu <julie@golang.org> | 2019-02-27 23:51:51 -0500 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-03-27 16:46:33 -0400 |
| commit | cfb8fdf20bec34c32d3bf48706da01568406a0f8 (patch) | |
| tree | 7e5dc9fd93aab9785e2e65b000dbd1f51d816ecb /internal/postgres/postgres_test.go | |
| parent | 8f815ef30afbbfda2a9427770d8aa639f243e857 (diff) | |
| download | go-x-pkgsite-cfb8fdf20bec34c32d3bf48706da01568406a0f8.tar.xz | |
internal/cron: create proxy index cron
The proxy index cron is created, with a job to get new versions from the
module index. The cron will:
1. query the module index for new versions since a given timestamp
2. write each version to the version_logs table
3. make a request to the fetch service for each version to be
downloaded
The fetch client is also fixed to make a GET request to
https://<fetch-url>/<module>/@v/<version>.
Change-Id: I838029d94f9b2782e0c1066ec7932931b47fe01e
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/426749
Reviewed-by: Andrew Bonventre <andybons@google.com>
Diffstat (limited to 'internal/postgres/postgres_test.go')
| -rw-r--r-- | internal/postgres/postgres_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/postgres/postgres_test.go b/internal/postgres/postgres_test.go index d09a1aa5..ee60bf91 100644 --- a/internal/postgres/postgres_test.go +++ b/internal/postgres/postgres_test.go @@ -157,19 +157,19 @@ func TestPostgress_InsertVersionLogs(t *testing.T) { Name: "testModule", Version: "v.1.0.0", CreatedAt: now.Add(-10 * time.Minute), - Source: internal.VersionLogProxyIndex, + Source: internal.VersionSourceProxyIndex, }, &internal.VersionLog{ Name: "testModule", Version: "v.1.1.0", CreatedAt: now, - Source: internal.VersionLogProxyIndex, + Source: internal.VersionSourceProxyIndex, }, &internal.VersionLog{ Name: "testModule/v2", Version: "v.2.0.0", CreatedAt: now, - Source: internal.VersionLogProxyIndex, + Source: internal.VersionSourceProxyIndex, }, } |
