Skip to content

Commit

Permalink
Distinguish failure modes
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 11, 2014
1 parent 6529e99 commit 631bf63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/tests/keywords/update-remove-any
Expand Up @@ -19,7 +19,7 @@ update {

if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192.0.2.2)) {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id := 'fail 1'
}
}

Expand All @@ -31,20 +31,20 @@ update {
# Non Tmp-IP-Address-0 address attributes should still be in the request list
if ((Tmp-String-0 != 'foobarbaz') || (Tmp-Integer-0 != 123456789)) {
update reply {
reply:Filter-Id := 'fail'
reply:Filter-Id += 'fail 2'
}
}

# There should be no Tmp-IP-Address attributes in the request list
if (("%{Tmp-IP-Address-0[0]}" != '') || ("%{Tmp-IP-Address-0[1]}" != '')) {
if (Tmp-IP-Address-0 || ("%{Tmp-IP-Address-0[1]}" != '')) {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id += 'fail 3'
}
}

# But there should still be some in the control list
if (("%{control:Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{control:Tmp-IP-Address-0[1]}" != 192.0.2.3)) {
if ((control:Tmp-IP-Address-0 != 192.0.2.1) || ("%{control:Tmp-IP-Address-0[1]}" != 192.0.2.3)) {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id += 'fail 4'
}
}
6 changes: 3 additions & 3 deletions src/tests/keywords/xlat-octets
Expand Up @@ -19,18 +19,18 @@ update request {

if ("%{Tmp-Octets-0}" != '0001020304050607') {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id := 'fail 1'
}
}

if ("%{Tmp-Octets-0[0]}" != '0001020304050607') {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id += 'fail 2'
}
}

if ("%{Tmp-Octets-0[*]}" != '0001020304050607,0706050403020100') {
update {
reply:Filter-Id := 'fail'
reply:Filter-Id += 'fail 3'
}
}

0 comments on commit 631bf63

Please sign in to comment.