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

Enable unit and e2e tests in CI #624

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

g-gaston
Copy link
Contributor

@g-gaston g-gaston commented Oct 3, 2023

Maybe there was a reason to not run unit tests but I thought it could be useful to run what we already have and it makes it easier for folks to add more as they write new code.

A couple extra things:

  • Fixed 2 broken tests
  • Separated unit tests, e2e tests, linter and scans in different jobs so they run concurrently.

Comment on lines -80 to +81
"bgp/bgp-peers-0-peer-ip": "10.0.0.254",
"bgp/bgp-peers-0-src-ip": "10.0.0.1,10.0.0.2,10.0.0.3",
"bgp/bgp-peers-0-peer-ip": "10.0.0.1,10.0.0.2,10.0.0.3",
"bgp/bgp-peers-0-src-ip": "10.0.0.254",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, these two expected values were swapped, the code that generates the peers looks correct, it was just the wrong expectation

@g-gaston g-gaston force-pushed the unit-tests branch 2 times, most recently from ed2896b to 141bb5a Compare October 3, 2023 21:57
@g-gaston g-gaston changed the title Enable unit tests in CI Enable unit and e2e tests in CI Oct 3, 2023
@@ -98,7 +98,7 @@ var _ = Describe("kube-vip broadcast neighbor", func() {

manifestPath := filepath.Join(tempDirPath, "kube-vip-ipv4.yaml")

for i := 0; i < 2; i++ {
for i := 0; i < 3; i++ {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit slower but using 3 nodes removes the flakiness since etcd won't lose quorum by deleting only one node.

* Fix 2 broken tests
* Fix e2e ARP tests: killing one node in a 2 CP node cluster makes etcd
  lose quorum. So it can't elect a new leader if the node we happen to
  kill was the etcd leader.
* Separate unit tests, e2e tests, linter and scans in different jobs so
  they run concurrently.

Signed-off-by: Guillermo Gaston <gaslor@amazon.com>
@thebsdbox
Copy link
Collaborator

Looks good and all tests have passed! (Thanks)

@thebsdbox thebsdbox merged commit 8d362d9 into kube-vip:main Oct 4, 2023
8 checks passed
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

2 participants