Skip to content

Commit

Permalink
Fixed broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lmika committed Jul 20, 2022
1 parent 2df0fc7 commit 57e1280
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/dynamo-browse/controllers/tablewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func TestTableWriteController_PutItem(t *testing.T) {
assert.True(t, state.ResultSet().IsDirty(0))

// Rescan the table to confirm item is not modified
invokeCommand(t, readController.Rescan())
invokeCommandWithPrompt(t, readController.Rescan(), "y")
after, _ := state.ResultSet().Items()[0].AttributeValueAsString("alpha")
assert.Equal(t, "This is some value", after)
assert.False(t, state.ResultSet().IsDirty(0))
Expand Down Expand Up @@ -381,7 +381,7 @@ func TestTableWriteController_PutItems(t *testing.T) {
assert.True(t, state.ResultSet().IsDirty(2))

// Rescan the table and verify dirty items were not written
invokeCommand(t, readController.Rescan())
invokeCommandWithPrompt(t, readController.Rescan(), "y")

assert.Equal(t, "a new value", state.ResultSet().Items()[0]["alpha"].(*types.AttributeValueMemberS).Value)
assert.Nil(t, state.ResultSet().Items()[2]["alpha"])
Expand Down Expand Up @@ -417,7 +417,7 @@ func TestTableWriteController_PutItems(t *testing.T) {
assert.True(t, state.ResultSet().IsDirty(2))

// Rescan the table and verify dirty items were not written
invokeCommand(t, readController.Rescan())
invokeCommandWithPrompt(t, readController.Rescan(), "y")

assert.Equal(t, "This is some value", state.ResultSet().Items()[0]["alpha"].(*types.AttributeValueMemberS).Value)
assert.Nil(t, state.ResultSet().Items()[2]["alpha"])
Expand Down

0 comments on commit 57e1280

Please sign in to comment.