diff --git a/.travis.yml b/.travis.yml index 6128438..024d652 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,4 +41,4 @@ install: script: - perl Makefile.PL - make - - prove -b -r -s -j$(test-jobs) $(test-files) + - make test diff --git a/lib/Net/Etcd.pm b/lib/Net/Etcd.pm index b8287f3..77a8579 100644 --- a/lib/Net/Etcd.pm +++ b/lib/Net/Etcd.pm @@ -171,7 +171,10 @@ authentication process and stored until no longer valid or username is changed. =cut -has auth_token => ( is => 'rwp' ); +has auth_token => ( + is => 'rwp', + clearer => 1, +); =head1 PUBLIC METHODS diff --git a/lib/Net/Etcd/Auth.pm b/lib/Net/Etcd/Auth.pm index 76517af..f7b2f24 100644 --- a/lib/Net/Etcd/Auth.pm +++ b/lib/Net/Etcd/Auth.pm @@ -148,6 +148,7 @@ sub disable { confess 'root name and password required for ' . __PACKAGE__ . '->disable' unless ($self->password && $self->name); $self->request; + $self->etcd->clear_auth_token; return $self; }