-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/frontend: move fetchserver and versions to their own packages
Moving fetchserver to its own package will allow us to to move the fetch logic, which isn't used by cmd/pkgsite because it doesn't have a postgres database, out of the frontend and pkgsite. The tests, which depend on a postgres database are moved out too, removing a few users of the postgres database in the tests. The versions code is moved into its own package as well so it can be used by the fetchserver code without depending on the frontend package. Most of server_test.go, which was testing features that are provided by what is now the FetchServer has been moved to the fetchserver package. To ensure that git properly realizes it as a move, the rest of server_test has been moved to frontend_test. In some cases I made copies of functions (absoluteTime, insertTestModules) instead of creating intermediate packages to contain them. For golang/go#61399 Change-Id: Ic94419f9d75f766e289cc3fb9a1521173cefb4d1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/519335 Reviewed-by: Robert Findley <[email protected]> kokoro-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Michael Matloob <[email protected]>
- Loading branch information
Showing
31 changed files
with
536 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.