diff --git a/resources/user.rb b/resources/user.rb index f1d97cc..4e24f32 100644 --- a/resources/user.rb +++ b/resources/user.rb @@ -19,10 +19,10 @@ # Check if we need to change the password. if self.class.properties[:password].is_set?(desired) begin - ::Nexus3::Api.new(api_client.endpoint, username, desired.password).request(:get, '/service/metrics/ping') - password 'Supercalifragilisticexpialidocious-that-does-not-exist-so-maybe-the-resource-will-need-to-converge' - rescue ::Nexus3::ApiError + ::Nexus3::Api.new(api_client.endpoint, username, desired.password).request(:get, '/service/rapture/session') password desired.password + rescue ::Nexus3::ApiError + password 'Supercalifragilisticexpialidocious-that-does-not-exist-so-maybe-the-resource-will-need-to-converge' end end rescue LoadError, ::Nexus3::ApiError => e diff --git a/spec/unit/resources/user_spec.rb b/spec/unit/resources/user_spec.rb index 5c21d50..f7832b7 100644 --- a/spec/unit/resources/user_spec.rb +++ b/spec/unit/resources/user_spec.rb @@ -43,7 +43,7 @@ user_response('user_with_role'), user_response('user_with_role')) - stub_request(:get, 'http://localhost:8081/service/metrics/ping') + stub_request(:get, 'http://localhost:8081/service/rapture/session') .to_return(api_response(200)) end