Merge pull request #46581 from m1093782566/fix-net-perf

Automatic merge from submit-queue (batch tested with PRs 46581, 55426, 54849). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix newline in raw string in e2e net perf case

**Which issue this PR fixes** 

fixes #46083
This commit is contained in:
Kubernetes Submit Queue 2017-11-10 03:30:15 -08:00 committed by GitHub
commit c7644dd104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,7 @@ func (i *IPerfResults) ToTSV() string {
// NewIPerf parses an IPerf CSV output line into an IPerfResult.
func NewIPerf(csvLine string) *IPerfResult {
csvLine = strings.Trim(csvLine, "\n")
slice := StrSlice(strings.Split(csvLine, ","))
if len(slice) != 9 {
framework.Failf("Incorrect fields in the output: %v (%v out of 9)", slice, len(slice))