nextcloud / nextcloud/mail

SmimeServiceTest reads non-existing file

Open
#10,093 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  1. Run composer run test:unit:dev
  2. See warnings
Expected behavior

No warnings ;)

Actual behavior
PHP Warning:  file_get_contents(/var/www/html/apps-extra/mail/tests/Unit/Service/../../data/smime-certs/chain@imap.localhost.key): Failed to open stream: No such file or directory in /var/www/html/apps-extra/mail/tests/Unit/Service/SmimeServiceTest.php on line 81
PHP Warning:  file_get_contents(/var/www/html/apps-extra/mail/tests/Unit/Service/../../data/smime-certs/chain-partial@imap.localhost.key): Failed to open stream: No such file or directory in /var/www/html/apps-extra/mail/tests/Unit/Service/SmimeServiceTest.php on line 81
PHP Warning:  file_get_contents(/var/www/html/apps-extra/mail/tests/Unit/Service/../../data/smime-certs/chain-leaf-only@imap.localhost.key): Failed to open stream: No such file or directory in /var/www/html/apps-extra/mail/tests/Unit/Service/SmimeServiceTest.php on line 81

Mail app version

c937e8f30ace48452c07a6b838c514f1bab38dfa

Additional info

Looks like a regression from https://github.com/nextcloud/mail/pull/9677

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/Unit/Service/SmimeServiceTest.php, especially line 81 and the references to the missing files under data/smime-certs/. Run composer run test:unit:dev to reproduce the warnings. Done means the test command no longer reports file_get_contents warnings for the three listed key files.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.