refactor balancer into more testable and extensible interface
This commit is contained in:
parent
1b5db4b3b0
commit
e9dc275b81
20 changed files with 368 additions and 467 deletions
1
rootfs/etc/nginx/lua/test/mocks/ngx/balancer.lua
Normal file
1
rootfs/etc/nginx/lua/test/mocks/ngx/balancer.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
3
rootfs/etc/nginx/lua/test/mocks/resty/chash.lua
Normal file
3
rootfs/etc/nginx/lua/test/mocks/resty/chash.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
new = function(self, nodes) return {} end
|
||||
}
|
||||
1
rootfs/etc/nginx/lua/test/mocks/resty/cookie.lua
Normal file
1
rootfs/etc/nginx/lua/test/mocks/resty/cookie.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
3
rootfs/etc/nginx/lua/test/mocks/resty/lock.lua
Normal file
3
rootfs/etc/nginx/lua/test/mocks/resty/lock.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
new = function(self, name, ...) return {} end,
|
||||
}
|
||||
1
rootfs/etc/nginx/lua/test/mocks/resty/md5.lua
Normal file
1
rootfs/etc/nginx/lua/test/mocks/resty/md5.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
3
rootfs/etc/nginx/lua/test/mocks/resty/roundrobin.lua
Normal file
3
rootfs/etc/nginx/lua/test/mocks/resty/roundrobin.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
new = function(self, nodes) return {} end
|
||||
}
|
||||
1
rootfs/etc/nginx/lua/test/mocks/resty/sha1.lua
Normal file
1
rootfs/etc/nginx/lua/test/mocks/resty/sha1.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
1
rootfs/etc/nginx/lua/test/mocks/resty/string.lua
Normal file
1
rootfs/etc/nginx/lua/test/mocks/resty/string.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue