-
Notifications
You must be signed in to change notification settings - Fork 472
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
Add validation for http header #296
Conversation
The Travis build failed due to the extra http header attribute, but maybe that's expected when adding a new test attribute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the tests need to be updated to support the new header feature.
glide.yaml
Outdated
- package: github.com/fatih/color | ||
- package: github.com/aelsabbahy/go-ps | ||
version: unix_race_condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving off of this branch will break things. This was added due to the race condition explained here: #267
Thanks, will review and update. |
@aelsabbahy I found the missing test expectations and adjusted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this PR is pretty close now.
A few notes:
- Glide.lock is out of sync
- Can you update the http test in goss-shared.yaml to test that this works
Also, see inline comments.
Thanks for taking the time to add this :)
I've adjusted with some more updates. I'm making some newbie mistakes with the go project. It all makes sense when I relate concepts to Java, Python, JS but in this new ecosystem I don't know what I don't know. |
This is almost ready for merging, just need a test in |
a020e82
to
a6023ff
Compare
I'm working through some problems trying to enable the test for the http header validation. On a Raspberry Pi / debian linux it's working fine but I can't correlate the error from travis-ci build to what's really causing it. I'll try to reproduce the error locally. |
This would be a very handy feature. Has there been any further progress on getting the test case finished? |
I have a test case that works in actual use on Raspberry Pi / debian linux but there's something broken when it runs in the travis integration. I'll try again in the next day or two. |
I tested building on Raspberry Pi and it works for its executable. I tested building on Ubuntu on Windows and that works for the amd64 executable there. But something still fails on the CentOS7 test on the Travis integration server. I tried building on a local VirtualBox with CentsOS7 and that worked as well. |
b77c51d
to
9319140
Compare
I've tested locally successfully on CentOS7, Ubuntu, R-Pi and rebased on the latest master but I still get a build error from Travis CI, maybe when it's comparing
|
f3eca91
to
f54b86f
Compare
I'm travelling at the moment, I will try mid next week if the issue is still outstanding. |
@berney I could pick this up if you want?? I feel like I discussed HTTP header validation a long time ago but can't remember. I think it would be a useful addition. I'd especially like it to be able to validate that a header doesn't exist. For example, I might want to validate that the |
I have been using a private build with this fix and it is working well. This PR should be able to be merged, the correct number of passed tests should be in the |
Conflicts: glide.lock glide.yaml integration-tests/goss/goss-shared.yaml integration-tests/test.sh
I've merged from master and update the expected test counts in test.sh but it's now giving an error with archlinux: |
I don't know why but they seemed to have used |
This reverts commit 6ec8613.
@aelsabbahy @berney I've been trying to debug more strange cloud build errors, this time with DNS tests. They run locally but for some reason fail in the Travis cloud build. Any ideas? I'd like to finally finish this!
|
I did a complete rebuild of my CentOS7 VM and now I'm getting similar errors, but they are even from master, not just my branch, so it's a side effect of underlying platform updates. |
Conflicts: integration-tests/test.sh
@berney Phew! Finally all checks passed! |
@aelsabbahy This is up to date again and passing tests after merging away the problematic DNS tests. |
@aelsabbahy @berney This merged the latest changes again. |
Awesome, I'll take a look at it this week and merge it. Many thanks for this, great enhancement! |
@aelsabbahy @berney Any luck with merging this? It would be good to start using it for some of my work projects where I'm currently falling back to bash+curl to validate http headers. |
@aelsabbahy @berney Just pinging again for merge. It would be good to start using it for some of my work projects where I'm currently falling back to bash+curl to validate http headers. |
Github rebasing of PRs is a bit confusing.. Not sure the proper way to do this.. But I ended up just doing a rebase locally and pushing it up as a different PR. It looks like all the author information is preserved, I want to make sure you're credited for the changes. Thanks a bunch for this! |
Thanks for goss! This adds a validation for for http header "name: value" pairs as below.