-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
""" | ||
Test for the "apio upgrade" command | ||
""" | ||
|
||
import pytest | ||
|
||
# -- apio upgrade entry point | ||
from apio.commands.upgrade import cli as cmd_upgrade | ||
|
||
|
||
def test_upgrade(clirunner, validate_cliresult, offline): | ||
def test_upgrade(clirunner, configenv, validate_cliresult, offline): | ||
"""Test "apio upgrade" """ | ||
|
||
# -- If the option 'offline' is passed, the test is skip | ||
# -- (apio upgrade uses internet) | ||
if offline: | ||
pytest.skip('requires internet connection') | ||
|
||
result = clirunner.invoke(cmd_upgrade) | ||
validate_cliresult(result) | ||
with clirunner.isolated_filesystem(): | ||
|
||
# -- Config the environment (conftest.configenv()) | ||
configenv() | ||
|
||
# -- Execute "apio upgrade" | ||
result = clirunner.invoke(cmd_upgrade) | ||
validate_cliresult(result) |