Skip to content

🧪 test(sdk): add unit tests for plugin loader - #170

Merged
jackby03 merged 3 commits into
mainfrom
test/sdk-loader-tests-2167491828709477134
Aug 29, 2026
Merged

jackby03 merged 3 commits into
mainfrom
test/sdk-loader-tests-2167491828709477134

Conversation

@jackby03

Copy link
Copy Markdown
Owner

Adds comprehensive unit test coverage for LoadPlugins in internal/sdk/loader.go and internal/sdk/loader_unsupported.go.

🎯 What

Adds unit test suite for internal/sdk/loader.go which previously lacked tests.

📊 Coverage

  • Non-existent plugin directory returns nil, nil.
  • Target path being a file returns read directory error.
  • Non-.so files and directories ending with .so are ignored.
  • Corrupt/non-ELF .so files return errors.
  • Dynamic test plugin build and load scenarios:
    • Missing New symbol.
    • Incorrect New symbol signature/type.
    • Valid New symbol producing a valid Module.
  • Partial failure handling when multiple plugins exist in a directory.
  • Unsupported OS platform fallback logic (loader_unsupported.go).

✨ Result

Complete test coverage for internal/sdk plugin loader logic.


PR created automatically by Jules for task 2167491828709477134 started by @jackby03

Add unit tests for internal/sdk/loader.go and loader_unsupported.go
covering non-existent directories, invalid plugin files, symbol checking,
valid plugin loading, and partial failures.

Co-authored-by: jackby03 <70082129+jackby03@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits August 29, 2026 16:17
Add unit tests for internal/sdk/loader.go and loader_unsupported.go
covering non-existent directories, invalid plugin files, symbol checking,
valid plugin loading, and partial failures, with race detector support.

Co-authored-by: jackby03 <70082129+jackby03@users.noreply.github.com>
Add unit tests for internal/sdk/loader.go and loader_unsupported.go
covering non-existent directories, invalid plugin files, symbol checking,
valid plugin loading, partial failures, with race detector and cgo build support.

Co-authored-by: jackby03 <70082129+jackby03@users.noreply.github.com>
@jackby03
jackby03 merged commit 865f489 into main Aug 29, 2026
11 checks passed
@jackby03
jackby03 deleted the test/sdk-loader-tests-2167491828709477134 branch August 29, 2026 20:13
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.

1 participant