{"id":18337916,"url":"https://github.com/cloudnativelabs/kube-router-e2e","last_synced_at":"2025-04-09T20:19:06.009Z","repository":{"id":88185253,"uuid":"171914767","full_name":"cloudnativelabs/kube-router-e2e","owner":"cloudnativelabs","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-13T00:01:07.000Z","size":2628,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T20:19:00.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudnativelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-21T17:25:30.000Z","updated_at":"2022-11-09T18:02:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad577fae-c3ba-41df-be5c-c481ac8e13c9","html_url":"https://github.com/cloudnativelabs/kube-router-e2e","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnativelabs%2Fkube-router-e2e","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnativelabs%2Fkube-router-e2e/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnativelabs%2Fkube-router-e2e/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnativelabs%2Fkube-router-e2e/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudnativelabs","download_url":"https://codeload.github.com/cloudnativelabs/kube-router-e2e/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103908,"owners_count":21048246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T20:12:44.072Z","updated_at":"2025-04-09T20:19:05.983Z","avatar_url":"https://github.com/cloudnativelabs.png","language":"Go","readme":"## End-To-End Testing Framework\n\nThis framework uses [Ginkgo](https://onsi.github.io/ginkgo/#getting-ginkgo) -- a BDD-style Go testing framework built to help you efficiently write expressive and comprehensive tests.\n\nAssumming a cluster already exists, the framework allows you to run tests against it. \n- NOTE: As of Jan 10th, 2019, a cluster must first be setup beforehand; that is, we don't yet support automatic provisioning of a cluster, though we hope to have this feature in very shortly. In the meantime, you can create a cluster using this repo: https://github.com/Nordix/k8s-ipv6\n\n## Tests\n\nTests are categorized as follows. Additional categories may be added as desired.\n\n- Router: focus on pod-to-pod connectivity\n- Services: focus on kube-router's services functionality\n- Policy: focus on network policy enforcement\n- Runtime: tests that focus just on specific kube-router functionality and are not tied to kubernetes\n\n## Running Tests\n\nThe following command will run all tests: \n\n\n        $ ginkgo -- --kuberouter.SSHConfig='cd \u003cpath-to-Vagrantfile\u003e \u0026\u0026 vagrant ssh-config' --kuberouter.testScope=\"ipv6-cluster\"\n\n\n### Running Specific tests\n\nTo run a subset of the tests, you can use ginkgo's [focus spec](https://onsi.github.io/ginkgo/#focused-specs). Here are some examples:\n\n        $ ginkgo --focus=\"Router*\" -- --kuberouter.SSHConfig='cd /home/awander/go/src/github.com/Arvinderpal/k8-ipv6 \u0026\u0026 vagrant ssh-config' --kuberouter.testScope=\"ipv6-cluster\"\n\n        $ ginkgo --focus=\"Service-Proxy*\" -- --kuberouter.SSHConfig='cd /home/awander/go/src/github.com/Arvinderpal/k8-ipv6 \u0026\u0026 vagrant ssh-config' --kuberouter.testScope=\"ipv6-cluster\"  \n\n## Configuration Options\n```\n--kuberouter.provisioner: specify a provisioner (e.g. vagrant)\n--kuberouter.provision:  provision a cluster before running the tests\n--kuberouter.skipLogs: skip gathering logs if a test fails\n--kuberouter.SSHConfig: specify a custom command to fetch SSH configuration (eg: 'vagrant ssh-config')\n--kuberouter.showCommands: output which commands are ran to stdout\n```\n## Logs/Results\n\nFor each test, we log:\n1. List commands that were issued (cmds.log) \n2. Output of kube-router instances on the 2 nodes during the the time the specific test was running (kuberouter-test-k8s(1/2).s) \n3. Output of each command (test-out.log). \n4. If the test fails, we also save the entire kube-router log file (kube-router-complete-k8s1.s). \nThese files can be found in the directory `test_results` under the test name. For example,\n\n```\n~/go/src/github.com/cloudnativelabs/kube-router-e2e/test_results/Service-Proxy_Basic_Connectivity_to_Nodeport_Service_with_many_replicas $ ll\ntotal 12140\ndrwxrwxr-x 2 awander awander     4096 Jan 10 12:34 ./\ndrwxrwxr-x 4 awander awander     4096 Jan 10 12:29 ../\n-rw-rw-r-- 1 awander awander     5417 Jan 10 12:34 cmds.log\n-rw-rw-r-- 1 awander awander   199945 Jan 10 12:29 kuberouter-test.log-k8s1.s\n-rw-rw-r-- 1 awander awander    16566 Jan 10 12:34 test-output.log\n```\n\nHere is an example cmds.log file:\n```\ncurl -g -6 http://[::1]:20244/healthz\ngobgp neighbor\nkubectl apply -f  /home/vagrant/go/src/github.com/cloudnativelabs/kube-router-e2e/manifests/busybox-1.yaml\nkubectl -n default get pods -l app=busybox-2 -o json\nsudo journalctl -au kube-router --since '60 seconds ago'\nkubectl delete -f  /home/vagrant/go/src/github.com/cloudnativelabs/kube-router-e2e/manifests/busybox-2.yaml --grace-period=0 --force\n```\n\nAnd here is a snippet of he kuberouter-test.log-k8s1.s file:\n```\n-- Logs begin at Tue 2018-08-28 17:10:09 UTC, end at Tue 2019-01-15 23:47:44 UTC. --\nJan 15 23:46:46 k8s1 kube-router[4871]: I0115 23:46:46.615714    4871 network_routes_controller.go:252] Syncing ipsets\nJan 15 23:46:46 k8s1 kube-router[4871]: I0115 23:46:46.661630    4871 network_routes_controller.go:265] Performing periodic sync of service VIP routes\nJan 15 23:46:46 k8s1 kube-router[4871]: I0115 23:46:46.661699    4871 ecmp_vip.go:24] Advertising route: '172.20.0.10/32 via 192.168.33.8' to peers\nJan 15 23:46:46 k8s1 kube-router[4871]: I0115 23:46:46.661717    4871 network_routes_controller.go:269] Performing periodic sync of pod CIDR routes\n```\n\n\n## Acknowledgement\n\nThis framework is based on the e2e testing framework of the [cilium project](https://github.com/cilium/cilium/tree/master/test). Many thanks to them for their excellent work!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnativelabs%2Fkube-router-e2e","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudnativelabs%2Fkube-router-e2e","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnativelabs%2Fkube-router-e2e/lists"}