Skip to content

fix: extract replicationcontroller selectors - #1189

Open
GeneCodeSavvy wants to merge 1 commit into
stackrox:mainfrom
GeneCodeSavvy:fix/mismatch-selector
Open

fix: extract replicationcontroller selectors#1189
GeneCodeSavvy wants to merge 1 commit into
stackrox:mainfrom
GeneCodeSavvy:fix/mismatch-selector

Conversation

@GeneCodeSavvy

Copy link
Copy Markdown

Resolves #1188

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.76%. Comparing base (dbd7529) to head (bd3a6b0).
⚠️ Report is 309 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1189       +/-   ##
===========================================
- Coverage   62.36%   30.76%   -31.60%     
===========================================
  Files         197      239       +42     
  Lines        4854     6536     +1682     
===========================================
- Hits         3027     2011     -1016     
- Misses       1439     4349     +2910     
+ Partials      388      176      -212     
Flag Coverage Δ
unit 30.76% <100.00%> (-31.60%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rhybrillou rhybrillou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good overall.
Could you please use testify packages (assert or require) for the test validation instead of manual checks and calls to t.Fatal ?

Comment on lines +6 to +7

coreV1 "k8s.io/api/core/v1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
coreV1 "k8s.io/api/core/v1"
"github.com/stretchr/testify/require"
coreV1 "k8s.io/api/core/v1"

Comment on lines +21 to +23
if !found {
t.Fatal("expected selector to be found")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !found {
t.Fatal("expected selector to be found")
}
require.True(t, found, "expected selector to be found")

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.

[BUG] mismatching-selector registers ReplicationController but appears to skip it

2 participants