From 0aef321609993588f0f26f9eb0a895459dc7a700 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Mon, 15 Nov 2021 12:25:03 +0100 Subject: [PATCH 1/5] de-activated pylint in Makefile. Tox.ini will be a better place for it --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5a04fde..65b0906 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ test: tox.ini tox; - pylint --rcfile=pylint.rc *.py app/*.py plugins/base/*.py + # pylint --rcfile=pylint.rc *.py app/*.py plugins/base/*.py coverage html; coverage report; From 56002acd3d1a11a8a926a6b87aceff337df36851 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Mon, 15 Nov 2021 12:41:08 +0100 Subject: [PATCH 2/5] Updating auto python tests --- .github/workflows/makefile.yml | 12 ++++++++++-- Makefile | 7 ++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 0d32915..1425e58 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -10,11 +10,19 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python: [ 3.7, 3.8, 3.9 ] steps: - uses: actions/checkout@v2 - + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install Tox and any other packages + run: pip install tox - name: Run check - run: make test + run: make check diff --git a/Makefile b/Makefile index 65b0906..d8650d1 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,14 @@ .PHONY: test init deinit shipit pylint +# This is for CI on Github +check: tox.ini + tox -e py + +# Manual tests test: tox.ini tox; - # pylint --rcfile=pylint.rc *.py app/*.py plugins/base/*.py + pylint --rcfile=pylint.rc *.py app/*.py plugins/base/*.py coverage html; coverage report; From ad344cb409292e5773933be7c42411f2f88e6b95 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Mon, 15 Nov 2021 12:42:46 +0100 Subject: [PATCH 3/5] indent fix --- .github/workflows/makefile.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 1425e58..0cc19f3 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -17,11 +17,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} - name: Install Tox and any other packages - run: pip install tox + run: pip install tox - name: Run check run: make check From 3e46db150c97e974c1aa4790676afccc828ba935 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Mon, 15 Nov 2021 13:11:35 +0100 Subject: [PATCH 4/5] fixing path in unit test --- tests/test_machinecontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_machinecontrol.py b/tests/test_machinecontrol.py index c2f749e..75ed610 100644 --- a/tests/test_machinecontrol.py +++ b/tests/test_machinecontrol.py @@ -208,7 +208,7 @@ class TestMachineControl(unittest.TestCase): "vm_name": "target3", "group": "testgroup", "paw": "testpaw", - "machinepath": "target2w"}), self.attack_logger) + "machinepath": "target3"}), self.attack_logger) m.set_caldera_server("www.test.test") cmd = m.create_start_caldera_client_cmd() self.maxDiff = None From 503643fa4294c2ffc873c4054cb0461889dff054 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Mon, 15 Nov 2021 13:15:32 +0100 Subject: [PATCH 5/5] Reducing to python 3.9 --- .github/workflows/makefile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 0cc19f3..c99ba3c 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [ 3.7, 3.8, 3.9 ] + python: [ 3.9 ] steps: - uses: actions/checkout@v2