Closed gszeliga closed 5 years ago
I'll try to ave a look at this PR within the next few days, @gszeliga !
I'm having seeing a regression in examples/example_irule_pool_verification.tcl Could you make sure it doesn't break, @gszeliga ?
Hey @landro! Sorry for the buggy example. It should be fine now!
@landro It's been a while since I heard from you. Is there anything I can do to unblock this PR? Thanks!
Guillermo, Thanks for reminding me. I’ve been very busy for the past few weeks - I’ll try to get a look at it during this week.
- jan. 2019 kl. 23:47 skrev Guillermo Szeliga notifications@github.com:
@landro It's been a while since I heard from you. Is there anything I can do to unblock this PR? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@gszeliga I'm still getting errors:
➜ TesTcl git:(gszeliga-support-advanced-pool-verification) jtcl examples/example_irule_pool_verification.tcl
**************************************************************************
* it should set the right pool when available
**************************************************************************
-> Test failure!!
-> -> Verification 'Final pool is the expected one after a match' failed - expression: {go_to_bar} eq {}
error Verification 'Final pool is the expected one after a match' failed - expression: {go_to_bar} eq {}
**************************************************************************
* it should fallback to default LB::server default pool if nothing matches
**************************************************************************
-> Test failure!!
-> -> Verification 'Final pool should be defaults' failed - expression: {fallback} eq {}
error Verification 'Final pool should be defaults' failed - expression: {fallback} eq {}```
Hey @landro !
Have you checked your TCLLIBPATH
? It might be pointing to the wrong version.
I ran the tests again and they look fine this time :(
❯ jtcl examples/example_irule_pool_verification.tcl
**************************************************************************
* it should set the right pool when available
**************************************************************************
verification of 'Final pool is the expected one after a match' done.
-> Test ok
**************************************************************************
* it should fallback to default LB::server default pool if nothing matches
**************************************************************************
verification of 'Final pool should be defaults' done.
-> Test ok
Finally sorted out what was going on. I try to maintain compatibility with Tclsh as much as possible, and therefore had to replace not with ! and fix an issue in the classes match implementation. Thanks for your effort and contribution @gszeliga
I ran into an issue where
endstate
would not do the job to verify the lastpool
set by aniRule
when wrapped in acatch
expression.This PR attempts to address that by enriching the available building blocks with the following new statements:
given_pools
: where you can declare all available pools to be usedendstate_pool
: an easy way to get back the last pool set by the iRuleThis way, you can have things like:
verify "Final pool is the expected one after a match" "go_to_bar" eq { endstate_pool }
which is super awesome to have handy!
Let me know what you think