cmd: take configuration as a mandatory argument (+ other changes)

The other changes are:
 - rename configure service to orchestrator service
 - turn DefaultConfiguration variables into functions
This commit is contained in:
Vincent Bernat
2022-04-10 15:14:39 +02:00
parent 56e30e478a
commit 93da599adf
50 changed files with 241 additions and 202 deletions

View File

@@ -15,7 +15,7 @@ import (
func TestKafka(t *testing.T) {
r := reporter.NewMock(t)
c, mockProducer := NewMock(t, r, DefaultConfiguration)
c, mockProducer := NewMock(t, r, DefaultConfiguration())
// Send one message
received := make(chan bool)
@@ -61,7 +61,7 @@ func TestKafka(t *testing.T) {
func TestKafkaMetrics(t *testing.T) {
r := reporter.NewMock(t)
c, err := New(r, DefaultConfiguration, Dependencies{Daemon: daemon.NewMock(t)})
c, err := New(r, DefaultConfiguration(), Dependencies{Daemon: daemon.NewMock(t)})
if err != nil {
t.Fatalf("New() error:\n%+v", err)
}