Skip to content

Increase mail module test coverage to 70%+ with focused unit tests#1386

Merged
hwbrzzl merged 10 commits into
masterfrom
copilot/increase-test-coverage-mail-module
Mar 5, 2026
Merged

Increase mail module test coverage to 70%+ with focused unit tests#1386
hwbrzzl merged 10 commits into
masterfrom
copilot/increase-test-coverage-mail-module

Conversation

Copilot AI commented Mar 5, 2026

Copy link
Copy Markdown
Contributor
  • Review latest new PR comments and identify actionable changes
  • Check recent CI/workflow failures for relevance
  • Run baseline mail tests before changes
  • Restore non-requested mock.MatchedBy usages in mail tests
  • Keep only the requested AnythingOfType simplification for bind callback matcher
  • Run targeted mail tests and gofmt
  • Run automated code review and security scan
  • Reply to new actionable comments with commit hash
Original prompt

This section details on the original issue you should resolve

<issue_title>Task 1.3: Mail Module - Increase test coverage from 42.26% to 70%</issue_title>
<issue_description>Parent Issue: goravel/goravel#43
Priority: 1
Current Coverage: 42.26% (393/930 lines covered, 499 missed)
Target Coverage: 70%
Estimated Impact: +2.5% overall coverage

Focus Areas

  • Email sending with different drivers
  • Attachment handling
  • Template rendering
  • Queue integration

Implementation Repository

goravel/framework - mail module</issue_description>

Comments on the Issue (you are @copilot in this section)

@hwbrzzl Closing - creating as sub-tasks in goravel/goravel#43 instead

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ervice provider

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Copilot AI changed the title [WIP] Increase test coverage for Mail module to 70% Increase mail module test coverage to 70%+ with focused unit tests Mar 5, 2026
@hwbrzzl
hwbrzzl marked this pull request as ready for review March 5, 2026 09:13
@hwbrzzl
hwbrzzl requested a review from a team as a code owner March 5, 2026 09:13
@codecov

codecov Bot commented Mar 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.18%. Comparing base (29a6104) to head (6fab0aa).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1386      +/-   ##
==========================================
+ Coverage   69.40%   71.18%   +1.78%     
==========================================
  Files         292      292              
  Lines       19563    19564       +1     
==========================================
+ Hits        13578    13927     +349     
+ Misses       5403     5054     -349     
- Partials      582      583       +1     

☔ 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.

@hwbrzzl hwbrzzl 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.

Thanks for improving test coverage! I've added some suggestions for optimization and best practices.

Comment thread crypt/aes_test.go Outdated
}

func TestNewAES(t *testing.T) {
t.Run("valid key lengths", func(t *testing.T) {

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.

Optimization: Consider using t.Parallel() for these subtests since they're independent. This would speed up test execution:

t.Run("valid key lengths", func(t *testing.T) {
    t.Parallel()
    // ...

Comment thread crypt/aes_test.go Outdated
cases := []struct {
name string
key string
}{

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.

Best Practice: Consider using more descriptive test data or constants. For example:

const (
    testKeyAES128 = "1234567890123456" // 16 bytes
    testKeyAES192 = "123456789012345678901234" // 24 bytes
    testKeyAES256 = "12345678901234567890123456789012" // 32 bytes
)

This makes the test more readable and the key lengths more obvious.

Comment thread crypt/aes_test.go Outdated
}
})

t.Run("empty key in artisan mode", func(t *testing.T) {

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.

Code Quality: The RuntimeMode manipulation pattern could be extracted into a test helper if used elsewhere. Consider:

func setRuntimeMode(t *testing.T, mode int) {
    original := support.RuntimeMode
    support.RuntimeMode = mode
    t.Cleanup(func() { support.RuntimeMode = original })
}

Then use: setRuntimeMode(t, support.RuntimeArtisan)

Comment thread crypt/aes_test.go Outdated
func TestEncryptString(t *testing.T) {
t.Run("invalid key", func(t *testing.T) {
aes := &AES{
json: json.New(),

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.

Potential Issue: This test creates an AES instance with an invalid key but doesn't verify the specific error. The actual error from aes.NewCipher() could be more specific. Consider asserting the error message contains expected text to ensure proper error propagation.

Comment thread crypt/aes_test.go Outdated
jsonMock.EXPECT().Marshal(mock.Anything).Return(nil, assert.AnError).Once()

aes := &AES{
json: jsonMock,

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.

Code Duplication: The 32-byte key []byte("11111111111111111111111111111111") is repeated multiple times. Consider extracting this into a package-level constant or test helper:

var testValidKey32 = []byte("11111111111111111111111111111111")

func newTestAES(t *testing.T) *AES {
    return &AES{
        json: json.New(),
        key:  testValidKey32,
    }
}

Comment thread crypt/aes_test.go Outdated

func TestDecryptString(t *testing.T) {
t.Run("invalid key", func(t *testing.T) {
validAES := &AES{

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.

Test Coverage: This test uses "e30=" (base64 for {}), which is clever but limited. Consider adding more comprehensive error path tests:

  • Invalid base64 input (should fail in DecodeString)
  • Valid base64 but malformed JSON (should fail in Unmarshal)
  • Valid JSON but missing iv or value keys (already covered in source but not tested here)

These edge cases would provide better coverage of DecryptString error handling.

Comment thread crypt/aes_test.go Outdated
}

func TestEncryptString(t *testing.T) {
t.Run("invalid key", func(t *testing.T) {

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.

Test Quality: Consider also testing:

  • Empty string encryption/decryption
  • Very large strings (performance/buffer handling)
  • Strings with special characters, unicode, emojis
  • Binary data edge cases

This would ensure the encryption/decryption is robust for real-world use cases.

Comment thread mail/application_unit_test.go Outdated
Headers(map[string]string{"X-Test": "yes"}).
Content(contractsmail.Content{Html: "<h1>Hello</h1>", View: "mail.tmpl", Text: "mail.txt", With: contentWith}).(*Application)

assert.Same(t, instance, chained)

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.

Performance optimization: The assertion assert.Same(t, instance, chained) is good, but consider adding a comment explaining that builder methods return the same instance for method chaining (fluent interface pattern). This makes the design decision explicit for future maintainers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: added a clarifying comment at the fluent-chain assertion to document that builder methods should return the same cloned instance.

Comment thread mail/application_unit_test.go Outdated

mockQueue.EXPECT().Job(mock.Anything, mock.Anything).
Run(func(_ contractsqueue.Job, args ...[]contractsqueue.Arg) {
assert.Len(t, args, 1)

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.

Potential issue: The test verifies specific arguments at indices 0, 1, 3, 5, 8, and 9, but does not validate args[0][2], args[0][4], args[0][6], and args[0][7]. Consider adding assertions for all 10 arguments to ensure complete test coverage, or document why certain indices are skipped.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: the queue argument test now validates all 10 packed arguments, including indices 2, 4, 6, and 7.

Comment thread mail/application_unit_test.go Outdated
assert.NoError(t, err)
assert.NotNil(t, app)
assert.Equal(t, mockConfig, app.config)
})

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.

Code quality: Consider using assert.ErrorContains(t, err, "unsupported") or a more specific error check instead of just assert.Error(t, err). This makes the test more robust and clearly documents what error is expected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: the unsupported-driver branch now uses assert.ErrorContains(..., "not supported") for a more specific expectation.

Comment thread mail/application_unit_test.go Outdated
assert.Nil(t, app)
assert.Error(t, err)
})
}

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.

Best practice: This test could be more specific about the expected error. Consider using assert.ErrorContains(t, err, "attachment") or checking for a file-not-found error to make the test intention clearer and easier to debug if it fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: the attachment error test now checks assert.ErrorIs(err, os.ErrNotExist) to make the failure expectation explicit.

Comment thread mail/application_unit_test.go Outdated
assert.Equal(t, binding.Mail, relation.Bindings[0])
assert.Equal(t, binding.Bindings[binding.Mail].Dependencies, relation.Dependencies)
assert.Empty(t, relation.ProvideFor)
}

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.

Code quality & readability: The nested callback testing could be refactored for better maintainability. Consider extracting each scenario (withoutConfig, withoutQueue, withAll) into separate subtests using t.Run(). This would improve readability, make test failures easier to identify, and allow running specific scenarios in isolation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: refactored the nested Register callback scenarios into t.Run(...) subtests (without config, without queue, with config and queue) for readability and isolation.

Comment thread mail/options_test.go Outdated
assert.Empty(t, mail.Envelope().To)
assert.Empty(t, mail.Headers())

returned := mail.OnConnection("redis").OnQueue("emails")

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.

Test completeness: Consider adding edge case tests for better coverage: 1) calling OnConnection() or OnQueue() multiple times to verify the last value wins, 2) calling methods with empty strings, and 3) verifying idempotency. This would ensure the Queue builder behaves correctly in all scenarios.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 42bfe07: expanded TestQueueMail with edge-case subtests for repeated setters (last value wins) and empty-string inputs.

@hwbrzzl

hwbrzzl commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

@copilot There are some comments, but they may not all be correct. Check and fix them if needed.

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

Copilot AI commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot There are some comments, but they may not all be correct. Check and fix them if needed.

Reviewed the actionable comments and applied the relevant mail-test fixes in 42bfe07. I also re-ran go test ./mail, then code review and CodeQL checks (no findings).

@hwbrzzl hwbrzzl 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.

@copilot Fix the comments below.

Comment thread mail/application_unit_test.go Outdated

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.

Merge this file into mail/application_test.go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 3c5f2ba: merged the unit coverage tests into mail/application_test.go and removed mail/application_unit_test.go. No UI changes (test-only update).

Comment thread mail/application_unit_test.go Outdated

t.Run("html render failed", func(t *testing.T) {
template := mocksmail.NewTemplate(t)
template.EXPECT().Render("mail.tmpl", mock.Anything).Return("", errors.New("render failed")).Once()

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.

Use mock.AnythingOfType instead of mock.Anything.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 0bd319d: replaced mock.Anything with typed mock.MatchedBy(...) matchers for template render arguments. No UI changes (test-only update).

Comment thread mail/application_unit_test.go Outdated
queue: &contractsmail.Queue{Connection: "redis", Queue: "emails"},
}

mockQueue.EXPECT().Job(mock.Anything, mock.Anything).

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.

Don't use mock.Anything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 0bd319d: removed mock.Anything in the queue job expectation and switched to typed matchers that also validate the expected job signature. No UI changes (test-only update).

Copilot AI and others added 2 commits March 5, 2026 09:58
…hers

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

Copilot AI commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Fix the comments below.

Applied the requested fixes in 3c5f2ba and 0bd319d, then re-ran go test ./mail, code review, and CodeQL successfully. No UI changes (test-only update).

@hwbrzzl hwbrzzl 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.

Comment thread mail/application_test.go Outdated

app.EXPECT().Bind(
binding.Mail,
mock.MatchedBy(func(callback interface{}) bool {

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.

Use mock.AnythingOfType instead of mock.MatchedBy, use any instead of interface{}, optimize other code as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in d865689 (plus e3db6f2/54bc410): switched the requested matcher sites to mock.AnythingOfType, replaced touched callback signatures with any, and aligned related expectations in mail/application_test.go. No UI changes (test-only), so no screenshot is applicable.

Copilot AI and others added 4 commits March 5, 2026 10:10
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

Copilot AI commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

Addressed the latest requested test updates in d865689/e3db6f2/54bc410 and re-ran go test ./mail, code review, and CodeQL successfully. No UI changes (test-only), so no screenshot is applicable.

Comment thread mail/application_test.go
Comment on lines +518 to +520
mock.AnythingOfType("func(foundation.Application) (interface {}, error)"),
).
Run(func(_ interface{}, callback func(contractsfoundation.Application) (interface{}, error)) {
Run(func(_ any, callback func(contractsfoundation.Application) (any, error)) {

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.

@copilot I mean the code below is unnecessary,

mock.MatchedBy(func(callback interface{}) bool {
			_, ok := callback.(func(contractsfoundation.Application) (interface{}, error))
			return ok
		}),

not others like:

mock.MatchedBy(matchWithID)

mock.MatchedBy(func(job contractsqueue.Job) bool { return job != nil && job.Signature() == "goravel_send_mail_job" }),
		mock.MatchedBy(func(args []contractsqueue.Arg) bool { return len(args) == 10 }),
	).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 6fab0aa: restored the mock.MatchedBy(matchWithID) and queue mock.MatchedBy(...) matchers, and kept only the bind-callback simplification. No UI changes (test-only), so there is no screenshot to provide.

…ation

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
@hwbrzzl
hwbrzzl merged commit 374fa4e into master Mar 5, 2026
17 of 18 checks passed
@hwbrzzl
hwbrzzl deleted the copilot/increase-test-coverage-mail-module branch March 5, 2026 11:13
hwbrzzl added a commit that referenced this pull request Mar 11, 2026
* chore: Update upgrade DB packages (#1374)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Internalize file rotation logic from goravel/file-rotatelogs (#1375)

* Initial plan

* Implement internal file rotation to replace goravel/file-rotatelogs

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Improve cleanup logic with glob pattern matching and add comprehensive tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Address code review feedback: fix trailing whitespace, add cleanup wait, and make tests deterministic

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* optimize

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: Bowen <hwbrzzl@gmail.com>

* chore: Update non-major dependencies (#1373)

* chore: Update non-major dependencies

* optimize

* optimize

* renovate/non-major-dependencies

* optimize

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bowen <hwbrzzl@gmail.com>

* feat: [#726] Add HTTP server and client telemetry instrumentation [5] (#1326)

* add http middleware

* add http transport

* optimise http telemetry package

* add test cases for Telemetry middleware

* add auto instrumentation configs

* add config to enable Telemetry for http clients

* add docs for config facade

* add ConfigFacade nil warning

* disable default telemetry

* optimise transport

* add kill switch for instrumentation

* update the stubs

* remove unnecessary handler

* optimise log instrumentation

* move route registration in the end

* lazily initialize middleware and transport to work with new application_builder

* optimise channel test

* optimise channel test

* accept telemetry facade as an input instead of using global instance

* use a callback to resolve the telemetry facade instance

* optimise grpc handler to remove usage of telemetry and config facade

* optimise the grpc handler

* use telemetry transport if enabled

* optimise http auto instrumentation

* optimize log test cases

* optimise

* optimise

* optimise

* optimise

* revert PR#1357

* fix log test cases

* revert GRPC changes

* optimise middleware

* remove zipkin trace driver

* correct GRPC enable condition

* correct http transport enable condition

* correct log channel enable condition

* update go mod

* fix test cases

* fix test cases

* fix test cases

* fix tests

---------

Co-authored-by: Bowen <hwbrzzl@gmail.com>

* chore: optimize runner tests for Windows (#1377)

Co-authored-by: Bowen <hwbrzzl@github.com>

* chore: Update non-major dependencies (#1378)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: runner stuck (#1381)

* fix: runner stuck

* optimize

* optimize

* optimize

* optimize

* optimize

* chore: Update non-major dependencies (#1382)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: [#849] Add table support to the console context (#1380)

* add table function in cli

* add test cases for new method Table

* update mocks

* add column level styles

* fix lint error

* move style vars to new file

* add GlobalHuhTheme

* update go mod tidy

* feat: [#546] artisan command up and down to set website Maintenance mode (#1198)

* Add up and down command

* Use file helper to create files and add unit tests

* Fix the foundation.App dependency

* Use support/path instead of foundation.App

* Add unit test case

* Add some missing checks

* Add more missing checks

* One more

* Fix tmpfile path

* Use T.TempDir instead of os.TempDir in tests

* Add reason to the down command

* Add option to the tests

* Change the maintenance file name

* close created file handles

* Defer abort

* Fix the linter issue

* Add more options to the down command

* Use options

* Check for maintenance mode respond

* Fix down_command_test

* Add more unit test cases

* Fix more lint issues

* Fix lint issue

* fix tests

* fix tests

* fix tests

* fix tests

* Address PR comments

* Fix check_for_maintenance_test

* Check Aborts in check_for_maintenance

* Rename check_for_maintenance_mode

* Fix and Write more unit tests for check_for_maintenance_mode middleware

* fix down command

* Fix down_command_test

* Fix up_command

---------

Co-authored-by: Bowen <hwbrzzl@gmail.com>

* feat: Laravel-style Collection library (#1134)

Merges comprehensive Collection library with 100+ methods for data manipulation.

Implements both eager (Collection) and lazy (LazyCollection) evaluation strategies.
Closes goravel/goravel#566

Follow-up improvements tracked in: goravel/goravel#883

* Increase route module coverage for factory, provider, and runner wiring paths (#1384)

* Initial plan

* test(route): cover route factory and service provider paths

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* optimize

* optimize

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: Bowen <hwbrzzl@gmail.com>

* chore: optimize interface (#1389)

* Increase crypt module coverage by exercising AES key validation and failure paths (#1385)

* Initial plan

* test: add crypt AES edge-case coverage

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: improve readability of crypt key-length cases

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: address crypt PR feedback and simplify test structure

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: use configmock EXPECT style in TestNewAES

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: standardize config mock setup across aes tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Increase filesystem module test coverage for storage, service provider, and file facade paths (#1387)

* Initial plan

* Add filesystem application and provider coverage tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Polish filesystem coverage tests after review feedback

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Refine filesystem tests based on review feedback

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Apply review style suggestions in filesystem tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Increase mail module test coverage to 70%+ with focused unit tests (#1386)

* Initial plan

* test(mail): add focused unit coverage for application, options, and service provider

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): address review feedback on test specificity and readability

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): merge application unit tests and remove untyped mock matchers

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): deduplicate matchers and tighten queue job assertion

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): use AnythingOfType and any in application tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): derive bind callback type string from any signature

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): simplify bind callback type matcher

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): use AnythingOfType for template render expectations

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(mail): restore specific MatchedBy assertions per review clarification

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Increase hash module coverage with targeted tests for driver selection and service provider paths (#1388)

* Initial plan

* test: increase hash module coverage for driver and provider paths

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: cover hash provider and driver selection paths

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: address hash module review feedback

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: merge hash module tests into application_test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: use EXPECT API in hash service provider test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: use any alias in hash singleton callback test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: add AI instructions file (#1393)

* Increase core framework coverage via targeted service provider and builder-path tests (#1391)

* Initial plan

* Add service provider coverage tests for core modules

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Expand core module coverage tests and validate suite

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Revert unintended test module dependency drift

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Address actionable PR review suggestions in coverage tests

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Finalize review feedback handling

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Revert unintended tests module dependency updates

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Tighten provider test matchers per review feedback

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* Increase infrastructure module coverage by adding Process/Packages/Log/Schedule tests and fixing errors.As target forwarding (#1392)

* Initial plan

* test(errors): cover As/Unwrap/Ignore/Join edge cases

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(errors): use wrapped error in As coverage test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module file changes

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: add coverage for process packages log schedule modules

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: refine schedule coverage tests per review

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module dependency updates

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: assert boot no-panic in log and process providers

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: finalize review feedback responses for boot test assertions

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module file changes

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: expand service-layer coverage across Event, Queue, gRPC, Cache, and Console (#1390)

* Initial plan

* test(event): cover service provider and queued listener dispatch paths

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: finalize event coverage validation

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module dependency updates

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test(event): address review suggestions for robust command matching and queue error path

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: finalize PR feedback follow-up

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module file updates

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: add focused coverage cases for queue grpc cache console

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: clarify queue nil args in empty chain test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module dependency updates

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* test: avoid nil context in console usage-error test

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: finalize lint ci fix validation

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: revert unintended tests module dependency drift

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: Update non-major dependencies (#1399)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: add generate flag to artisan build command (#1402)

* feat: [#911] add query context accessor (#1401)

* chore: optimize agents (#1396)

* chore: optimize agents

* optimize

* address comments

* Initial plan

* fix: backport migrate rollback default handling to v1.17.x

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* chore: align branch tree with v1.17.x before backporting rollback fix

Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>

* optimize

* optimize

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bowen <hwbrzzl@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
Co-authored-by: krishan kumar <84431594+krishankumar01@users.noreply.github.com>
Co-authored-by: Bowen <hwbrzzl@github.com>
Co-authored-by: Mohan Raj <praem1990@gmail.com>
Co-authored-by: Ahmed M. Ammar <ahmed3mar@outlook.com>
Co-authored-by: 耗子 <haozi@loli.email>
Co-authored-by: ALMAS <almas.cc@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task 1.3: Mail Module - Increase test coverage from 42.26% to 70%

2 participants