Skip to content

Commit affe657

Browse files
committed
refactor: move AWS tests into per-script tests/ dirs for consistency with Azure and OnPrem
1 parent 0ec6ec9 commit affe657

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
python-version: "3.12"
2020

2121
- name: Install dependencies
22-
run: pip install -r tests/requirements-test.txt
22+
run: pip install -r AWS/requirements-test.txt
2323

2424
- name: Run tests
25-
run: pytest tests/ OnPrem/Linux/ -v
25+
run: pytest AWS/ OnPrem/Linux/ -v
2626

2727
pester:
2828
runs-on: windows-latest

tests/test_cloudtrail_auditor.py renamed to AWS/cloudtrail-auditor/tests/test_cloudtrail_auditor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for cloudtrail_auditor.py"""
22
import sys
33
import os
4-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../AWS/cloudtrail-auditor"))
4+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
55

66
import pytest
77
from unittest.mock import MagicMock

tests/test_iam_mapper.py renamed to AWS/iam-privilege-mapper/tests/test_iam_mapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for iam_mapper_v2.py"""
22
import sys
33
import os
4-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../AWS/iam-privilege-mapper"))
4+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
55

66
import pytest
77
from unittest.mock import MagicMock, patch

tests/test_root_auditor.py renamed to AWS/root-auditor/tests/test_root_auditor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for root_auditor.py"""
22
import sys
33
import os
4-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../AWS/root-auditor"))
4+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
55

66
import pytest
77
from unittest.mock import MagicMock, patch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for s3_auditor.py"""
22
import sys
33
import os
4-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../AWS/s3-auditor"))
4+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
55

66
import pytest
77
from unittest.mock import MagicMock
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for sg_auditor.py"""
22
import sys
33
import os
4-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../AWS/sg-auditor"))
4+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
55

66
import pytest
77
import sg_auditor as sg

0 commit comments

Comments
 (0)