Closed goochi1 closed 6 years ago
Hi @goochi1,
I'm not really sure what's going on here - it looks like you accidentally deleted the eicar.txt
file.
Can you provide more context? I'm not able to reproduce the error:
$ git clone --branch v1.1.0 --depth 1 https://github.com/airbnb/binaryalert
$ cd binaryalert
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ ./manage.py unit_test
..........................................................................
----------------------------------------------------------------------
Ran 74 tests in 3.619s
OK
Maybe if you could answer the following questions, I'll be able to better help out:
git log
show as the latest commit?./manage.py
or some other way?git status
show?Hi i will clone and try agian
Hi I believe it was a blocker from my work VPN and runs now fine. thank you for your assistance.
Can i also ask, is there a way of stating a profile i want it to use for my aws cli rather than the default keys?
Great, I'm glad it worked!
Yes, the easiest way to specify a profile is to simply export an environment variable:
export AWS_PROFILE=name-of-your-other-profile
. And that's it! Both the manage.py
CLI and Terraform will use that environment variable to set the profile.
Background
Running for the first time
getting 4 errors:
ERROR: test_match_eicar_string (tests.rules.eicar_rule_test.EicarRuleTest) Should match the exact EICAR string.
Traceback (most recent call last): File "/Users/sgooch/Documents/Stash/binaryalert/tests/rules/eicar_rule_test.py", line 16, in setUp with open(EICAR_TXT_FILE, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/sgooch/Documents/Stash/binaryalert/tests/rules/../files/eicar.txt'
====================================================================== ERROR: test_match_eicar_with_trailing_spaces (tests.rules.eicar_rule_test.EicarRuleTest) Trailing whitespace is allowed after the EICAR string.
Traceback (most recent call last): File "/Users/sgooch/Documents/Stash/binaryalert/tests/rules/eicar_rule_test.py", line 16, in setUp with open(EICAR_TXT_FILE, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/sgooch/Documents/Stash/binaryalert/tests/rules/../files/eicar.txt'
====================================================================== ERROR: test_no_match_if_eicar_is_not_beginning (tests.rules.eicar_rule_test.EicarRuleTest) No match if EICAR string is not the beginning of the file.
Traceback (most recent call last): File "/Users/sgooch/Documents/Stash/binaryalert/tests/rules/eicar_rule_test.py", line 16, in setUp with open(EICAR_TXT_FILE, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/sgooch/Documents/Stash/binaryalert/tests/rules/../files/eicar.txt'
====================================================================== ERROR: test_no_match_if_eicar_is_not_end (tests.rules.eicar_rule_test.EicarRuleTest) No match if non-whitespace comes after the EICAR string.
Traceback (most recent call last): File "/Users/sgooch/Documents/Stash/binaryalert/tests/rules/eicar_rule_test.py", line 16, in setUp with open(EICAR_TXT_FILE, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/sgooch/Documents/Stash/binaryalert/tests/rules/../files/eicar.txt'
Ran 74 tests in 3.971s
FAILED (errors=4) TEST FAILED: Unit tests failed