{"action":"created","issue":{"url":"https://api.github.com/repos/OpenVPN/openvpn/issues/45","repository_url":"https://api.github.com/repos/OpenVPN/openvpn","labels_url":"https://api.github.com/repos/OpenVPN/openvpn/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/OpenVPN/openvpn/issues/45/comments","events_url":"https://api.github.com/repos/OpenVPN/openvpn/issues/45/events","html_url":"https://github.com/OpenVPN/openvpn/pull/45","id":151819889,"number":45,"title":"Add vagrant based integration tests","user":{"login":"neuhalje","id":3842066,"avatar_url":"https://avatars.githubusercontent.com/u/3842066?v=3","gravatar_id":"","url":"https://api.github.com/users/neuhalje","html_url":"https://github.com/neuhalje","followers_url":"https://api.github.com/users/neuhalje/followers","following_url":"https://api.github.com/users/neuhalje/following{/other_user}","gists_url":"https://api.github.com/users/neuhalje/gists{/gist_id}","starred_url":"https://api.github.com/users/neuhalje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neuhalje/subscriptions","organizations_url":"https://api.github.com/users/neuhalje/orgs","repos_url":"https://api.github.com/users/neuhalje/repos","events_url":"https://api.github.com/users/neuhalje/events{/privacy}","received_events_url":"https://api.github.com/users/neuhalje/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-29T08:45:16Z","updated_at":"2016-05-31T17:28:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenVPN/openvpn/pulls/45","html_url":"https://github.com/OpenVPN/openvpn/pull/45","diff_url":"https://github.com/OpenVPN/openvpn/pull/45.diff","patch_url":"https://github.com/OpenVPN/openvpn/pull/45.patch"},"body":"This patch will add test servers to use with t_client.sh. This will make testing on different systems much easier. Bonus: testing on a laptop is a breeze by \"one command integration tests\".\r\n\r\n*Example*\r\n```bash\r\n./run_integration.sh ubuntu_precise64\r\n# does the following\r\n# - start an Ubuntu Precise VM\r\n# - Copy your current source code to the VM\r\n# - configure & make on the VM\r\n# - Run the server on the VM\r\n# - Run t_client.sh *with the REMOTE_HOST pointing to the VM*\r\n# - The outputs of client & server are colorized AND interleaved for better diagnosis\r\n# - Tear down the server\r\n```\r\n\r\nVirtual machines are defined by [Vagrant](https://www.vagrantup.com) scripts. Virtualbox is used for virtualisation.\r\n\r\nEach of the virtual machines is configured to compile openvpn and run a server.\r\n\r\nInside the vm a openvpn server can be launched to run `t_client.sh` tests against it. Sample launcher scripts are provided.\r\n\r\n<img width=\"1280\" alt=\"screen shot 2016-05-09 at 16 17 18\" src=\"https://cloud.githubusercontent.com/assets/3842066/15127681/fddb7aa8-1637-11e6-9097-0f53f62c38ba.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/OpenVPN/openvpn/issues/comments/222760175","html_url":"https://github.com/OpenVPN/openvpn/pull/45#issuecomment-222760175","issue_url":"https://api.github.com/repos/OpenVPN/openvpn/issues/45","id":222760175,"user":{"login":"neuhalje","id":3842066,"avatar_url":"https://avatars.githubusercontent.com/u/3842066?v=3","gravatar_id":"","url":"https://api.github.com/users/neuhalje","html_url":"https://github.com/neuhalje","followers_url":"https://api.github.com/users/neuhalje/followers","following_url":"https://api.github.com/users/neuhalje/following{/other_user}","gists_url":"https://api.github.com/users/neuhalje/gists{/gist_id}","starred_url":"https://api.github.com/users/neuhalje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neuhalje/subscriptions","organizations_url":"https://api.github.com/users/neuhalje/orgs","repos_url":"https://api.github.com/users/neuhalje/repos","events_url":"https://api.github.com/users/neuhalje/events{/privacy}","received_events_url":"https://api.github.com/users/neuhalje/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T17:28:37Z","updated_at":"2016-05-31T17:28:37Z","body":"Hi\n\n> I tested this a bit with latest Vagrant+Virtualbox and most of it seemed to work fine out of the box - excellent work!\n> \nThanks! And thank you for testing!\n> I'm just wondering what kind of test setup we want exactly... right now, the \"real\" test server runs several OpenVPN server instances configured differently and listening on different ports. Each of the clients (buildslaves) connect to each of the server instances in turn. This is something we might (or might not) want to replicate here.\n> \nbasically “n Client Systems x n Server Systems”? This is what I see as a good case for a “is this ready for a patch submit” test.\n> Another option would be to focus on building and running the server-side code on different VM instances, each running a different OS, and run the tests to ensure that the virtual host can connect to each of them. There could be several differently configured OpenVPN server instances on each of the VMs. Is this what you're trying achieve here?\n> \nbasically “1 Client System x n Server Systems”?\n\nBoth are viable routes that might not be exclusive (e.g. maybe they are more or less the same with a slightly different configuration)\n\nIMHO the use cases are:\n\n1) Iterative development (“1 x 1”): One VM as server or client endpoint. The other side on the development machine.\n\n2) Feature test (“1 x n”): Multiple VMs as server or client endpoint. The other side on the development machine.\n\n3) Final test (“n x n”):  Multiple VMs as server AND client endpoint. \n\nUse case #1 is a MUST. Use case #2 is a SHOULD, and #3 its a COULD\n\nMy high level goals:\n\n1) Make it easy for developers to set up different test & build machines to test new features against. (hypothesis: done with this PR, except for maybe some bugs)\n\n2) Make integration with existing test tooling as easy as possible (still not quite there with this PR).\n\n3) Make it easy to separate”Test Definition” from “Execution Environment” (still not quite started with this PR).\n    I.e. a test should consist of a client configuration, a server configuration, and (a maybe fixed) test function. \n    This is basically what t_client.sh does right now with the addition of automatic address configuration, and automatic server launches.\n\n> In any case, I think we should strive for maximum automation, so that any developer is able to recreate the t_client.sh test environment with minimal tinkering and knowledge about t_client.sh. Which brings me to a couple of issues I noticed:\n> \nYes!\n\n> It seems that the line RUN_SUDO=sudo in t_client.rc needs to be enabled: at least on Fedora doing a \"sudo -s\" changes $HOME to /root, which means that $HOME/.vagrant can no longer be found.\n—> Bug\n> The EXCEPT*_ values in t_client.rc-sample are not correct for the Vagrant VMs, which causes t_client.sh fail, even though OpenVPN connection is established correctly\n—> Bug\n\n> What about having a tailored t_client.rc-vagrant file that fixes the two issues above? Making the VPN IP addresses predictable probably takes some effort, but would be worth it imho\n> \nSounds good. I’ll try to improve the scripts next weekend!\n> This is probably unrelated to this patch, but I noticed that the \"stopping OpenVPN\" part in t_client.sh hangs (indefinitely?) on Fedora 23.\n> \n> \n—> Bug\n\nNext iteration :-)\n\nCheers\nJens\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub <https://github.com/OpenVPN/openvpn/pull/45#issuecomment-222719271>, or mute the thread <https://github.com/notifications/unsubscribe/ADqgEtaQGQc9CwYPmRJDPzAGVy0_-GoCks5qHE9egaJpZM4ISoWt>.\n> \n\n"}}
{"actor":{"display_login":"neuhalje"}}