test/yao/test_auth.rb in yao-0.3.0 vs test/yao/test_auth.rb in yao-0.3.1

- old
+ new

@@ -12,10 +12,13 @@ Yao.config.set :auth_url, @auth_url @token = Yao::Auth.new(tenant_name: tenant, username: username, password: password) end def teardown + Yao.configure do + endpoints nil + end end def test_auth_successful cli = Yao.default_client.pool["default"] assert { cli.url_prefix.to_s == "http://endpoint.example.com:12345/" } @@ -55,6 +58,19 @@ username "udzura" password "XXXXXXXX" end assert_received(auth) {|a| a.new } end + + def test_override_endpoint + Yao.configure do + auth_url "http://endpoint.example.com:12345" + tenant_name "example" + username "udzura" + password "XXXXXXXX" + endpoints ({ identity: { public: "http://override-endpoint.example.com:35357/v3.0" } }) + end + assert(Yao.default_client.pool["identity"].url_prefix.to_s, "http://override-endpoint.example.com:35357/v3.0") + end + + end