Blazemeter / blazemeter-teamcity-plugin

Apache License 2.0
0 stars 2 forks source link

/saveUserKeys/ returns 404 on non-root TC server paths #49

Open qmg-aki opened 5 years ago

qmg-aki commented 5 years ago

I have a TeamCity server with a non-root path such as https://ci.root.com/teamcity/. Setting up the Blazemeter plugin with such a server causes /saveUserKeys/ to return 404.

Expected Behavior

On setting up the TC Blazemeter plugin according to the guide, Blazemeter gets set up successfully.

Current Behavior

On setting up the TC Blazemeter plugin according to the guide with my API key ID and secret as well as the URL set to https://a.blazemeter.com , on clicking Save, I get the following error on TeamCity:

Error: Invalid XML: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /saveUserKeys/ was not found on this server.</p> </body></html>

Possible Solution

The issue seems to be related to BlazeRunTypeController#register. Registering the controller of /saveUserKeys/ does not seem to take into account the non-root path. So instead of registering something like https://ci.root.com/teamcity/saveUserKeys/ it is registering https://ci.root.com/saveUserKeys/.

Steps to Reproduce

  1. Setup a TC server with a non-root path such as https://ci.root.com/teamcity/
  2. Install Blazemeter TC plugin
  3. Configure the plugin with a valid API key ID, secret and the URL
  4. Click Save
artem-fedorov commented 5 years ago

Thank you @qmg-aki Will look at this issue