X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=test%2Fsql%2Fpostfixadmin-fixtures.sql;fp=test%2Fsql%2Fpostfixadmin-fixtures.sql;h=2ca6d594b0bbc9e2c36cda94858d994a62ba037b;hp=0000000000000000000000000000000000000000;hb=e1d4b3dd098d2107bbf5ca84d36c8052706e86a8;hpb=0a0b9b0feb369d53af4ca7ffdd183db786f1127d diff --git a/test/sql/postfixadmin-fixtures.sql b/test/sql/postfixadmin-fixtures.sql new file mode 100644 index 0000000..2ca6d59 --- /dev/null +++ b/test/sql/postfixadmin-fixtures.sql @@ -0,0 +1,44 @@ +/* This is a magic record, always included as the first row of the + * domain table. + */ +INSERT INTO domain (domain) VALUES ('ALL'); + +/* Create two domains, example.com, and example.net. */ +INSERT INTO domain (domain) VALUES ('example.com'); +INSERT INTO domain (domain) VALUES ('example.net'); + +/* + * Now create their mailboxes, two in one domain, and three in the + * other. + */ +INSERT INTO mailbox (username, domain, local_part) + VALUES ('alice@example.com', 'example.com', 'alice'); +INSERT INTO mailbox (username, domain, local_part) + VALUES ('bob@example.com', 'example.com', 'bob'); + +INSERT INTO mailbox (username, domain, local_part) + VALUES ('adam@example.net', 'example.net', 'adam'); +INSERT INTO mailbox (username, domain, local_part) + VALUES ('beth@example.net', 'example.net', 'beth'); +INSERT INTO mailbox (username, domain, local_part) + VALUES ('carol@example.net', 'example.net', 'carol'); + +/* Each mailbox has an alias pointing to (at least) itself. */ +INSERT INTO alias (address, goto, domain) + VALUES ('alice@example.com', 'alice@example.com', 'example.com'); +INSERT INTO alias (address, goto, domain) + VALUES ('bob@example.com', 'bob@example.com', 'example.com'); + +INSERT INTO alias (address, goto, domain) + VALUES ('adam@example.net', 'adam@example.net', 'example.net'); +INSERT INTO alias (address, goto, domain) + VALUES ('beth@example.net', 'beth@example.net', 'example.net'); +INSERT INTO alias (address, goto, domain) + VALUES ('carol@example.net', 'carol@example.net', 'example.net'); + +/* Create a domain admin for both example.com and example.net. */ +INSERT INTO domain_admins (username, domain) + VALUES ('admin@example.com', 'example.com'); +INSERT INTO domain_admins (username, domain) + VALUES ('admin@example.com', 'example.net'); +