Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for mocking HTTP::header statements #13

Merged
merged 6 commits into from
Aug 7, 2013
Merged

support for mocking HTTP::header statements #13

merged 6 commits into from
Aug 7, 2013

Conversation

Sebastian-Brzuzek
Copy link
Contributor

No description provided.

mocks for HTTP::headers evaluation if available instead of stub execution
separated reading of expectation from supporting unknown statements
@landro
Copy link
Owner

landro commented Aug 6, 2013

Good morning,

Your code looked promising, but it turns out most of the tests and examples fail. Could you have a look?
BTW, I added some sh scripts in master to run examples and tests

@Sebastian-Brzuzek
Copy link
Contributor Author

I found there I introduced unneeded dependency on HTTP::header, I was testing several iRules, but always including source src/irulehttp.tcl
I will provide update to pull request Today when I will fix this problem.

fixed return code propagation from expected to unknown proc
removed dependency on HTTP::header in reset_expectations proc
@Sebastian-Brzuzek
Copy link
Contributor Author

I just commited fix. Now all tests are passed without any problem. I hope now it is finally stable ;-)

@landro
Copy link
Owner

landro commented Aug 6, 2013

I'm afraid not. Try running ./tests.sh and ./examples.sh from master. You'll notice all tests pass. When I run same scripts in your branch, I get lots of errors.

@Sebastian-Brzuzek
Copy link
Contributor Author

I was testing last change on ActiveTcl 8.6 on Windows, in jTcl there is no support for expansion substitution, so I have to use eval to pass args array to another proc. Last commit passed all tests on jTcl and on ActiveTcl. I have left more elegant expansion substitution implementation in comments to use it when jTcl will be compatible with Tcl 8.5

@landro landro merged commit 4351fcd into landro:master Aug 7, 2013
@Sebastian-Brzuzek
Copy link
Contributor Author

Good morning,

Thanks for the acceptance of pull request and sorry for problems with code quality... I was thinking the differences between latest versions of jTcl and ActiveTcl are not so important in those small changes I made...

Cheers,
Seba.

@landro
Copy link
Owner

landro commented Aug 7, 2013

Actually, that's the only language level change. The stubbing functionality you contributed actually provides a nice foundation for further stubs like HTTP::uri etc. great stuff.

Stefan

Den 7. aug. 2013 kl. 08:48 skrev Sebastian Brzuzek [email protected]:

Good morning,

Thanks for acceptance of pull request and sorry for problems with code quality... I was thinking the differences between latest versions of jTcl and ActiveTcl are not so important in those small changes I made...

Cheers,
Seba.


Reply to this email directly or view it on GitHub.

@Sebastian-Brzuzek
Copy link
Contributor Author

Thanks, I wasn't programming in Tcl for more than 10 years, so I'm not aware of this level change.
I will contribute one more update related to endstates Today or Tomorrow (I have one more iRule to test which requires this change).

Seba

@landro
Copy link
Owner

landro commented Aug 7, 2013

Great! Please also add a test case so this will be exposed in the test suite.

Sendt fra min iPhone

Den 7. aug. 2013 kl. 10:35 skrev Sebastian Brzuzek [email protected]:

Thanks, I wasn't programming in Tcl for more than 10 years, so I'm not aware of this level change.
I will contribute one more update related to endstates Today or Tomorrow (I have one more iRule to test which requires this change).

Seba


Reply to this email directly or view it on GitHub.

@Sebastian-Brzuzek
Copy link
Contributor Author

About test case, it is already validated in existing tests, if it will work for 2 or 3 args it will work for any number of them, so I don't think we need to add something more to test how many args to proc will be accepted by JTcl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants