Skip to content

Add unit tests and GitHub Actions#2

Merged
nshmdayo merged 2 commits intomainfrom
unit-tests-and-github-actions-9624064502948816532
Dec 30, 2025
Merged

Add unit tests and GitHub Actions#2
nshmdayo merged 2 commits intomainfrom
unit-tests-and-github-actions-9624064502948816532

Conversation

@google-labs-jules
Copy link
Contributor

Added comprehensive unit tests for configuration, handlers, and proxy logic. Fixed compilation errors in MITM proxy implementation. Set up GitHub Actions for continuous integration.


PR created automatically by Jules for task 9624064502948816532 started by @nshmdayo

- Fix compilation error in app/proxy/mitm.go by implementing singleConnListener
- Add unit tests for app/config and app/handlers
- Restore and fix unit tests for app/proxy/mitm.go
- Add GitHub Actions workflow for automated testing
- Fix existing proxy_test.go
@google-labs-jules
Copy link
Contributor Author

👋 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!


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

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

@nshmdayo
Copy link
Owner

@jules what are config_test.go and handler_test.go?

@google-labs-jules
Copy link
Contributor Author

@jules what are config_test.go and handler_test.go?

These are the new unit test files added in this PR. app/config/config_test.go contains tests for the LoadConfig function to verify that configuration files are parsed correctly. app/handlers/handlers_test.go contains tests for the ModificationHandler and LoggingHandler functions to ensure they modify requests/responses and log information as expected.

- Fix compilation error in app/proxy/mitm.go by implementing singleConnListener
- Add unit tests for app/config and app/handlers
- Restore and fix unit tests for app/proxy/mitm.go
- Add GitHub Actions workflow for automated testing
- Fix existing proxy_test.go
- Addressed review feedback on test files
@nshmdayo
Copy link
Owner

@jules Why are you changing mitm.go?

@google-labs-jules
Copy link
Contributor Author

Why are you changing mitm.go?

I modified mitm.go to fix a compilation error found during testing. The code was attempting to pass a *tls.Conn to server.Serve, but server.Serve expects a net.Listener. I introduced a helper struct singleConnListener to wrap the tls.Conn and satisfy the net.Listener interface, ensuring server.Serve works correctly with the hijacked connection.

@nshmdayo nshmdayo marked this pull request as ready for review December 30, 2025 07:31
@nshmdayo nshmdayo merged commit 87d6c33 into main Dec 30, 2025
1 check passed
@nshmdayo nshmdayo deleted the unit-tests-and-github-actions-9624064502948816532 branch December 30, 2025 07:31
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