jgosmann / dmarc-metrics-exporter

Export Prometheus metrics from DMARC reports.
MIT License
45 stars 7 forks source link

Fix folder autocreation #16

Closed fl42 closed 2 years ago

fl42 commented 2 years ago

See #15

jgosmann commented 2 years ago

Thank you for the contribution! It might take me after Christmas to try this out. Assuming that this fixes the issue without breaking things, it would be nice to have a regression test. Though, I am not sure if that's easily possible if the previous implementation worked with Greenmail (the dev mail server against which the tests run).

fl42 commented 2 years ago

The issue looks related to the IMAP implementation of Office365, then I'm not sure how to test it with Greenmail I'll have a look to add tests

fl42 commented 2 years ago

I added a test for create_if_not_exists method Is it that you expected?

codecov-commenter commented 2 years ago

Codecov Report

Merging #16 (875502a) into main (59a5825) will increase coverage by 0.55%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   95.61%   96.17%   +0.55%     
==========================================
  Files          23       23              
  Lines         934      940       +6     
==========================================
+ Hits          893      904      +11     
+ Misses         41       36       -5     
Impacted Files Coverage Δ
dmarc_metrics_exporter/imap_queue.py 97.29% <100.00%> (+4.44%) :arrow_up:
dmarc_metrics_exporter/tests/test_imap_queue.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 59a5825...875502a. Read the comment docs.

jgosmann commented 2 years ago

I made some minor changes, see fl42/dmarc-metrics-exporter#1. Please merge them if they look good to you and I will take care to merge them back to this repository and then doing a bugfix release.