Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ralikio committed Oct 4, 2024
1 parent 4705e75 commit e9af6b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion internal/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ func FixBinding(id string) internal.Binding {
return FixBindingWithInstanceID(id, instanceID)
}


func FixBindingWithInstanceID(bindingID string, instanceID string) internal.Binding {
return internal.Binding{
ID: bindingID,
Expand Down
13 changes: 6 additions & 7 deletions internal/storage/driver/postsql/binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ func TestBinding(t *testing.T) {
assert.NoError(t, err)
})


t.Run("should list all created bindings", func(t *testing.T) {
storageCleanup, brokerStorage, err := GetStorageForDatabaseTests()
require.NoError(t, err)
Expand Down Expand Up @@ -136,8 +135,8 @@ func TestBinding(t *testing.T) {
}()

// given
sameInstanceID := uuid.New().String()
differentInstanceID := uuid.New().String()
sameInstanceID := uuid.New().String()
differentInstanceID := uuid.New().String()
fixedBinding := fixture.FixBindingWithInstanceID("1", sameInstanceID)
err = brokerStorage.Bindings().Insert(&fixedBinding)
assert.NoError(t, err)
Expand All @@ -156,7 +155,7 @@ func TestBinding(t *testing.T) {
// then
assert.NoError(t, err)
assert.Len(t, bindings, 2)

for _, binding := range bindings {
assert.Equal(t, sameInstanceID, binding.InstanceID)
}
Expand All @@ -172,7 +171,7 @@ func TestBinding(t *testing.T) {
}()

// given
sameInstanceID := uuid.New().String()
sameInstanceID := uuid.New().String()
fixedBinding := fixture.FixBindingWithInstanceID("1", sameInstanceID)
err = brokerStorage.Bindings().Insert(&fixedBinding)
assert.NoError(t, err)
Expand All @@ -191,7 +190,7 @@ func TestBinding(t *testing.T) {
// then
assert.NoError(t, err)
assert.Len(t, bindings, 0)

for _, binding := range bindings {
assert.Equal(t, sameInstanceID, binding.InstanceID)
}
Expand All @@ -215,7 +214,7 @@ func TestBinding(t *testing.T) {
// then
assert.NoError(t, err)
assert.Len(t, bindings, 0)

for _, binding := range bindings {
assert.Equal(t, sameInstanceID, binding.InstanceID)
}
Expand Down

0 comments on commit e9af6b5

Please sign in to comment.