feat: plugins integration.
This commit is contained in:
parent
58bf1a2ca5
commit
0186c31d59
26 changed files with 1025 additions and 51 deletions
|
@ -18,7 +18,7 @@ func TestBuilder_BuildChainNilConfig(t *testing.T) {
|
|||
testConfig := map[string]*runtime.MiddlewareInfo{
|
||||
"empty": {},
|
||||
}
|
||||
middlewaresBuilder := NewBuilder(testConfig, nil)
|
||||
middlewaresBuilder := NewBuilder(testConfig, nil, nil)
|
||||
|
||||
chain := middlewaresBuilder.BuildChain(context.Background(), []string{"empty"})
|
||||
_, err := chain.Then(nil)
|
||||
|
@ -29,7 +29,7 @@ func TestBuilder_BuildChainNonExistentChain(t *testing.T) {
|
|||
testConfig := map[string]*runtime.MiddlewareInfo{
|
||||
"foobar": {},
|
||||
}
|
||||
middlewaresBuilder := NewBuilder(testConfig, nil)
|
||||
middlewaresBuilder := NewBuilder(testConfig, nil, nil)
|
||||
|
||||
chain := middlewaresBuilder.BuildChain(context.Background(), []string{"empty"})
|
||||
_, err := chain.Then(nil)
|
||||
|
@ -270,7 +270,7 @@ func TestBuilder_BuildChainWithContext(t *testing.T) {
|
|||
Middlewares: test.configuration,
|
||||
},
|
||||
})
|
||||
builder := NewBuilder(rtConf.Middlewares, nil)
|
||||
builder := NewBuilder(rtConf.Middlewares, nil, nil)
|
||||
|
||||
result := builder.BuildChain(ctx, test.buildChain)
|
||||
|
||||
|
@ -329,7 +329,7 @@ func TestBuilder_buildConstructor(t *testing.T) {
|
|||
Middlewares: testConfig,
|
||||
},
|
||||
})
|
||||
middlewaresBuilder := NewBuilder(rtConf.Middlewares, nil)
|
||||
middlewaresBuilder := NewBuilder(rtConf.Middlewares, nil, nil)
|
||||
|
||||
testCases := []struct {
|
||||
desc string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue