Allow use server.go for testing against local site

Gerrit had 2 different ways to serve files locally:
- start server.go web server
- start gerrit binary with --polygerrit-dev flag

Both implementations did the same handling for local files.

This change removes --polygerrit-dev flag and related java
implementation and instead a new option --dev-cdn is added.
This option enables using cdn for static content.

Change-Id: I40d4c6c048de018bc6d856c889d7ec59592282ed
This commit is contained in:
Dmitrii Filippov
2020-02-11 17:12:14 +01:00
parent b0876e8aa3
commit f363ad89ae
10 changed files with 57 additions and 335 deletions

View File

@@ -181,7 +181,7 @@ public class InMemoryModule extends FactoryModule {
// support Path-based Configs, only FileBasedConfig.
bind(Path.class).annotatedWith(SitePath.class).toInstance(Paths.get("."));
bind(Config.class).annotatedWith(GerritServerConfig.class).toInstance(cfg);
bind(GerritOptions.class).toInstance(new GerritOptions(false, false, false));
bind(GerritOptions.class).toInstance(new GerritOptions(false, false, ""));
bind(GitRepositoryManager.class).to(InMemoryRepositoryManager.class);
bind(InMemoryRepositoryManager.class).in(SINGLETON);