Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test framework and basic test cases #18

Merged
merged 1 commit into from
Dec 27, 2019
Merged

Conversation

lfos
Copy link
Contributor

@lfos lfos commented Dec 21, 2019

This is a first draft of a test suite. The dependence on the Sender Score of some hardcoded IP addresses is certainly not optimal but I don't see an easy and portable way to work around that. I am open to improvement suggestions. Once we agree on the framework, I'd be happy to provide more modules, such as tests for the whitelist feature.

Use `make check` from the test/ subdirectory to run the tests.

The basic test cases currently hardcode IP addresses that are known to
be reputable or known spammer addresses. These test cases can be
substituted with more robust implementations later.
@lfos
Copy link
Contributor Author

lfos commented Dec 21, 2019

Just pushed an updated patch with the following changes:

  • Directories containing spaces are now supported.
  • The filter-senderscore binary can be configured using the FILTER_BIN variable. Default command line arguments can be changed using FILTER_OPTS.
  • The temporary test directory is now removed after running the tests.

@poolpOrg
Copy link
Owner

Thanks, I will look into this carefully tomorrow and comment / merge.

There's a protocol change that needs to be reflected into the filter and very likely into the tests too.

@lfos
Copy link
Contributor Author

lfos commented Dec 22, 2019

Well, all tests are versioned, so assuming that the protocol version will be bumped, we can relabel the current tests as legacy tests and create new tests for the new version.

@poolpOrg poolpOrg merged commit c5b4329 into poolpOrg:master Dec 27, 2019
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.

2 participants