Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: change webpack cmds after upgrade #331

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions tests/commands/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ def expected_setup_calls():
call("project-shortname", "invenio index init"),
# update_statics_and_assets call
call("project-shortname", "invenio collect"),
call("project-shortname", "invenio webpack create"),
call("project-shortname", "invenio webpack install --unsafe"),
call("project-shortname", "invenio webpack build"),
call("project-shortname", "invenio webpack buildall"),
]


Expand Down Expand Up @@ -88,7 +86,7 @@ def test_containerize_no_install(
commands.containerize(pre=False, force=False, install=False)

assert (
call("project-shortname", "invenio webpack install --unsafe")
call("project-shortname", "invenio webpack install")
not in commands.docker_helper.execute_cli_command.mock_calls
)

Expand Down Expand Up @@ -155,9 +153,7 @@ def test_update_statics_and_assets(p_docker_helper, p_run_cmd, mock_cli_config):

expected_execute_cli_calls = [
call("project-shortname", "invenio collect"),
call("project-shortname", "invenio webpack create"),
call("project-shortname", "invenio webpack install --unsafe"),
call("project-shortname", "invenio webpack build"),
call("project-shortname", "invenio webpack buildall"),
]
assert (
commands.docker_helper.execute_cli_command.mock_calls
Expand Down
4 changes: 1 addition & 3 deletions tests/commands/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def test_update_statics_and_assets(p_run_cmd, p_copy_tree, mock_cli_config):

expected_calls = [
call(["pipenv", "run", "invenio", "collect", "--verbose"]),
call(["pipenv", "run", "invenio", "webpack", "clean", "create"]),
call(["pipenv", "run", "invenio", "webpack", "install"]),
call(["pipenv", "run", "invenio", "webpack", "build"]),
call(["pipenv", "run", "invenio", "webpack", "clean", "buildall"]),
]
assert p_run_cmd.mock_calls == expected_calls
p_copy_tree.assert_any_call("project_dir/static", "instance_dir/static")
Expand Down