]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests/backends/godbc_sqlite3-master
updated KSK and ZSK Rollover procedures, small fixes in Algorithm Rollover procedure
[thirdparty/pdns.git] / regression-tests / backends / godbc_sqlite3-master
1 source ./backends/gsql-common
2 case $context in
3 godbc_sqlite3-nodnssec | godbc_sqlite3 | godbc_sqlite3-nsec3 | godbc_sqlite3-nsec3-optout | godbc_sqlite3-nsec3-narrow)
4 rm -f pdns.sqlite3
5 sqlite3 pdns.sqlite3 < ../modules/gsqlite3backend/schema.sqlite3.sql
6 tosql gsqlite | sqlite3 pdns.sqlite3
7 echo 'ANALYZE; PRAGMA journal_mode=WAL;' | sqlite3 pdns.sqlite3
8
9 cat > pdns-godbc_sqlite3.conf << __EOF__
10 module-dir=./modules
11 launch=godbc
12 godbc-datasource=$GODBC_SQLITE3_DSN
13
14 # ../pdns/pdns_server --module-dir=./modules/ --launch=gsqlite3 --config | grep gsqlite3 | grep query | grep = | cut -c3- | perl -pe 's/^gsqlite3/godbc/; s/:\w+/?/g'
15 godbc-activate-domain-key-query=update cryptokeys set active=1 where domain_id=(select id from domains where name=?) and cryptokeys.id=?
16 godbc-add-domain-key-query=insert into cryptokeys (domain_id, flags, active, published, content) select id, ?, ?, ?, ? from domains where name=?
17 godbc-any-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name=? and domain_id=?
18 godbc-any-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name=?
19 godbc-basic-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=?
20 godbc-clear-domain-all-keys-query=delete from cryptokeys where domain_id=(select id from domains where name=?)
21 godbc-clear-domain-all-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name=?)
22 godbc-clear-domain-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name=?) and domainmetadata.kind=?
23 godbc-deactivate-domain-key-query=update cryptokeys set active=0 where domain_id=(select id from domains where name=?) and cryptokeys.id=?
24 godbc-delete-comment-rrset-query=DELETE FROM comments WHERE domain_id=? AND name=? AND type=?
25 godbc-delete-comments-query=DELETE FROM comments WHERE domain_id=?
26 godbc-delete-domain-query=delete from domains where name=?
27 godbc-delete-empty-non-terminal-query=delete from records where domain_id=? and name=? and type is null
28 godbc-delete-names-query=delete from records where domain_id=? and name=?
29 godbc-delete-rrset-query=delete from records where domain_id=? and name=? and type=?
30 godbc-delete-tsig-key-query=delete from tsigkeys where name=?
31 godbc-delete-zone-query=delete from records where domain_id=?
32 godbc-get-all-domain-metadata-query=select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=?
33 godbc-get-all-domains-query=select domains.id, domains.name, records.content, domains.type, domains.master, domains.notified_serial, domains.last_check, domains.account from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name WHERE records.disabled=0 OR ?
34 godbc-get-domain-metadata-query=select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=? and domainmetadata.kind=?
35 godbc-get-last-inserted-key-id-query=select last_insert_rowid()
36 godbc-get-order-after-query=select min(ordername) from records where disabled=0 and ordername > ? and domain_id=? and ordername is not null
37 godbc-get-order-before-query=select ordername, name from records where disabled=0 and ordername <= ? and domain_id=? and ordername is not null order by 1 desc limit 1
38 godbc-get-order-first-query=select ordername from records where disabled=0 and domain_id=? and ordername is not null order by 1 asc limit 1
39 godbc-get-order-last-query=select ordername, name from records where disabled=0 and ordername != '' and domain_id=? and ordername is not null order by 1 desc limit 1
40 godbc-get-tsig-key-query=select algorithm, secret from tsigkeys where name=?
41 godbc-get-tsig-keys-query=select name,algorithm, secret from tsigkeys
42 godbc-publish-domain-key-query=update cryptokeys set published=1 where domain_id=(select id from domains where name=?) and cryptokeys.id=?
43 godbc-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=? and domain_id=?
44 godbc-info-all-master-query=select id,name,master,last_check,notified_serial,type from domains where type='MASTER'
45 godbc-info-all-slaves-query=select id,name,master,last_check from domains where type='SLAVE'
46 godbc-info-zone-query=select id,name,master,last_check,notified_serial,type,account from domains where name=?
47 godbc-insert-comment-query=INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (?, ?, ?, ?, ?, ?)
48 godbc-insert-empty-non-terminal-order-query=insert into records (type,domain_id,disabled,name,ordername,auth,ttl,prio,content) values (null,?,0,?,?,?,null,null,null)
49 godbc-insert-record-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values (?,?,?,?,?,?,?,?,?)
50 godbc-insert-zone-query=insert into domains (type,name,master,account,last_check,notified_serial) values(?, ?, ?, ?, null, null)
51 godbc-list-comments-query=SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE domain_id=?
52 godbc-list-domain-keys-query=select cryptokeys.id, flags, active, published, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name=?
53 godbc-list-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth,ordername FROM records WHERE (disabled=0 OR ?) and domain_id=? order by name, type
54 godbc-list-subzone-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and (name=? OR name like ?) and domain_id=?
55 godbc-nullify-ordername-and-update-auth-query=update records set ordername=NULL,auth=? where domain_id=? and name=? and disabled=0
56 godbc-nullify-ordername-and-update-auth-type-query=update records set ordername=NULL,auth=? where domain_id=? and name=? and type=? and disabled=0
57 godbc-remove-domain-key-query=delete from cryptokeys where domain_id=(select id from domains where name=?) and cryptokeys.id=?
58 godbc-remove-empty-non-terminals-from-zone-query=delete from records where domain_id=? and type is null
59 godbc-search-comments-query=SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE ? OR comment LIKE ? LIMIT ?
60 godbc-search-records-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE name LIKE ? OR content LIKE ? LIMIT ?
61 godbc-set-domain-metadata-query=insert into domainmetadata (domain_id, kind, content) select id, ?, ? from domains where name=?
62 godbc-set-tsig-key-query=replace into tsigkeys (name,algorithm,secret) values(?,?,?)
63 godbc-supermaster-query=select account from supermasters where ip=? and nameserver=?
64 godbc-unpublish-domain-key-query=update cryptokeys set published=0 where domain_id=(select id from domains where name=?) and cryptokeys.id=?
65 godbc-update-account-query=update domains set account=? where name=?
66 godbc-update-kind-query=update domains set type=? where name=?
67 godbc-update-lastcheck-query=update domains set last_check=? where id=?
68 godbc-update-master-query=update domains set master=? where name=?
69 godbc-update-ordername-and-auth-query=update records set ordername=?,auth=? where domain_id=? and name=? and disabled=0
70 godbc-update-ordername-and-auth-type-query=update records set ordername=?,auth=? where domain_id=? and name=? and type=? and disabled=0
71 godbc-update-serial-query=update domains set notified_serial=? where id=?
72 __EOF__
73
74 gsql_master godbc_sqlite3 nodyndns
75 ;;
76
77 *)
78 nocontext=yes
79 esac