-
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: sriov metrics exporter test cases #183
Conversation
c7c57ed
to
5a37445
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.
Overall looks good, Just severall comments
dd1dc08
to
693760e
Compare
9e83ac3
to
caf9da1
Compare
caf9da1
to
7d2ce26
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.
Few comments
}) | ||
|
||
Context("Sriov Metrics Exporter - Netdevice to Netdevice", func() { | ||
It("Sriov Metrics Exporter - Netdevice to Netdevice - Same PF", reportxml.ID("74762"), func() { |
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.
change the test names to:
Same PF
Different PF
Different Worker
Otherwrise the full name will be:
SriovMetricsExporter Sriov Metrics Exporter - Netdevice to Netdevice Sriov Metrics Exporter - Netdevice to Netdevice - Same PF
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
}) | ||
}) | ||
|
||
Context("Sriov Metrics Exporter - Netdevice to Vfiopci", func() { |
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.
Also test naming issue
WithResourceRequest("1Gi", "1Gi", 4). | ||
WithEnvVar("RUN_TYPE", "testcmd"). | ||
GetContainerCfg() | ||
Expect(err).ToNot(HaveOccurred()) |
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 a failure comment
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
NetConfig.PrometheusOperatorNamespace, metav1.ListOptions{LabelSelector: "prometheus=k8s"}) | ||
Expect(err).ToNot(HaveOccurred(), "Failed to get prometheus pods") | ||
|
||
glog.V(90).Infof(fmt.Sprintf("Running PromQL query: %s", query)) |
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.
The same, please replace glog
by By
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
7d2ce26
to
ff533c2
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. Just one super minor comment
} | ||
|
||
func definePod(role, devType, worker string) *pod.Builder { | ||
var podbuild *pod.Builder |
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.
pls remove and use :=
16dfb17
to
d1b3311
Compare
d1b3311
to
b4d8585
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.
Two really small comments. Lots good!
}) | ||
}) | ||
|
||
Context("Sriov Metrics Exporter - Netdevice to Vfiopci - ", func() { |
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.
Do you need a space after - ? Is a space automatically added between Context and It for Polarion?
Same for above.
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.
I am not sure how it works with Polarion when it merges Context and It descriptions. So added space just in case it goes otherwise.
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.
I checked on an existing test it adds a space automatically between the context and It you can remove the space
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.
Yeah, i tested it today. So removed spaces now 👍
}, | ||
90*time.Second, 30*time.Second).Should(BeTrue(), "PromQL output does not contain server pod metrics") | ||
|
||
By("Verify RX and TX packets counters are >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.
NitPicking: > 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.
updated
b4d8585
to
2c2f619
Compare
2c2f619
to
bddb870
Compare
lgtm |
No description provided.