From a6b5f684b80c8ffb6f7742c3ff60d6f727de68d4 Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Fri, 11 Sep 2020 16:40:55 -0400 Subject: [PATCH] refactor tests enlight of no oplogging --- internal/session/repository_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/session/repository_test.go b/internal/session/repository_test.go index a116d688f3..42b1531ec2 100644 --- a/internal/session/repository_test.go +++ b/internal/session/repository_test.go @@ -338,7 +338,7 @@ func TestRepository_CreateSession(t *testing.T) { assert.True(proto.Equal(foundSession, ses)) err = db.TestVerifyOplog(t, rw, ses.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_CREATE), db.WithCreateNotBefore(10*time.Second)) - assert.NoError(err) + assert.Error(err) require.Equal(1, len(foundStates)) assert.Equal(foundStates[0].GetStatus(), StatusPending.String()) @@ -685,7 +685,7 @@ func TestRepository_UpdateSession(t *testing.T) { assert.Equal(tt.args.serverType, foundSession.ServerType) err = db.TestVerifyOplog(t, rw, s.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_UPDATE), db.WithCreateNotBefore(10*time.Second)) - assert.NoError(err) + assert.Error(err) require.Equal(1, len(foundStates)) assert.Equal(StatusPending.String(), foundStates[0].Status) @@ -771,7 +771,7 @@ func TestRepository_DeleteSession(t *testing.T) { assert.Nil(foundSession) err = db.TestVerifyOplog(t, rw, tt.args.session.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_DELETE), db.WithCreateNotBefore(10*time.Second)) - assert.NoError(err) + assert.Error(err) }) } }