29 Commits

Author SHA1 Message Date
Thomas Waldmann
cf075aa1aa fix some places that relied on TEST_HOST being str
this prepares next commit
2014-09-22 23:39:23 +02:00
Thomas Waldmann
5fe8f13015 rename some model attributes, add migration
Domain.domain to Domain.name
Host.subdomain to Host.name
BlacklistedDomain.domain to BlacklistedDomain.name_re
2014-09-21 22:31:26 +02:00
Thomas Waldmann
8738b135fc add tests for update/delete api with invalid IPs 2014-09-02 23:50:39 +02:00
Thomas Waldmann
9bd09b6008 on travis do not run tests that require sequential execution (can not run in parallel) 2014-09-02 00:14:24 +02:00
Thomas Waldmann
3d91f9bf81 found why other service test has issues on travis-ci, removed sleep again (didn't help anyway) 2014-08-31 18:31:03 +02:00
Thomas Waldmann
f1b8a76906 increase sleep time for other service test, last try ... 2014-08-31 18:03:45 +02:00
Thomas Waldmann
4ef30e4fb8 try to avoid race condition in other service updater test, increasing sleep time 2014-08-31 17:44:01 +02:00
Thomas Waldmann
26c48ea93b try to avoid race condition in other service updater test 2014-08-31 17:36:47 +02:00
Thomas Waldmann
cf2c46e612 use FQDN typed params in api, remove unused parse_name (which was problematic anyway) 2014-08-30 18:27:21 +02:00
Thomas Waldmann
56bddb83b6 fix broken api test
as we first check for a nochg update, we couldn't always get the expected dnserr here as the dns update is tried after the  nochg check.
so, if the address did not change, the test failed. fixed by making sure it is not a nochg update.
2014-08-27 16:45:05 +02:00
Thomas Waldmann
36c3c8d314 implement delete API
Very similar to /nic/update and /nic/update_authorized, /nic/delete and /nic/delete_authorized delete
 the A or AAAA record, depending in the kind of IP address given.

 As this is a delete, the specific ip address value is ignored.
2014-01-21 17:50:01 +01:00
Thomas Waldmann
0203fdb856 make api tests also use a random hostname (but constant throughout the test session) 2013-12-25 04:42:40 +01:00
Thomas Waldmann
852e541778 make the tests use a test zone
for the dnstools tests, tests were already changed to use a random test host in the test zone,
so parallel tests runs should not use the same hostnames.

test_api tests still use same host names, though
2013-12-25 03:38:08 +01:00
Thomas Waldmann
bf2f5bbe7e fix py3 compatibility 2013-12-24 21:44:11 +01:00
Thomas Waldmann
ba977193ce Merge branch 'master' into py3-port
Conflicts:
	nsupdate/main/_tests/test_main.py
2013-12-24 21:31:40 +01:00
Thomas Waldmann
b317837f58 add a test for dnserr api response
and also fix dnserr api response - should not contain additional info, but just "dnserr"
2013-12-18 04:08:18 +01:00
Thomas Waldmann
14b9407ab5 remove unused imports 2013-12-15 18:27:59 +01:00
Thomas Waldmann
711aba237f python 3.3 port
not much tested yet, be careful
2013-12-14 00:35:29 +01:00
Thomas Waldmann
aa610e9c3a implement "update other services", with tests, no ui yet
(can be used when adding the records via django admin)
2013-11-26 08:10:05 +01:00
Thomas Waldmann
ce83e293bb support notfqdn api result code
we do not really need it as far as the service is concerned (we would give some other valid failure result code),
but it might help to user to more quickly find the mistake in his client configuration.
2013-11-24 06:42:55 +01:00
Thomas Waldmann
ae9c2f29d0 more tests, better coverage 2013-11-21 04:02:16 +01:00
Thomas Waldmann
5fb721d112 more api tests, add another user and another host so we can test separation 2013-11-16 07:51:04 +01:00
Thomas Waldmann
08d8ce472b added test for nic_update_session 2013-11-16 07:23:44 +01:00
Thomas Waldmann
925ad20405 update api: there is no "noauth" return value, it must be "badauth" 2013-11-16 06:09:56 +01:00
Thomas Waldmann
d6b5041573 a real nic update api test, using basic auth
generate_secret was modified to support giving a secret (not generating a random one), so it matches the test database

add a User and a Host to the test db
2013-11-16 01:25:05 +01:00
Thomas Waldmann
4c46c30d25 more api tests (mostly triggering execution of some code)
it's hard to test anything without a user / http auth / login / session.
2013-11-15 13:00:57 +01:00
Thomas Waldmann
1f28cb3ed0 name api views, use reverse() in unit tests 2013-11-15 12:14:36 +01:00
Thomas Waldmann
89f743c1b0 removed test skips, all works now 2013-10-17 15:58:25 -07:00
Thomas Waldmann
9428ed7943 adding nic api tests 2013-10-03 21:58:33 +02:00