diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | src/etcd/tests/integration/test_election.py | 5 | ||||
-rw-r--r-- | src/etcd/tests/integration/test_lock.py | 2 | ||||
-rw-r--r-- | src/etcd/tests/integration/test_simple.py | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 5cbd763..37094ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ install: # command to run tests script: - PATH=$PATH:./etcd bin/test + PATH=$PATH:./etcd/bin bin/test # Add env var to detect it during build env: TRAVIS=True diff --git a/src/etcd/tests/integration/test_election.py b/src/etcd/tests/integration/test_election.py index 11e333d..76f397b 100644 --- a/src/etcd/tests/integration/test_election.py +++ b/src/etcd/tests/integration/test_election.py @@ -17,9 +17,8 @@ class TestElection(test_simple.EtcdIntegrationTest): def test_set_invalid_ttl(self): - self.assertRaises(etcd.EtcdException, self.client.election.set, '/mysql', name='foo.example.com', ttl='ciao') + self.assertRaises(ValueError, self.client.election.set, '/mysql', name='foo.example.com', ttl='ciao') - @unittest.skip def test_get_non_existing(self): """This is actually expected to fail. See https://github.com/coreos/etcd/issues/446""" self.assertRaises(etcd.EtcdException, self.client.election.get, '/foobar') @@ -32,4 +31,4 @@ class TestElection(test_simple.EtcdIntegrationTest): e.set('/mysql', name='foo', ttl=1) time.sleep(2) self.assertRaises(etcd.EtcdException, e.get, '/mysql') - self.assertRaises(etcd.EtcdException, e.delete, '/mysql', name='foo') + self.assertRaises(KeyError, e.delete, '/mysql', name='foo') diff --git a/src/etcd/tests/integration/test_lock.py b/src/etcd/tests/integration/test_lock.py index ac2dd3b..a5d8744 100644 --- a/src/etcd/tests/integration/test_lock.py +++ b/src/etcd/tests/integration/test_lock.py @@ -22,7 +22,7 @@ class TestLocks(test_simple.EtcdIntegrationTest): ttl = 'invalid' expected_index = 'invalid' lock = self.client.get_lock(key, ttl=ttl) - self.assertRaises(etcd.EtcdException, lock.acquire) + self.assertRaises(ValueError, lock.acquire) def test_acquire_lock_with_context_manager(self): key = '/testkey' diff --git a/src/etcd/tests/integration/test_simple.py b/src/etcd/tests/integration/test_simple.py index b658301..45dea29 100644 --- a/src/etcd/tests/integration/test_simple.py +++ b/src/etcd/tests/integration/test_simple.py @@ -127,6 +127,7 @@ class TestSimple(EtcdIntegrationTest): self.client.write('/dir', None, dir=True, ttl=30) res = self.client.write('/dir', None, dir=True, ttl=31, prevExist=True) self.assertEquals(res.ttl, 31) + res = self.client.get('/dir') res.ttl = 120 new_res = self.client.update(res) self.assertEquals(new_res.ttl, 120) |