Skip to content

Commit

Permalink
adjusting number of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslaw-pieszka committed Oct 21, 2024
1 parent 8710341 commit 88631d4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions internal/broker/bind_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ func TestCreateSecondBindingWithTheSameIdButDifferentParams(t *testing.T) {
MaxBindingsCount: 10,
}
binding := fixture.FixBindingWithInstanceID(bindingID, instanceID)
st := storage.NewMemoryStorage()
err := st.Instances().Insert(instance)
brokerStorage := storage.NewMemoryStorage()
err := brokerStorage.Instances().Insert(instance)
assert.NoError(t, err)
err = st.Bindings().Insert(&binding)
err = brokerStorage.Bindings().Insert(&binding)
assert.NoError(t, err)

svc := NewBind(*bindingCfg, st.Instances(), st.Bindings(), logrus.New(), nil, nil)
svc := NewBind(*bindingCfg, brokerStorage, logrus.New(), nil, nil)
params := BindingParams{
ExpirationSeconds: 601,
}
Expand Down Expand Up @@ -123,13 +123,13 @@ func TestCreateSecondBindingWithTheSameIdAndParams(t *testing.T) {
MaxBindingsCount: 10,
}
binding := fixture.FixBindingWithInstanceID(bindingID, instanceID)
st := storage.NewMemoryStorage()
err := st.Instances().Insert(instance)
brokerStorage := storage.NewMemoryStorage()
err := brokerStorage.Instances().Insert(instance)
assert.NoError(t, err)
err = st.Bindings().Insert(&binding)
err = brokerStorage.Bindings().Insert(&binding)
assert.NoError(t, err)

svc := NewBind(*bindingCfg, st.Instances(), st.Bindings(), logrus.New(), nil, nil)
svc := NewBind(*bindingCfg, brokerStorage, logrus.New(), nil, nil)
params := BindingParams{
ExpirationSeconds: 600,
}
Expand Down Expand Up @@ -164,13 +164,13 @@ func TestCreateSecondBindingWithTheSameIdAndParamsNotExplicitlyDefined(t *testin
MaxBindingsCount: 10,
}
binding := fixture.FixBindingWithInstanceID(bindingID, instanceID)
st := storage.NewMemoryStorage()
err := st.Instances().Insert(instance)
brokerStorage := storage.NewMemoryStorage()
err := brokerStorage.Instances().Insert(instance)
assert.NoError(t, err)
err = st.Bindings().Insert(&binding)
err = brokerStorage.Bindings().Insert(&binding)
assert.NoError(t, err)

svc := NewBind(*bindingCfg, st.Instances(), st.Bindings(), logrus.New(), nil, nil)
svc := NewBind(*bindingCfg, brokerStorage, logrus.New(), nil, nil)

// when
resp, err := svc.Bind(context.Background(), instanceID, bindingID, domain.BindDetails{}, false)
Expand Down

0 comments on commit 88631d4

Please sign in to comment.