mirror of https://github.com/CIRCL/PyCIRCLean
Move Travis-only test files to uncategorized
parent
7363a16318
commit
fabc2cf7c4
16
.travis.yml
16
.travis.yml
|
@ -9,7 +9,7 @@ python:
|
|||
- nightly
|
||||
|
||||
sudo: required
|
||||
# do we need sudo? should double check
|
||||
# https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
|
||||
|
||||
dist: trusty
|
||||
|
||||
|
@ -45,7 +45,7 @@ install:
|
|||
- pushd theZoo/malwares/Binaries
|
||||
- python unpackall.py
|
||||
- popd
|
||||
- mv theZoo/malwares/Binaries/out tests/dangerous/
|
||||
- mv theZoo/malwares/Binaries/out tests/uncategorized/
|
||||
# Path traversal attacks
|
||||
- git clone https://github.com/jwilk/path-traversal-samples
|
||||
- pushd path-traversal-samples
|
||||
|
@ -56,21 +56,23 @@ install:
|
|||
- make
|
||||
- popd
|
||||
- popd
|
||||
- mv path-traversal-samples/zip/*.zip tests/dangerous/
|
||||
- mv path-traversal-samples/rar/*.rar tests/dangerous/
|
||||
- mv path-traversal-samples/zip/*.zip tests/uncategorized/
|
||||
- mv path-traversal-samples/rar/*.rar tests/uncategorized/
|
||||
# Office docs
|
||||
- git clone https://github.com/eea/odfpy.git
|
||||
- mv odfpy/tests/examples/* tests/dangerous/
|
||||
- pushd tests/dangerous/
|
||||
- mv odfpy/tests/examples/* tests/uncategorized/
|
||||
- pushd tests/uncategorized/
|
||||
- wget https://bitbucket.org/decalage/olefileio_pl/raw/3073963b640935134ed0da34906fea8e506460be/Tests/images/test-ole-file.doc
|
||||
- wget --no-check-certificate https://www.officedissector.com/corpus/fraunhoferlibrary.zip
|
||||
- unzip -o fraunhoferlibrary.zip
|
||||
- rm fraunhoferlibrary.zip
|
||||
- popd
|
||||
- pushd tests/dangerous/
|
||||
- 7z x -p42 42.zip
|
||||
- popd
|
||||
|
||||
script:
|
||||
- travis_wait 30 py.test --cov=kittengroomer --cov=bin tests/
|
||||
- travis_wait py.test --cov=kittengroomer --cov=bin tests/
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
|
@ -12,6 +12,7 @@ normal:
|
|||
Example.ogg: # Added: 27-06-2017, source: https://en.wikipedia.org/wiki/File:Example.ogg
|
||||
description: Ogg vorbis sound file
|
||||
mimetype: audio/ogg
|
||||
xfail: True
|
||||
Example.png: # Added: 27-06-2017, source: https://en.wikipedia.org/wiki/File:Example.png
|
||||
mimetype: image/png
|
||||
Example.svg: # Added: 27-06-2017, source: https://en.wikipedia.org/wiki/File:Example.svg
|
||||
|
|
|
@ -22,6 +22,7 @@ parametrize = pytest.mark.parametrize
|
|||
|
||||
NORMAL_FILES_PATH = 'tests/normal/'
|
||||
DANGEROUS_FILES_PATH = 'tests/dangerous/'
|
||||
UNCATEGORIZED_FILES_PATH = 'tests/uncategorized'
|
||||
CATALOG_PATH = 'tests/file_catalog.yaml'
|
||||
|
||||
|
||||
|
@ -121,3 +122,10 @@ def test_sample_files(mock_logger, sample_file, groomer, dest_dir_path):
|
|||
file = File(sample_file.path, file_dest_path, mock_logger)
|
||||
groomer.process_file(file)
|
||||
assert file.is_dangerous == sample_file.exp_dangerous
|
||||
|
||||
|
||||
def test_uncategorized(tmpdir):
|
||||
src_path = os.path.abspath(UNCATEGORIZED_FILES_PATH)
|
||||
dst_path = tmpdir.strpath
|
||||
groomer = KittenGroomerFileCheck(src_path, dst_path, debug=True)
|
||||
groomer.run()
|
||||
|
|
Loading…
Reference in New Issue