sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

Problem with relative path resolving #51

Closed mamtasuri-coraid closed 9 years ago

mamtasuri-coraid commented 9 years ago

Version from about 2 weeks ago is working. So not sure if some configuration has changed, or if I need to start/configure it differently. These are the steps that I followed:

  1. Download version canned-0.3.1.zip, and unzipped it
  2. Ran canned for a particular directory
  3. Using curl for a response is giving 404 starting canned on port 17022 for mockInflux/mockInfluxDB2 request: get /db/EtherCloudStats/series not found request: get /db/EtherCloudStats/series?u=root&p=root&q=select+mean.get.json not foundHere is corresponding gist:

https://gist.github.com/mamtasuri-coraid/36d25df8e0c376b9fd91

sideshowcoder commented 9 years ago

I traced this down to a problem with the relative path handling. It works find if you start canned from the root directory like bin/canned mockInmockInflux/mockInfluxDB2 but breaks if you start it via cd bin && ./canned mockInmockInflux/mockInfluxDB2. The workaround is to install globally for now I guess, while I work on fixing that.