populate_db: Set owners for bots in development and test database.

Since we do not allow to remove owners from bots, it is better
to keep owners for the bots in development environment as well.

We need to change puppeteer tests here because now desdemona
already has bots in dev server and thus "Active bots" section
is opened by default in the settings instead of "Add a new bot"
section.
This commit is contained in:
Sahil Batra 2022-02-16 22:07:00 +05:30 committed by Tim Abbott
parent 2c664a85fb
commit 947b2b55fe
2 changed files with 8 additions and 2 deletions

View File

@ -228,6 +228,7 @@ async function test_invalid_edit_bot_form(page: Page): Promise<void> {
async function test_your_bots_section(page: Page): Promise<void> {
await page.click('[data-section="your-bots"]');
await page.click(".add-a-new-bot-tab");
await test_webhook_bot_creation(page);
await test_normal_bot_creation(page);
await test_botserverrc(page);

View File

@ -507,7 +507,9 @@ class Command(BaseCommand):
for i in range(options["extra_bots"]):
zulip_realm_bots.append((f"Extra Bot {i}", f"extrabot{i}@zulip.com"))
create_users(zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT)
create_users(
zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT, bot_owner=desdemona
)
zoe = get_user_by_delivery_email("zoe@zulip.com", zulip_realm)
zulip_webhook_bots = [
@ -911,7 +913,10 @@ class Command(BaseCommand):
("Zulip Nagios Bot", "nagios-bot@zulip.com"),
]
create_users(
zulip_realm, internal_zulip_users_nosubs, bot_type=UserProfile.DEFAULT_BOT
zulip_realm,
internal_zulip_users_nosubs,
bot_type=UserProfile.DEFAULT_BOT,
bot_owner=desdemona,
)
mark_all_messages_as_read()