Skip to content

Fix(test): import crossplane-runtime v2 in the context storage test - #334

Closed
briankane wants to merge 1 commit into
kubevela:mainfrom
briankane:fix/context-test-import
Closed

briankane wants to merge 1 commit into
kubevela:mainfrom
briankane:fix/context-test-import

Conversation

@briankane

@briankane briankane commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Description of your changes

pkg/context tests stopped compiling on main once #262 merged: its storage_test.go imports crossplane-runtime's v1 test package (github.com/crossplane/crossplane-runtime/pkg/test), which main no longer requires since it moved to crossplane-runtime v2. The PR was built on an older main, so its own CI didn't see it.

This switches the import to github.com/crossplane/crossplane-runtime/v2/pkg/test, as context_test.go already uses.

How has this code been tested

go vet ./pkg/context/ and go test ./pkg/context/ pass.


Summary by cubic

Fixes pkg/context test compilation after the migration to crossplane-runtime v2 left storage_test.go importing the old v1 test package.

Switches the import in storage_test.go to github.com/crossplane/crossplane-runtime/v2/pkg/test, matching what context_test.go already uses.

Written for commit fe04bff. Summary will update on new commits.

View guided diff

kubevela#262 was written against an older main and imported crossplane-runtime's
v1 test package, which main no longer requires, so pkg/context's tests
stopped compiling once it merged.

Signed-off-by: Brian Kane <briankane1@gmail.com>
@briankane briankane added the type/test Test-only or test infrastructure changes label Nov 21, 2026
@briankane
briankane requested a review from Somefive as a code owner November 21, 2026 08:02
@briankane briankane added the priority/critical Highest priority. Must be actively worked on as someone's top priority right now. label Nov 21, 2026
@briankane
briankane requested a review from anoop2811 as a code owner November 21, 2026 08:02
@briankane briankane added the area/testing Unit, e2e and test infrastructure label Nov 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

View guided diff | Re-trigger cubic

@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.59%. Comparing base (d7db9c4) to head (fe04bff).
⚠️ Report is 54 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #334       +/-   ##
===========================================
+ Coverage   62.49%   80.59%   +18.10%     
===========================================
  Files          62       88       +26     
  Lines        4415     7054     +2639     
===========================================
+ Hits         2759     5685     +2926     
- Misses       1324     1369       +45     
+ Partials      332        0      -332     
Flag Coverage Δ
e2etests 37.46% <ø> (?)
unit-test 74.97% <ø> (+12.48%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@briankane

Copy link
Copy Markdown
Member Author

Superseded by #336, which carries the same import fix.

@briankane briankane closed this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Unit, e2e and test infrastructure priority/critical Highest priority. Must be actively worked on as someone's top priority right now. type/test Test-only or test infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant