Assert with integer status codes to avoid hidden errors
We are using `resp['status']` which is a string ('202').
Instead, use `resp.status` which is an int. This is a problem
because `self.expected_success(202, '201')` doesn't raise an
error.
This also adds an `expected_success` method to the proper base
class to intercept calls to this method. This lets us warn about
this and cast to int.
And:
- check for 202 (not 200) on a zone update.
- add a .testr.conf so `ostestr` runs all the tests in the
current dir
Change-Id: I102c35eb6da0c5f99fd548b169ce490027fdb981
diff --git a/.testr.conf b/.testr.conf
new file mode 100644
index 0000000..fee97eb
--- /dev/null
+++ b/.testr.conf
@@ -0,0 +1,12 @@
+[DEFAULT]
+test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
+ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
+ OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
+ OS_DEBUG=${OS_DEBUG:-1} \
+ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
+ OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
+ ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./designate_tempest_plugin} $LISTOPT $IDOPTION
+
+test_id_option=--load-list $IDFILE
+test_list_option=--list
+group_regex=([^\.]*\.)*