Start carving up RB Gateway into namespaces
Review Request #9767 — Created March 12, 2018 and submitted
RB Gateway currently only has a single namespace that is getting very
polluted. Because of this, methods that should be private aren't, since
they are accessible within the declared namespace (package main).This is the first of a series of patches to split this monolithic
package into sub-packages. This patch tackles therepositories
(néerepository.goandgit_repository.go) package, as well as adds a
helperspackage which contains all the test setup code that is used
across package boundaries.Ideally, this would only have involved the testing infrastructure
changes, but because of how go imports work, we cannot import
github.com/reviewboard/rb-gatewayfrom.../rb-gateway/helpersto
accessRepositoryet al. becauserb-gatewayis a binary and not a
library.
Ran unit tests.
| Description | From | Last Updated |
|---|---|---|
|
Replace with map literals. |
|
|
|
This is very strange. Shouldn't we just be importing "helpers"? Even better, we should probably put all of these sub-packages … |
|
|
|
Looks like it would be nice to expose the createTestConfig method that you currently have in util_test.go. |
|
|
|
I think it would be a lot cleaner to have the test functions call CreateTestRepo themselves and then pass in … |
|
- Change Summary:
-
Fix test cleanups
- Commit:
-
196fe808b5f16a41ecf96c2e08acf8e9967a6376ed67d925b18f9ffcb7ecef2f36d07828bfa49ece
- Diff:
-
Revision 2 (+394 -218)
Checks run (2 succeeded)
-
-
This is very strange. Shouldn't we just be importing
"helpers"?Even better, we should probably put all of these sub-packages into an
internaldirectory. -
Looks like it would be nice to expose the
createTestConfigmethod that you currently have inutil_test.go. -
I think it would be a lot cleaner to have the test functions call
CreateTestRepothemselves and then pass inrepo.Pathas a string to this method.
- Change Summary:
-
Fix up repo tests.
- Commit:
-
ed67d925b18f9ffcb7ecef2f36d07828bfa49ece153760f67fce5a04ee202d26007e9f365ab40d32
- Diff:
-
Revision 3 (+627 -467)