Page MenuHomeSoftware Heritage
Paste P1321

somehow, no add-forge-now migration run in cypress tests...?
ActivePublic

Authored by ardumont on Mar 29 2022, 5:50 PM.
make test-frontend-ui-cmd
rm -f swh-web-test.sqlite3
django-admin migrate --settings=swh.web.settings.tests
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions, swh_web_add_forge_now, swh_web_auth, swh_web_common
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying sessions.0001_initial... OK
Applying swh_web_add_forge_now.0001_initial... OK
Applying swh_web_add_forge_now.0002_authorized_null_comment... OK
Applying swh_web_add_forge_now.0003_request_submitter_forward_username... OK
Applying swh_web_add_forge_now.0004_rename_tables... OK
Applying swh_web_auth.0001_initial... OK
Applying swh_web_auth.0002_remove_stored_tokens... OK
Applying swh_web_auth.0003_delete_oidcuser... OK
Applying swh_web_auth.0004_usermailmap... OK
Applying swh_web_auth.0005_usermailmapevent... OK
/home/tony/.virtualenvs/swh/lib/python3.9/site-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField UserMailmap.last_update_date received a naive datetime (2022-02-12 00:00:00) while time zone support is active.
warnings.warn("DateTimeField %s received a naive datetime (%s)"
Applying swh_web_auth.0006_fix_mailmap_admin_user_id... OK
Applying swh_web_common.0001_initial... OK
Applying swh_web_common.0002_saveoriginrequest_visit_date... OK
Applying swh_web_common.0003_saveoriginrequest_loading_task_status... OK
Applying swh_web_common.0004_auto_20190204_1324... OK
Applying swh_web_common.0005_remove_duplicated_authorized_origins... OK
Applying swh_web_common.0006_rename_origin_type... OK
Applying swh_web_common.0007_save_request_task_status_fix_typo... OK
Applying swh_web_common.0008_save-code-now_indexes_20210106_1327... OK
Applying swh_web_common.0009_saveoriginrequest_visit_status... OK
Applying swh_web_common.0010_saveoriginrequest_user_id... OK
Applying swh_web_common.0011_saveoriginrequest_user_ids... OK
Applying swh_web_common.0012_saveoriginrequest_note... OK
cat swh/web/tests/create_test_admin.py | django-admin shell --settings=swh.web.settings.tests
cat swh/web/tests/create_test_users.py | django-admin shell --settings=swh.web.settings.tests

Event Timeline

yes, there is:

Applying swh_web_add_forge_now.0001_initial... OK
 Applying swh_web_add_forge_now.0002_authorized_null_comment... OK
 Applying swh_web_add_forge_now.0003_request_submitter_forward_username... OK
 Applying swh_web_add_forge_now.0004_rename_tables... OK

but:

sqlite3 ./swh-web-test.sqlite3
SQLite version 3.34.1 2021-01-20 14:10:07
Enter ".help" for usage hints.
sqlite> .tables
add_forge_request           django_content_type
add_forge_request_history   django_migrations
...

tables are badly named...

found the issue, it's the js fixture that needs to be amended to:

db.run('DELETE FROM add_forge_request');
ardumont changed the title of this paste from somehow, no add-forge-now migration run in cypress tests... to somehow, no add-forge-now migration run in cypress tests...?.Mar 29 2022, 5:58 PM