Skip to content

Commit

Permalink
BUILD/MINOR: fix test generation with quote_fail instrution
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Gramer <[email protected]>
  • Loading branch information
vgramer authored and mjuraga committed Feb 26, 2024
1 parent ffe6142 commit 921b704
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generate/test.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func Test{{ $StructName }}{{ .Dir }}(t *testing.T) {
"{{- $val -}}": false,
{{- end }}
{{- range $index, $val := .TestFailEscaped}}
`{{- $val -}}`: true,
`{{- $val -}}`: false,
{{- end }}
}
{{- if .HasTable}}
Expand Down
2 changes: 1 addition & 1 deletion tests/tcp-check_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/types-other.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ type HTTPCheck struct{}
//test:fail:tcp-check set-var(check.port) int(1234) if x
//test:quote_ok:tcp-check set-var-fmt(check.name) "%H"
//test:quote_ok:tcp-check set-var-fmt(txn.from) "addr=%[src]:%[src_port]"
//test:quote_fail:tcp-check set-var-fmt(txn.from) "addr=%[src]:%[src_port] if TRUE"
//test:quote_fail:tcp-check set-var-fmt(txn.from) "addr=%[src]:%[src_port]" if TRUE
//test:quote_ok:tcp-check unset-var(txn.from)
//test:fail:tcp-check unset-var(txn.from) if x
type TCPCheck struct{}
Expand Down

0 comments on commit 921b704

Please sign in to comment.