8000 Ignore empty entries when splitting skip-package filter by princejain756 · Pull Request #1691 · onsi/ginkgo · GitHub
[go: up one dir, main page]

Skip to content
8000

Ignore empty entries when splitting skip-package filter - #1691

Open
princejain756 wants to merge 1 commit into
onsi:masterfrom
princejain756:fix-1690-skip-package-empty-entries
Open

princejain756 wants to merge 1 commit into
onsi:masterfrom
princejain756:fix-1690-skip-package-empty-entries

Conversation

@princejain756
Copy link
Copy Markdown

Summary

  • Trim whitespace and skip empty entries when splitting cliConfig.SkipPackage on commas in FindSuites.
  • Previously, a trailing, leading, or repeated comma in skip-package produced an empty filter entry that matched every suite path via strings.Contains, causing unrelated test suites to be marked TestSuiteStateSkippedByFilter.
  • Add unit test coverage in ginkgo/internal/testsuite_test.go for empty and whitespace-only entries in skip-package.

Fixes #1690

When splitting the comma-separated `skip-package` flag, a trailing, leading,
or consecutive comma produces an empty string entry. Passing that empty
string to `strings.Contains(suites[idx].Path, skipFilter)` matches every
suite path and causes Ginkgo to skip all packages and exit 0.

Trim whitespace around each `skip-package` entry and skip empty entries
before checking `strings.Contains`.

Fixes onsi#1690

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An empty --skip-package entry skips unrelated packages and exits 0

1 participant

0