From c94ff3430ca4d2ba84ed635b07183a4c23e338a0 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Thu, 10 Sep 2020 14:51:30 +0100 Subject: [PATCH] refactor: use nil value --- conformance/chaos/actor_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/conformance/chaos/actor_test.go b/conformance/chaos/actor_test.go index ac49b8670..97c3b85cf 100644 --- a/conformance/chaos/actor_test.go +++ b/conformance/chaos/actor_test.go @@ -15,7 +15,7 @@ func TestSingleton(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor msg := "constructor should not be called; the Chaos actor is a singleton actor" rt.ExpectAssertionFailure(msg, func() { @@ -30,7 +30,7 @@ func TestDeleteActor(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor rt.ExpectValidateCallerAny() rt.ExpectDeleteActor(beneficiary) @@ -43,7 +43,7 @@ func TestMutateStateInTransaction(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor rt.ExpectValidateCallerAny() rt.Create(&State{}) @@ -69,7 +69,7 @@ func TestMutateStateAfterTransaction(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor rt.ExpectValidateCallerAny() rt.Create(&State{}) @@ -96,7 +96,7 @@ func TestMutateStateReadonly(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor rt.ExpectValidateCallerAny() rt.Create(&State{}) @@ -122,7 +122,7 @@ func TestAbortWith(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor msg := "__test forbidden" rt.ExpectAbortContainsMessage(exitcode.ErrForbidden, msg, func() { @@ -140,7 +140,7 @@ func TestAbortWithUncontrolled(t *testing.T) { builder := mock.NewBuilder(context.Background(), receiver) rt := builder.Build(t) - a := Actor{} + var a Actor msg := "__test uncontrolled panic" rt.ExpectAssertionFailure(msg, func() {