mirror of https://github.com/zulip/zulip.git
15 lines
608 B
Bash
Executable File
15 lines
608 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ev
|
|
export DJANGO_SETTINGS_MODULE="zproject.slack_importer_test_settings"
|
|
|
|
psql -h localhost postgres zulip_test <<EOF
|
|
DROP DATABASE IF EXISTS zulip_slack_importer_test;
|
|
CREATE DATABASE zulip_slack_importer_test TEMPLATE zulip_test_template;
|
|
EOF
|
|
|
|
./manage.py migrate --noinput
|
|
wget https://github.com/houstondatavis/slack-export/archive/master.zip -O /tmp/slack-export-master.zip
|
|
./manage.py convert_slack_data /tmp/slack-export-master.zip "slack-importer-test-realm" --output /tmp/slack_importer_test_data
|
|
./manage.py import --destroy-rebuild-database /tmp/slack_importer_test_data
|