Skip to content

Commit

Permalink
e2e, persistent-ips: Added parallel flag
Browse files Browse the repository at this point in the history
In order to manage failed tests artifacts, the process# is added to the
log file name.

Signed-off-by: Ram Lavi <[email protected]>
  • Loading branch information
RamLavi committed Dec 18, 2024
1 parent 9d531f9 commit 76d06fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test-e2e: ginkgo
export PATH=$$(pwd)/.output/ovn-kubernetes/bin:$${PATH} && \
export REPORT_PATH=$$(pwd)/.output/ && \
cd test/e2e && \
$(GINKGO) -v --timeout=1h --junit-report=${REPORT_PATH}/test-e2e.junit.xml
$(GINKGO) -p -v --timeout=1h --junit-report=${REPORT_PATH}/test-e2e.junit.xml

.PHONY: lint
lint: golangci-lint ## Run golangci-lint linter & yamllint
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func logCommand(args []string, topic string, failureCount int) {
return
}

fileName := fmt.Sprintf(logsDir+"/%d_%s.log", failureCount, topic)
fileName := fmt.Sprintf(logsDir+"/%d_%d_%s.log", GinkgoParallelProcess(), failureCount, topic)
file, err := os.Create(fileName)
if err != nil {
fmt.Printf("Error running command %v, err %v\n", args, err)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/persistentips_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var _ = DescribeTableSubtree("Persistent IPs", func(params testParams) {
JustAfterEach(func() {
if CurrentSpecReport().Failed() {
failureCount++
By(fmt.Sprintf("Test failed, collecting logs and artifacts, failure count %d", failureCount))
By(fmt.Sprintf("Test failed, collecting logs and artifacts, failure count %d, process %d", failureCount, GinkgoParallelProcess()))

logCommand([]string{"get", "pods", "-A"}, "pods", failureCount)
logCommand([]string{"get", "vm", "-A", "-oyaml"}, "vms", failureCount)
Expand Down

0 comments on commit 76d06fe

Please sign in to comment.