Move initialization code from main.go to the registry package
This makes it easier to embed a registry instance inside another application. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
8f5f6a4e59
commit
8dd51d6460
6 changed files with 307 additions and 14 deletions
|
@ -31,7 +31,7 @@ func TestAppDispatcher(t *testing.T) {
|
|||
t.Fatalf("error creating registry: %v", err)
|
||||
}
|
||||
app := &App{
|
||||
Config: configuration.Configuration{},
|
||||
Config: &configuration.Configuration{},
|
||||
Context: ctx,
|
||||
router: v2.Router(),
|
||||
driver: driver,
|
||||
|
@ -164,7 +164,7 @@ func TestNewApp(t *testing.T) {
|
|||
// Mostly, with this test, given a sane configuration, we are simply
|
||||
// ensuring that NewApp doesn't panic. We might want to tweak this
|
||||
// behavior.
|
||||
app := NewApp(ctx, config)
|
||||
app := NewApp(ctx, &config)
|
||||
|
||||
server := httptest.NewServer(app)
|
||||
builder, err := v2.NewURLBuilderFromString(server.URL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue