-
Notifications
You must be signed in to change notification settings - Fork 366
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
[Multicast] Add multicast e2e tests #2986
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2986 +/- ##
==========================================
- Coverage 59.79% 51.63% -8.17%
==========================================
Files 306 300 -6
Lines 26178 35724 +9546
==========================================
+ Hits 15654 18447 +2793
- Misses 8807 15527 +6720
- Partials 1717 1750 +33
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-multicast-e2e |
3 similar comments
/test-multicast-e2e |
/test-multicast-e2e |
/test-multicast-e2e |
4089dbd
to
50b7ecd
Compare
/test-multicast-e2e |
1 similar comment
/test-multicast-e2e |
f226cc5
to
19d711a
Compare
/test-multicast-e2e |
1 similar comment
/test-multicast-e2e |
19d711a
to
3c93954
Compare
/test-multicast-e2e |
1 similar comment
/test-multicast-e2e |
3c93954
to
4223588
Compare
/test-multicast-e2e |
4223588
to
33d696c
Compare
/test-multicast-e2e |
1 similar comment
/test-multicast-e2e |
33d696c
to
bbd5eb1
Compare
/test-multicast-e2e |
bbd5eb1
to
aa23e9f
Compare
/test-multicast-e2e |
aa23e9f
to
6f27d48
Compare
/test-multicast-e2e |
6f27d48
to
e1640ae
Compare
/test-multicast-e2e |
e1640ae
to
e5e70c0
Compare
e5e70c0
to
48fbf2b
Compare
fd7a796
to
a503029
Compare
/test-multicast-e2e |
1 similar comment
/test-multicast-e2e |
9791ccd
to
7312995
Compare
/test-multicast-e2e |
7312995
to
dc7aff5
Compare
/test-multicast-e2e |
dc7aff5
to
939cc22
Compare
test/e2e/framework.go
Outdated
return []string{}, err | ||
} | ||
agentConfData := configMap.Data["antrea-agent.conf"] | ||
for _, line := range strings.Split(agentConfData, "\n") { |
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.
var agentConf agentconfig.AgentConfig
if err := yaml.Unmarshal([]byte(agentConfData, &agentConf); err != nil {
return nil, fmt.Errorf("failed to unmarshal Agent config from ConfigMap: %v", err)
}
return agentConfData.MulticastInterfaces, nil
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.
updated
test/e2e/multicast_test.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
multicastInterfaces, err := data.GetMulticastInterfaces(antreaNamespace) |
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.
Move it to out of the loop as it's same for all Nodes.
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.
updated
test/e2e/multicast_test.go
Outdated
} else { | ||
nodeIdx = workerIdx | ||
workerIdx++ | ||
} |
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.
Maybe just iterate clusterInfo.nodes
, all above code can be removed.
for i, node := range clusterInfo.nodes {
_, localInterfacesStr, _, err := RunCommandOnNode(node.name, fmt.Sprintf("ls /sys/class/net"))
...
}
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.
updated
test/e2e/multicast_test.go
Outdated
} | ||
|
||
var nodeMulticastInterfaces [][]string | ||
var transportInterface string |
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.
avoid to define such gloabl variables, it should not be hard to pass them via arugments. They are easy to conflict in this package.
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.
updated. removed
test/e2e/multicast_test.go
Outdated
break | ||
} | ||
} | ||
if !multipleInterfacesTested { |
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.
t.Run("runTestMulticastForwardToMultipleInterfaces", func(t *testing.T) {
multipleInterfacesFound := false
var nodeIdx int
for i, ifaces := range nodeMulticastInterfaces {
if len(ifaces) >= 2 {
multipleInterfacesFound = true
nodeIdx = i
break
}
}
if !multipleInterfacesFound {
t.Skip("Skipping test because none of the Nodes has more than one multicast enabled interface")
}
runTestMulticastForwardToMultipleInterfaces(t, data, nodeIdx, 3464, "224.3.4.13")
})
To leverage the Skip
method so that the test will be executed anyway and marked as skipped like other skipped tests.
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.
updated
939cc22
to
4034e32
Compare
/test-multicast-e2e |
2 similar comments
/test-multicast-e2e |
/test-multicast-e2e |
test/e2e/multicast_test.go
Outdated
} | ||
return true, nil | ||
}); err != nil { | ||
t.Fatalf("Error when waiting for multicast routes and stats: %v", err) |
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.
It doesn't wait for multicast 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.
updated
Signed-off-by: Ruochen Shen <src655@gmail.com>
4034e32
to
14758d1
Compare
/test-multicast-e2e |
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
14758d1
to
e00e7aa
Compare
/test-multicast-e2e |
/test-integration |
2 similar comments
/test-integration |
/test-integration |
/skip-integration This PR has nothing to do with integration test but the check kept failing. I have ran the test manually and created #3213 to track the test issue. |
Signed-off-by: Ruochen Shen <src655@gmail.com>
No description provided.