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

add 'via' matcher #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add 'via' matcher #4

wants to merge 4 commits into from

Conversation

trombik
Copy link
Contributor

@trombik trombik commented Apr 16, 2016

tcpdump -i any is supported only on Linux kernel. adding via is just a work around but better than nothing.

describe server(:fluentd1) do
  describe firewall(server(:fluentd1)) do
    it { is_expected.to be_reachable.via('lo0').dest_port(24284) }
  end 
end

Tomoyuki Sakurai added 3 commits April 16, 2016 22:42
because '-i any' is not supported by non-Linux OSes
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 79.43% when pulling f5e831b on trombik:interface into 006ba3b on otahi:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 79.375% when pulling ad41ae0 on trombik:interface into 006ba3b on otahi:master.

@otahi
Copy link
Owner

otahi commented Apr 18, 2016

@trombik Thank you for your pull request.
I agree with you basically, so I think I want to merge this pull request.

I have 2 points to indicate.

  1. I think dest_interface is more suitable in this situation than via, because there are dest_interface and src_interface(But I know you don't mention about src_interface in this case)
  2. Please add some integration tests(unit tests are also OK if you think unit tests are better.)

Please give your thoughts, or questions to me.
Thank you,

@trombik
Copy link
Contributor Author

trombik commented Apr 18, 2016

via was chosen because it sounds more like spoken English. but that is not a deal breaker. as for unit tests, fair enough. however, it would take some time for me to dive into rspec. let me give it a try

@otahi
Copy link
Owner

otahi commented Apr 24, 2016

@trombik Thank you for your trying.

via sounds nice for me too, but now via is used for firewalls like this.

$ bundle exec rspec

server 'src'
  via firewall
    should reach to server 'dst'

So, we had better to change to some other words. I think.

Please feel free to contact me if you have something.

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.

None yet

3 participants