ehmatthes / django-simple-deploy

A reusable Django app that configures your project for deployment
BSD 3-Clause "New" or "Revised" License
307 stars 26 forks source link

Rename test dirs #285

Closed ehmatthes closed 5 months ago

ehmatthes commented 9 months ago

When I started this project, I considered any test that didn't use remote resources a unit test. I considered test that use remote resources integration tests. Those are really integration tests, and e2e tests! Now that I have proper unit tests (in unit_tests_real/ :facepalm:), it's time to rename these.

Current tasks

Later tasks

ehmatthes commented 9 months ago

Related tasks

ehmatthes commented 8 months ago

make a tests/ dir

ehmatthes commented 8 months ago

integration_tests/ -> e2e_tests/

ehmatthes commented 8 months ago

bare pytest call runs all tests except e2e tests

ehmatthes commented 8 months ago

parking lot

Message for canceling test run if it doesn't make sense for e2e tests:

if not check_valid_test_call():
    msg = "You must run either local tests or e2e tests, not both."
    msg += "\n  Either specify the tests you want to run, or cd"
    msg += "\n  into the appropriate directory and run tests from there."
    print(msg)

    sys.exit()
ehmatthes commented 8 months ago

Rename unit_tests/ -> integration_tests/

ehmatthes commented 8 months ago

Write integration tests that cover an automate-all path

Just trying this quickly, to see if it's easy to add.

>       assert len(log_files) == 1   # update on friendly summary
E       AssertionError: assert 2 == 1
E        +  where 2 = len([PosixPath('

Parking lot

@pytest.fixture(scope='module', autouse=True, params=[False, True])
def run_simple_deploy(reset_test_project, tmp_project, request):
    ...

    if request.param:
        cmd = f"python manage.py simple_deploy --automate-all"
    else:
        cmd = f"python manage.py simple_deploy"
    msp.call_simple_deploy(tmp_project, cmd, platform)
ehmatthes commented 5 months ago

Closing this issue

I'm way out of the mindset of this issue. Complete any critical open tasks so I can merge this, and resume overall development.

ehmatthes commented 5 months ago

Update testing docs