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

[BUG] Make automated tests independent from environment #126

Closed
HugoSoszynski opened this issue Nov 12, 2019 · 1 comment
Closed

[BUG] Make automated tests independent from environment #126

HugoSoszynski opened this issue Nov 12, 2019 · 1 comment
Labels
bug Something isn't working easy pending Issue have a pull request waiting for review technical tests
Milestone

Comments

@HugoSoszynski
Copy link
Contributor

Describe the bug

Currently automated testing of the manager is performed as if darwin was installed on the local environment.

The tests require /var/log/darwin, /var/run/darwin & /var/sockets/darwin which may not be present on the testing environment.

Plateform (please complete the following information):

  • OS (version): any
  • Darwin version: 1.1 and earlier

To Reproduce

Steps to reproduce the behavior:

  1. Clone darwin repository
  2. Compile
  3. Configure the tests
  4. Launch the tests

Expected behavior

Testing works on any environment having the required dependencies without more manipulation by the user.

Additional context

The problem seems to be when testing the manager.

It seems like we are going to need improvement on the manager to be able to configure the default paths for filters files.

@HugoSoszynski
Copy link
Contributor Author

The associated PR was merged too soon.
We did a rollback and need to replay the PR.

See #160.

@HugoSoszynski HugoSoszynski reopened this Feb 7, 2020
@HugoSoszynski HugoSoszynski added the pending Issue have a pull request waiting for review label Feb 7, 2020
HugoSoszynski added a commit that referenced this issue Jun 18, 2020
# ✨ Pull Request Template
‼️ Once all the **checklist** is **done** you have to:
  * **stash merge** this pull request
  * **delete** the corresponding **branch**
  * **close** the associated **issue**

## 📃 Type of change

**Breaking change**: fix or feature that would cause existing functionality to not work as expected.

## 💡 Related Issue(s)

- Resolve #126 

## ✒️ Description

__This PR is a "replay" of #145 that was merged too soon.__

Now we can set a prefix and a suffix for darwin path, e.g for the log files, if your prefix is 'tmp' and your suffix 'darwin' they will be found in /tmp/logs/darwin ([prefix]/logs[suffix])

They can be set from the manager options :
usage: manager.py [-h] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                  [-p PREFIX_DIRECTORIES]
                  [-s SUFFIX_DIRECTORIES | --no-suffix-directories]
                  config_file

By default the prefix is '/var' and the suffix '/darwin'. Like said in the usage, you can't remove the default prefix, but you can remove the default suffix with the '--no-suffix-directories' options.

## 🎯 Test Environments

### FreeBSD 12.0
- clang++  6.0.1
- CMake 3.7.2
- Python 3

### Ubuntu 19.0.4
- g++ 8.3.0
- CMake 3.7.2
- Python 3

## ✔️ Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] New and existing unit tests pass locally with my changes

</br>

- [x] 🙋 **I certify on my honor that all the information provided is true, and I've done all I can to deliver a high quality code**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy pending Issue have a pull request waiting for review technical tests
Projects
None yet
Development

No branches or pull requests

2 participants