From 2d53dc117620a75c599e61f0ba93aee6d8ca1c90 Mon Sep 17 00:00:00 2001 From: shakezula Date: Wed, 12 Jul 2023 12:31:52 -0600 Subject: [PATCH] [fixup] pass testing.T to the newTestApp function --- persistence/trees/trees_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/persistence/trees/trees_test.go b/persistence/trees/trees_test.go index a28bbae37..0f4797788 100644 --- a/persistence/trees/trees_test.go +++ b/persistence/trees/trees_test.go @@ -100,7 +100,7 @@ func newTestPersistenceModule(t *testing.T, databaseUrl string) modules.Persiste return persistenceMod.(modules.PersistenceModule) } func createAndInsertDefaultTestApp(t *testing.T, db *persistence.PostgresContext) (*coreTypes.Actor, error) { - app, err := newTestApp() + app, err := newTestApp(t) if err != nil { return nil, err } @@ -130,15 +130,15 @@ func createAndInsertDefaultTestApp(t *testing.T, db *persistence.PostgresContext DefaultUnstakingHeight) } -func newTestApp() (*coreTypes.Actor, error) { +func newTestApp(t *testing.T) (*coreTypes.Actor, error) { operatorKey, err := crypto.GeneratePublicKey() if err != nil { - return nil, err + t.Errorf("failed to generate test app: %v", err) } outputAddr, err := crypto.GenerateAddress() if err != nil { - return nil, err + t.Errorf("failed to generate test app: %v", err) } return &coreTypes.Actor{