Skip to content

Commit

Permalink
fix slice append
Browse files Browse the repository at this point in the history
  • Loading branch information
thedae committed Nov 14, 2024
1 parent 4e4978e commit c876170
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions proxy/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

func TestProxyFactory_luaError(t *testing.T) {
var luaPreErrorTestTable = []struct {
var luaErrorTestTable = []struct {
Name string
Cfg map[string]interface{}
ExpectedError string
Expand Down Expand Up @@ -117,13 +117,6 @@ func TestProxyFactory_luaError(t *testing.T) {
},
ExpectedError: "attempt to call a non-function object (bad-func.lua:L3)",
},
}

var luaPostErrorTestTable = []struct {
Name string
Cfg map[string]interface{}
ExpectedError string
}{
{
Name: "Post: Inline syntax error",
Cfg: map[string]interface{}{
Expand Down Expand Up @@ -209,8 +202,7 @@ func TestProxyFactory_luaError(t *testing.T) {
},
}

tests := append(luaPreErrorTestTable, luaPostErrorTestTable...)
for _, test := range tests {
for _, test := range luaErrorTestTable {
t.Run(test.Name, func(t *testing.T) {
logger, err := logging.NewLogger("ERROR", bytes.NewBuffer(make([]byte, 1024)), "pref")
if err != nil {
Expand Down

0 comments on commit c876170

Please sign in to comment.