cli, engine, etcd, lib: Pass in init args

Improve the API and make it more general.
This commit is contained in:
James Shubin
2025-03-18 04:44:12 -04:00
parent 7ad54fe3e8
commit a7a5237b07
5 changed files with 45 additions and 26 deletions

View File

@@ -897,13 +897,15 @@ func TestAstFunc2(t *testing.T) {
//MetadataPrefix: /fs, // MetadataPrefix
//StoragePrefix: "/storage", // StoragePrefix
// TODO: is this correct? (seems to work for testing)
StandaloneFs: fs, // used for static deploys
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
StandaloneFs: fs, // used for static deploys
}
worldInit := &engine.WorldInit{
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
Logf: func(format string, v ...interface{}) {
logf("world: etcd: "+format, v...)
},
}
if err := world.Init(); err != nil {
if err := world.Init(worldInit); err != nil {
t.Errorf("world Init failed: %+v", err)
return
}
@@ -1788,13 +1790,15 @@ func TestAstFunc3(t *testing.T) {
//MetadataPrefix: /fs, // MetadataPrefix
//StoragePrefix: "/storage", // StoragePrefix
// TODO: is this correct? (seems to work for testing)
StandaloneFs: fs, // used for static deploys
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
StandaloneFs: fs, // used for static deploys
}
worldInit := &engine.WorldInit{
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
Logf: func(format string, v ...interface{}) {
logf("world: etcd: "+format, v...)
},
}
if err := world.Init(); err != nil {
if err := world.Init(worldInit); err != nil {
t.Errorf("world Init failed: %+v", err)
return
}