Commit Graph

4725 Commits

Author SHA1 Message Date
Mike Salvatore a42e6312b1 tests: Remove unnecessary server configs 2021-04-21 08:00:24 -04:00
Mike Salvatore e3a0105b04 Set default_stages to commit only 2021-04-20 12:16:13 -04:00
Mike Salvatore 4b02e3bc63 docs: Add pre-push hooks to manual pre-commit install instructions 2021-04-20 12:13:00 -04:00
Mike Salvatore 6571e0e4fa Install pre-push hooks in deployment scripts 2021-04-20 12:11:46 -04:00
Mike Salvatore 753c0586c1 cc: Move config files and other testing resources to tests/ dir 2021-04-20 11:27:30 -04:00
shreyamalviya 88a3ab5bf1 Modify pre-commit-config.yaml to make pytest run only pre-push
(Run `pre-commit install --hook-type pre-push`)
2021-04-20 18:49:40 +05:30
Mike Salvatore 83e93928e7 Only run pytest pre-commit hook when files in monkey/ are modified 2021-04-19 14:59:03 -04:00
Mike Salvatore 3f66e95a90 Use addopts instead of testpaths to specify path in pytest config
The pytest documentation states that the testpaths configuration option
"Sets list of directories that should be searched ... when executing
pytest from the rootdir directory." Since pytest is not executed from
the rootdir directory, testpaths has no effect. Appending the "tests/"
directory to the end of addopts reduces the time required to run the
test suite by approximately 6 seconds.
2021-04-19 14:39:39 -04:00
Shreya c37ae1e0ea Modify pytest configuration
Shift it from monkey/pytest.ini to pyproject.toml.
Add conftest.py in tests/ to add monkey directory to sys.path so test files recognize paths.
2021-04-19 17:36:09 +05:30
Shreya dc0e155c31 Add pytest to pre-commit 2021-04-19 17:28:40 +05:30
Shreya 4680193375 Put unit test files in the right directories
Some test files were in their own "tests/" directory. Deleted the extra "tests/" directories.
2021-04-19 13:54:48 +05:30
Shreya a2115e4254 Fix imports for unit test files 2021-04-19 13:54:48 +05:30
Shreya f8936f61bb Move all tests for monkey_island/cc/services/reporting/report.py to one file 2021-04-19 13:54:48 +05:30
Shreya c08dbf9376 Move conftest files to tests/ directory 2021-04-19 13:54:48 +05:30
Shreya fa21336ff2 Move all unit test files to a separate directory 2021-04-19 13:54:48 +05:30
Mike Salvatore 57f8f200b1
Merge pull request #1101 from guardicore/appimage-v2
Appimage v2
2021-04-16 07:45:19 -04:00
Mike Salvatore f3439bb2c4 appimage: add log message when downloading Python3.7 AppImage 2021-04-15 12:20:33 -04:00
Mike Salvatore 66c5d91266 appimage: Fix CLI parameter for choosing branch. 2021-04-15 12:20:10 -04:00
Mike Salvatore 159aa604d3 appimage: add `-y` to `sudo apt upgrade` to avoid prompt 2021-04-15 12:19:36 -04:00
Mike Salvatore 5a1a5fc6fe cc: Set cwd when executing monkey binary from the island
Since AppImages are read-only filesystems, the agent cannot create any
files in `./`.  Therefore, setting cwd in the `subprocess.Popen()` call
will change CWD to a writable directory if `data_dir` is set.
2021-04-15 12:19:09 -04:00
Mike Salvatore 54754698fd appimage: remove unnecessary blank lines in run_appimage.sh 2021-04-15 11:32:10 -04:00
Mike Salvatore bc1f583e20 appimage: remove unused $executable var from AppRun 2021-04-15 11:32:10 -04:00
Mike Salvatore e0fd620d9d build: Update appimage README since we switched from appimage-builder 2021-04-15 11:32:10 -04:00
Mike Salvatore 81860e97e7 build: move ./deployment_scripts/appimage -> ./appimage 2021-04-15 11:32:10 -04:00
Mike Salvatore eb006f88bd Update CHANGELOG.md for AppImage v2 2021-04-15 11:32:10 -04:00
Mike Salvatore 6ad68557fc build: switch appimage build branch to develop 2021-04-15 11:32:10 -04:00
Mike Salvatore 6218a476af build: remove appimage-builder prereqs 2021-04-15 11:32:10 -04:00
Mike Salvatore 79e3c69ffb build: Fill in comment in AppImage .desktop file 2021-04-15 11:32:10 -04:00
Mike Salvatore 3e96b20834 build: Rename appimage icon to infection-monkey.svg 2021-04-15 11:32:10 -04:00
Mike Salvatore 14096ae758 build: Rename monkey-island.desktop -> infection-monkey.desktop 2021-04-15 11:32:10 -04:00
Mike Salvatore aca4f8795f build: Delete monkey_island_builder.yml
This file was used by appimage-builder, which we are no longer using.
2021-04-15 11:32:10 -04:00
Mike Salvatore d507e6f617
Merge pull request #1098 from guardicore/eslint
Add eslint
2021-04-15 07:29:51 -04:00
Shreya 905b095dd8 Add --max-warnings=0 to eslint precommit 2021-04-15 16:11:09 +05:30
VakarisZ be693edb55
Merge pull request #888 from VakarisZ/typescript_support
Typescript support implemented
2021-04-15 12:43:15 +03:00
Mike Salvatore 3b4bd7b08c cc: Upload custom PBAs to data_dir instead of MONKEY_ISLAND_ABS_PATH 2021-04-14 11:02:25 -04:00
Mike Salvatore 286dab5c27
Merge pull request #1094 from shreyamalviya/unit-test-files-consistency
Unit test files consistency
2021-04-14 08:49:16 -04:00
Shreya 025cb7851c Rename blackbox endpoint classes to match filenames 2021-04-14 15:33:02 +05:30
VakarisZ ea61961ff4 Moved some packages to dev dependencies instead of prod in package.json 2021-04-14 11:05:43 +03:00
VakarisZ 448d846362 Moved dev UI dependencies from prod and changed typescript target to es6 2021-04-14 10:29:34 +03:00
VakarisZ 50c5fdb9fc Typescript support implemented 2021-04-14 10:29:34 +03:00
Shreya c10f2f690a Swimm: update exercise Add a simple Post Breach action (id: tbxb2cGgUiJQ8Btma0fp). 2021-04-14 11:18:00 +05:30
Shreya 6d43ce900c Rename blackbox test files under monkey_island/cc/resources/blackbox/ 2021-04-14 10:47:00 +05:30
Shreya 86c4f9f63d Rename directory "test" to "blackbox" in monkey_island/cc/resources/ 2021-04-14 10:47:00 +05:30
Shreya 0961471e38 Add pre-commit section to development setup documentation 2021-04-13 12:39:55 +05:30
Shreya 3cf5384016 Add arguments to eslint pre-commit hook 2021-04-13 12:00:43 +05:30
Shreya 26684bbb4e Rename files having endpoints for blackbox tests 2021-04-13 10:53:19 +05:30
Shreya a39cfd21fb Swimm: update exercise Add a simple Post Breach action (id: tbxb2cGgUiJQ8Btma0fp). 2021-04-13 10:43:05 +05:30
Shreya 5469c7cc41 Match unit tests' class names and file names
Renamed class/file name depending on which was more applicable
2021-04-13 10:43:05 +05:30
Shreya 6e92127807 Rename unit test files from *_test.py to test_*.py 2021-04-13 10:43:05 +05:30
Mike Salvatore a58f310e61 build: Address shellcheck warnings in run_appimage.sh 2021-04-12 14:29:40 -04:00