-
Notifications
You must be signed in to change notification settings - Fork 28
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
cnf network: add-metallb-frr-test-cases #239
cnf network: add-metallb-frr-test-cases #239
Conversation
22ec307
to
e735dee
Compare
did a rough check on what the tests are covering, lgtm from that side. I didn't go deeply in what the code does / how it's written |
e31b751
to
bad8db4
Compare
// Get the routes | ||
frrNodeState, err := metallb.ListFrrNodeState(APIClient) | ||
Expect(err).ToNot(HaveOccurred(), "Failed to verify BGP routes") | ||
fmt.Println("frrNodeState[0].Objects.Status.RunningConfig", |
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.
why do we need it?
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.
Removed
|
||
By("Create first frrconfiguration that receieves a single route") | ||
createFrrConfiguration(frrConfigFiltered1, ipv4metalLbIPList[0], | ||
64500, []string{externalAdvertisedIPv4Routes[0], externalAdvertisedIPv6Routes[0]}, |
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.
use var instead 64500
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.
replaced every found
"frr-k8s-webhook-server deployment is not ready") | ||
|
||
By("Creating BGP Peers") | ||
createBGPPeerAndVerifyIfItsReady(ipv4metalLbIPList[0], "", 64500, |
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.
use var instead 64500
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.
replaced everywhere found for 64500 and 64501
64500, []string{externalAdvertisedIPv4Routes[0], externalAdvertisedIPv6Routes[0]}, | ||
false, false) | ||
|
||
By("Verify Worker-0 Node state update") |
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.
please replace worker-0
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.
replaced with a different name like Node 0 ?
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.
replaced
|
||
By("Create second frrconfiguration that receives a single route") | ||
createFrrConfiguration(frrConfigFiltered2, ipv4metalLbIPList[0], | ||
64500, []string{externalAdvertisedIPv4Routes[1], externalAdvertisedIPv6Routes[1]}, |
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.
use var instead 64500
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.
done
By("create a secondary IP address on the worker node 0") | ||
err = createSecondaryInterfaceOnNode("sec-int-worker0", workerNodeList[0].Definition.Name, | ||
srIovInterfacesUnderTest[0], frrNodeSecIntIPv4Addresses[0], "2001:100::254", vlanID) | ||
Expect(err).ToNot(HaveOccurred(), "Fail to create a secondary interface on worker0") |
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.
remove worker0
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.
replaced
By("create a secondary IP address on the worker node 1") | ||
err = createSecondaryInterfaceOnNode("sec-int-worker1", workerNodeList[1].Definition.Name, | ||
srIovInterfacesUnderTest[0], frrNodeSecIntIPv4Addresses[1], "2001:100::253", vlanID) | ||
Expect(err).ToNot(HaveOccurred(), "Fail to create a secondary interface on worker1") |
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.
remove worker1
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.
replaced
[]string{fmt.Sprintf("%s/24", hubSecIntIPv4Addresses[1])}, | ||
[]string{fmt.Sprintf("%s/24", hubIPv4ExternalAddresses[1])}) | ||
|
||
By("Creating FRR Hub Worker-0 Pod") |
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.
remove wokrer-0
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.
replaced
workerNodeList[0].Object.Name, createHubConfigMapSecInt.Definition.Name, []string{}, | ||
hub0BRStaticSecIntIPAnnotation) | ||
|
||
By("Creating FRR Hub Worker-1 Pod") |
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.
remove wokrer-1
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.
removed
_, err := secondaryInterface.Create() | ||
|
||
if err != nil { | ||
return fmt.Errorf("fail to create secondary interface: %s.+%d", interfaceName, vlanID) |
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.
verifye erro with Expect
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.
replaced
bad8db4
to
6490aec
Compare
ContainSubstring(externalAdvertisedIPv4Routes[1]), // Second IP address | ||
), "Fail to find all expected received routes") | ||
verifyReceivedRoutes(frrk8sPods, externalAdvertisedIPv4Routes[1]) | ||
verifyBlockedRoutes(frrk8sPods, prefixToBlock) |
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.
Another By() for Verifying blocked routes ?
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.
added
6490aec
to
c82bf5b
Compare
|
||
By("Adding static routes to the speakers") | ||
speakerRoutesMap := buildRoutesMapWithSpecificRoutes(frrk8sPods, hubSecIntIPv4Addresses) | ||
Expect(err).ToNot(HaveOccurred(), "Failed to build speaker route map") |
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.
remove
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.
removed
e8233e8
to
c339d26
Compare
c339d26
to
905384c
Compare
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.
/lgtm
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.
lgtm
Last two test cases of frrk8 epic