Skip to content
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

chore: new-filter and unit test covering cluster-scoped and group defined resources #1417

Merged
merged 17 commits into from
Nov 15, 2024

Conversation

cmwylie19
Copy link
Collaborator

Description

We are running our unit tests on Pods mostly, we need more complex Kubernetes resources to test upon.

Related Issue

Fixes #1398

Relates to #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Signed-off-by: Case Wylie <[email protected]>
Signed-off-by: Case Wylie <[email protected]>
Signed-off-by: Case Wylie <[email protected]>
@cmwylie19 cmwylie19 requested a review from a team as a code owner November 12, 2024 16:15
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.55%. Comparing base (cb666a3) to head (fabbd2d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1417      +/-   ##
==========================================
+ Coverage   78.37%   78.55%   +0.17%     
==========================================
  Files          36       36              
  Lines        1702     1716      +14     
  Branches      379      386       +7     
==========================================
+ Hits         1334     1348      +14     
  Misses        366      366              
  Partials        2        2              
Files with missing lines Coverage Δ
src/fixtures/loader.ts 100.00% <100.00%> (ø)
src/lib/assets/rbac.ts 96.77% <ø> (ø)
src/lib/filter/adjudicators.ts 100.00% <100.00%> (ø)
src/lib/filter/filter.ts 97.50% <100.00%> (+0.13%) ⬆️
src/lib/helpers.ts 97.20% <100.00%> (+0.03%) ⬆️

Copy link
Collaborator

@btlghrants btlghrants left a comment

Choose a reason for hiding this comment

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

Just a couple simple-ish things.

src/fixtures/data/admission-create-clusterrole.json Outdated Show resolved Hide resolved
src/fixtures/data/admission-create-deployment.json Outdated Show resolved Hide resolved
src/lib/filter/filter.ts Outdated Show resolved Hide resolved
src/lib/helpers.test.ts Outdated Show resolved Hide resolved
@cmwylie19 cmwylie19 changed the title chore: unit test covering cluster-scoped and group defined resources chore: new-filter and unit test covering cluster-scoped and group defined resources Nov 13, 2024
@cmwylie19 cmwylie19 added this to the v0.40.0 milestone Nov 14, 2024
Signed-off-by: Case Wylie <[email protected]>
@cmwylie19 cmwylie19 enabled auto-merge (squash) November 15, 2024 14:56
Copy link
Collaborator

@btlghrants btlghrants left a comment

Choose a reason for hiding this comment

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

Looks mostly great -- just that one little !.

src/lib/filter/filter.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@btlghrants btlghrants left a comment

Choose a reason for hiding this comment

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

LGTM!

@cmwylie19 cmwylie19 merged commit b769110 into main Nov 15, 2024
43 of 44 checks passed
@cmwylie19 cmwylie19 deleted the 1398 branch November 15, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Unit Test Covering Cluster Scoped, Group Resources
3 participants