engine: Rename world API and add a context

We want to be able to pass ctx through for various reasons.
This commit is contained in:
James Shubin
2025-06-02 14:59:41 -04:00
parent 99d8846934
commit 16ade43caf
6 changed files with 26 additions and 26 deletions

View File

@@ -905,12 +905,12 @@ func TestAstFunc2(t *testing.T) {
logf("world: etcd: "+format, v...)
},
}
if err := world.Init(worldInit); err != nil {
t.Errorf("world Init failed: %+v", err)
if err := world.Connect(context.TODO(), worldInit); err != nil {
t.Errorf("world Connect failed: %+v", err)
return
}
defer func() {
err := errwrap.Wrapf(world.Close(), "world Close failed")
err := errwrap.Wrapf(world.Cleanup(), "world Cleanup failed")
if err != nil {
t.Errorf("close error: %+v", err)
}
@@ -1805,12 +1805,12 @@ func TestAstFunc3(t *testing.T) {
logf("world: etcd: "+format, v...)
},
}
if err := world.Init(worldInit); err != nil {
t.Errorf("world Init failed: %+v", err)
if err := world.Connect(context.TODO(), worldInit); err != nil {
t.Errorf("world Connect failed: %+v", err)
return
}
defer func() {
err := errwrap.Wrapf(world.Close(), "world Close failed")
err := errwrap.Wrapf(world.Cleanup(), "world Cleanup failed")
if err != nil {
t.Errorf("close error: %+v", err)
}