diff --git a/test/proxy-data/data1 b/test/proxy-data/data1 new file mode 100644 index 0000000..8e1f651 --- /dev/null +++ b/test/proxy-data/data1 @@ -0,0 +1 @@ +{"data":{"request":[{"type":"LatLon","query":"Lat 27.64 and Lon -80.40"}],"nearest_area":[{"areaName":[{"value":"Vero Beach"}],"country":[{"value":"United States of America"}],"region":[{"value":"Florida"}],"latitude":"27.638","longitude":"-80.398","population":"17262","weatherUrl":[{"value":"https://www.worldweatheronline.com/v2/weather.aspx?q=27.6387163,-80.3975399"}]}],"current_condition":[{"observation_time":"10:24 AM","localObsDateTime":"2020-04-26 06:24 AM","temp_C":"22","temp_F":"72","weatherCode":"143","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0006_mist.png"}],"weatherDesc":[{"value":"Mist"}],"windspeedMiles":"4","windspeedKmph":"6","winddirDegree":"240","winddir16Point":"WSW","precipMM":"0.4","humidity":"94","visibility":"10","pressure":"1015","cloudcover":"75","FeelsLikeC":"25","FeelsLikeF":"76","uvIndex":1}],"weather":[{"date":"2020-04-26","astronomy":[{"sunrise":"06:46 AM","sunset":"07:53 PM","moonrise":"09:12 AM","moonset":"11:17 PM","moon_phase":"Waxing Crescent","moon_illumination":"22"}],"maxtempC":"30","maxtempF":"87","mintempC":"23","mintempF":"73","totalSnow_cm":"0.0","sunHour":"6.5","uvIndex":"9","hourly":[{"time":"0","tempC":"25","tempF":"77","windspeedMiles":"7","windspeedKmph":"12","winddirDegree":"235","winddir16Point":"SW","weatherCode":"176","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0025_light_rain_showers_night.png"}],"weatherDesc":[{"value":"Patchy rain possible"}],"precipMM":"0.4","humidity":"85","visibility":"9","pressure":"1015","cloudcover":"86","HeatIndexC":"28","HeatIndexF":"82","DewPointC":"22","DewPointF":"72","WindChillC":"25","WindChillF":"77","WindGustMiles":"14","WindGustKmph":"22","FeelsLikeC":"28","FeelsLikeF":"82","chanceofrain":"76","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"89","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"71","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"300","tempC":"24","tempF":"76","windspeedMiles":"7","windspeedKmph":"12","winddirDegree":"242","winddir16Point":"WSW","weatherCode":"386","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0032_thundery_showers_night.png"}],"weatherDesc":[{"value":"Patchy light rain with thunder"}],"precipMM":"0.4","humidity":"88","visibility":"9","pressure":"1015","cloudcover":"81","HeatIndexC":"27","HeatIndexF":"80","DewPointC":"22","DewPointF":"72","WindChillC":"24","WindChillF":"76","WindGustMiles":"13","WindGustKmph":"21","FeelsLikeC":"27","FeelsLikeF":"80","chanceofrain":"70","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"87","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"13","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"600","tempC":"24","tempF":"75","windspeedMiles":"7","windspeedKmph":"12","winddirDegree":"246","winddir16Point":"WSW","weatherCode":"386","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0032_thundery_showers_night.png"}],"weatherDesc":[{"value":"Patchy light rain with thunder"}],"precipMM":"0.6","humidity":"89","visibility":"10","pressure":"1015","cloudcover":"74","HeatIndexC":"26","HeatIndexF":"79","DewPointC":"22","DewPointF":"72","WindChillC":"24","WindChillF":"75","WindGustMiles":"12","WindGustKmph":"20","FeelsLikeC":"26","FeelsLikeF":"79","chanceofrain":"77","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"87","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"12","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"900","tempC":"26","tempF":"78","windspeedMiles":"7","windspeedKmph":"12","winddirDegree":"246","winddir16Point":"WSW","weatherCode":"386","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0016_thundery_showers.png"}],"weatherDesc":[{"value":"Patchy light rain with thunder"}],"precipMM":"1.1","humidity":"83","visibility":"10","pressure":"1017","cloudcover":"80","HeatIndexC":"28","HeatIndexF":"83","DewPointC":"22","DewPointF":"72","WindChillC":"26","WindChillF":"78","WindGustMiles":"11","WindGustKmph":"17","FeelsLikeC":"28","FeelsLikeF":"83","chanceofrain":"73","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"88","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"42","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"9"},{"time":"1200","tempC":"29","tempF":"84","windspeedMiles":"7","windspeedKmph":"12","winddirDegree":"247","winddir16Point":"WSW","weatherCode":"353","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0009_light_rain_showers.png"}],"weatherDesc":[{"value":"Light rain shower"}],"precipMM":"0.7","humidity":"68","visibility":"10","pressure":"1017","cloudcover":"76","HeatIndexC":"32","HeatIndexF":"90","DewPointC":"22","DewPointF":"72","WindChillC":"29","WindChillF":"84","WindGustMiles":"9","WindGustKmph":"15","FeelsLikeC":"32","FeelsLikeF":"90","chanceofrain":"74","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"85","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"95","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"31","uvIndex":"9"},{"time":"1500","tempC":"30","tempF":"86","windspeedMiles":"7","windspeedKmph":"11","winddirDegree":"259","winddir16Point":"WSW","weatherCode":"386","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0016_thundery_showers.png"}],"weatherDesc":[{"value":"Patchy light rain with thunder"}],"precipMM":"1.0","humidity":"63","visibility":"10","pressure":"1016","cloudcover":"62","HeatIndexC":"33","HeatIndexF":"92","DewPointC":"22","DewPointF":"72","WindChillC":"30","WindChillF":"86","WindGustMiles":"9","WindGustKmph":"14","FeelsLikeC":"33","FeelsLikeF":"92","chanceofrain":"76","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"87","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"96","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"87","uvIndex":"9"},{"time":"1800","tempC":"28","tempF":"82","windspeedMiles":"6","windspeedKmph":"9","winddirDegree":"259","winddir16Point":"WSW","weatherCode":"386","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0016_thundery_showers.png"}],"weatherDesc":[{"value":"Patchy light rain with thunder"}],"precipMM":"1.5","humidity":"70","visibility":"10","pressure":"1015","cloudcover":"72","HeatIndexC":"31","HeatIndexF":"88","DewPointC":"22","DewPointF":"71","WindChillC":"28","WindChillF":"82","WindGustMiles":"9","WindGustKmph":"15","FeelsLikeC":"31","FeelsLikeF":"88","chanceofrain":"72","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"86","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"93","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"48","uvIndex":"9"},{"time":"2100","tempC":"25","tempF":"77","windspeedMiles":"7","windspeedKmph":"11","winddirDegree":"243","winddir16Point":"WSW","weatherCode":"176","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0025_light_rain_showers_night.png"}],"weatherDesc":[{"value":"Patchy rain possible"}],"precipMM":"0.2","humidity":"74","visibility":"10","pressure":"1016","cloudcover":"75","HeatIndexC":"27","HeatIndexF":"81","DewPointC":"20","DewPointF":"68","WindChillC":"25","WindChillF":"77","WindGustMiles":"13","WindGustKmph":"21","FeelsLikeC":"27","FeelsLikeF":"81","chanceofrain":"81","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"90","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"61","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"}]},{"date":"2020-04-27","astronomy":[{"sunrise":"06:45 AM","sunset":"07:54 PM","moonrise":"09:58 AM","moonset":"No moonset","moon_phase":"Waxing Crescent","moon_illumination":"30"}],"maxtempC":"24","maxtempF":"76","mintempC":"19","mintempF":"66","totalSnow_cm":"0.0","sunHour":"11.6","uvIndex":"11","hourly":[{"time":"0","tempC":"22","tempF":"71","windspeedMiles":"11","windspeedKmph":"17","winddirDegree":"304","winddir16Point":"NW","weatherCode":"176","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0025_light_rain_showers_night.png"}],"weatherDesc":[{"value":"Patchy rain possible"}],"precipMM":"0.1","humidity":"67","visibility":"10","pressure":"1018","cloudcover":"72","HeatIndexC":"23","HeatIndexF":"74","DewPointC":"15","DewPointF":"60","WindChillC":"22","WindChillF":"71","WindGustMiles":"19","WindGustKmph":"31","FeelsLikeC":"22","FeelsLikeF":"71","chanceofrain":"77","chanceofremdry":"0","chanceofwindy":"0","chanceofovercast":"92","chanceofsunshine":"0","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"300","tempC":"20","tempF":"67","windspeedMiles":"13","windspeedKmph":"20","winddirDegree":"323","winddir16Point":"NW","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"}],"weatherDesc":[{"value":"Clear"}],"precipMM":"0.1","humidity":"59","visibility":"10","pressure":"1017","cloudcover":"49","HeatIndexC":"20","HeatIndexF":"67","DewPointC":"12","DewPointF":"53","WindChillC":"20","WindChillF":"67","WindGustMiles":"22","WindGustKmph":"36","FeelsLikeC":"20","FeelsLikeF":"67","chanceofrain":"51","chanceofremdry":"30","chanceofwindy":"0","chanceofovercast":"63","chanceofsunshine":"29","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"600","tempC":"19","tempF":"67","windspeedMiles":"15","windspeedKmph":"24","winddirDegree":"340","winddir16Point":"NNW","weatherCode":"116","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"}],"weatherDesc":[{"value":"Partly cloudy"}],"precipMM":"0.0","humidity":"54","visibility":"10","pressure":"1018","cloudcover":"1","HeatIndexC":"19","HeatIndexF":"67","DewPointC":"10","DewPointF":"49","WindChillC":"19","WindChillF":"67","WindGustMiles":"24","WindGustKmph":"39","FeelsLikeC":"19","FeelsLikeF":"67","chanceofrain":"0","chanceofremdry":"88","chanceofwindy":"0","chanceofovercast":"13","chanceofsunshine":"83","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"900","tempC":"20","tempF":"68","windspeedMiles":"14","windspeedKmph":"22","winddirDegree":"339","winddir16Point":"NNW","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0001_sunny.png"}],"weatherDesc":[{"value":"Sunny"}],"precipMM":"0.0","humidity":"51","visibility":"10","pressure":"1020","cloudcover":"1","HeatIndexC":"21","HeatIndexF":"69","DewPointC":"9","DewPointF":"49","WindChillC":"20","WindChillF":"68","WindGustMiles":"19","WindGustKmph":"31","FeelsLikeC":"20","FeelsLikeF":"68","chanceofrain":"0","chanceofremdry":"87","chanceofwindy":"0","chanceofovercast":"26","chanceofsunshine":"80","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"11"},{"time":"1200","tempC":"23","tempF":"73","windspeedMiles":"13","windspeedKmph":"21","winddirDegree":"230","winddir16Point":"SW","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0001_sunny.png"}],"weatherDesc":[{"value":"Sunny"}],"precipMM":"0.0","humidity":"43","visibility":"10","pressure":"1020","cloudcover":"0","HeatIndexC":"24","HeatIndexF":"76","DewPointC":"9","DewPointF":"49","WindChillC":"23","WindChillF":"73","WindGustMiles":"15","WindGustKmph":"24","FeelsLikeC":"24","FeelsLikeF":"76","chanceofrain":"0","chanceofremdry":"88","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"88","chanceoffrost":"0","chanceofhightemp":"5","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"11"},{"time":"1500","tempC":"24","tempF":"74","windspeedMiles":"12","windspeedKmph":"20","winddirDegree":"12","winddir16Point":"NNE","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0001_sunny.png"}],"weatherDesc":[{"value":"Sunny"}],"precipMM":"0.0","humidity":"41","visibility":"10","pressure":"1019","cloudcover":"0","HeatIndexC":"25","HeatIndexF":"76","DewPointC":"10","DewPointF":"49","WindChillC":"24","WindChillF":"74","WindGustMiles":"14","WindGustKmph":"23","FeelsLikeC":"25","FeelsLikeF":"76","chanceofrain":"0","chanceofremdry":"83","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"86","chanceoffrost":"0","chanceofhightemp":"11","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"11"},{"time":"1800","tempC":"22","tempF":"71","windspeedMiles":"13","windspeedKmph":"21","winddirDegree":"33","winddir16Point":"NNE","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0001_sunny.png"}],"weatherDesc":[{"value":"Sunny"}],"precipMM":"0.0","humidity":"53","visibility":"10","pressure":"1019","cloudcover":"0","HeatIndexC":"23","HeatIndexF":"74","DewPointC":"12","DewPointF":"53","WindChillC":"22","WindChillF":"71","WindGustMiles":"16","WindGustKmph":"26","FeelsLikeC":"22","FeelsLikeF":"71","chanceofrain":"0","chanceofremdry":"86","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"86","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"11"},{"time":"2100","tempC":"20","tempF":"68","windspeedMiles":"11","windspeedKmph":"17","winddirDegree":"38","winddir16Point":"NE","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"}],"weatherDesc":[{"value":"Clear"}],"precipMM":"0.0","humidity":"60","visibility":"10","pressure":"1020","cloudcover":"0","HeatIndexC":"20","HeatIndexF":"68","DewPointC":"12","DewPointF":"54","WindChillC":"20","WindChillF":"68","WindGustMiles":"18","WindGustKmph":"29","FeelsLikeC":"20","FeelsLikeF":"68","chanceofrain":"0","chanceofremdry":"81","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"88","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"}]},{"date":"2020-04-28","astronomy":[{"sunrise":"06:44 AM","sunset":"07:54 PM","moonrise":"10:50 AM","moonset":"12:13 AM","moon_phase":"Waxing Crescent","moon_illumination":"37"}],"maxtempC":"25","maxtempF":"76","mintempC":"19","mintempF":"67","totalSnow_cm":"0.0","sunHour":"10.3","uvIndex":"9","hourly":[{"time":"0","tempC":"20","tempF":"68","windspeedMiles":"10","windspeedKmph":"16","winddirDegree":"34","winddir16Point":"NNE","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"}],"weatherDesc":[{"value":"Clear"}],"precipMM":"0.0","humidity":"61","visibility":"10","pressure":"1021","cloudcover":"0","HeatIndexC":"20","HeatIndexF":"68","DewPointC":"12","DewPointF":"54","WindChillC":"20","WindChillF":"68","WindGustMiles":"18","WindGustKmph":"28","FeelsLikeC":"20","FeelsLikeF":"68","chanceofrain":"0","chanceofremdry":"82","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"89","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"300","tempC":"20","tempF":"67","windspeedMiles":"9","windspeedKmph":"15","winddirDegree":"35","winddir16Point":"NE","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"}],"weatherDesc":[{"value":"Clear"}],"precipMM":"0.0","humidity":"61","visibility":"10","pressure":"1020","cloudcover":"0","HeatIndexC":"20","HeatIndexF":"67","DewPointC":"12","DewPointF":"53","WindChillC":"20","WindChillF":"67","WindGustMiles":"17","WindGustKmph":"27","FeelsLikeC":"20","FeelsLikeF":"67","chanceofrain":"0","chanceofremdry":"85","chanceofwindy":"0","chanceofovercast":"0","chanceofsunshine":"89","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"600","tempC":"20","tempF":"68","windspeedMiles":"9","windspeedKmph":"14","winddirDegree":"53","winddir16Point":"NE","weatherCode":"116","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png"}],"weatherDesc":[{"value":"Partly cloudy"}],"precipMM":"0.0","humidity":"62","visibility":"10","pressure":"1020","cloudcover":"5","HeatIndexC":"20","HeatIndexF":"68","DewPointC":"13","DewPointF":"55","WindChillC":"20","WindChillF":"68","WindGustMiles":"15","WindGustKmph":"25","FeelsLikeC":"20","FeelsLikeF":"68","chanceofrain":"0","chanceofremdry":"86","chanceofwindy":"0","chanceofovercast":"13","chanceofsunshine":"84","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"},{"time":"900","tempC":"22","tempF":"71","windspeedMiles":"10","windspeedKmph":"16","winddirDegree":"69","winddir16Point":"ENE","weatherCode":"116","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"}],"weatherDesc":[{"value":"Partly cloudy"}],"precipMM":"0.0","humidity":"60","visibility":"10","pressure":"1021","cloudcover":"15","HeatIndexC":"22","HeatIndexF":"72","DewPointC":"14","DewPointF":"57","WindChillC":"22","WindChillF":"71","WindGustMiles":"14","WindGustKmph":"22","FeelsLikeC":"22","FeelsLikeF":"71","chanceofrain":"0","chanceofremdry":"87","chanceofwindy":"0","chanceofovercast":"43","chanceofsunshine":"74","chanceoffrost":"0","chanceofhightemp":"3","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"9"},{"time":"1200","tempC":"24","tempF":"75","windspeedMiles":"12","windspeedKmph":"19","winddirDegree":"77","winddir16Point":"ENE","weatherCode":"119","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0003_white_cloud.png"}],"weatherDesc":[{"value":"Cloudy"}],"precipMM":"0.0","humidity":"53","visibility":"10","pressure":"1022","cloudcover":"37","HeatIndexC":"25","HeatIndexF":"78","DewPointC":"14","DewPointF":"57","WindChillC":"24","WindChillF":"75","WindGustMiles":"14","WindGustKmph":"22","FeelsLikeC":"25","FeelsLikeF":"78","chanceofrain":"0","chanceofremdry":"86","chanceofwindy":"0","chanceofovercast":"63","chanceofsunshine":"56","chanceoffrost":"0","chanceofhightemp":"12","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"9"},{"time":"1500","tempC":"25","tempF":"76","windspeedMiles":"11","windspeedKmph":"18","winddirDegree":"83","winddir16Point":"E","weatherCode":"116","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"}],"weatherDesc":[{"value":"Partly cloudy"}],"precipMM":"0.0","humidity":"52","visibility":"10","pressure":"1020","cloudcover":"65","HeatIndexC":"26","HeatIndexF":"78","DewPointC":"14","DewPointF":"57","WindChillC":"25","WindChillF":"76","WindGustMiles":"13","WindGustKmph":"21","FeelsLikeC":"26","FeelsLikeF":"78","chanceofrain":"0","chanceofremdry":"86","chanceofwindy":"0","chanceofovercast":"72","chanceofsunshine":"35","chanceoffrost":"0","chanceofhightemp":"15","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"9"},{"time":"1800","tempC":"23","tempF":"74","windspeedMiles":"9","windspeedKmph":"15","winddirDegree":"88","winddir16Point":"E","weatherCode":"116","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png"}],"weatherDesc":[{"value":"Partly cloudy"}],"precipMM":"0.0","humidity":"56","visibility":"10","pressure":"1019","cloudcover":"16","HeatIndexC":"25","HeatIndexF":"77","DewPointC":"14","DewPointF":"57","WindChillC":"23","WindChillF":"74","WindGustMiles":"13","WindGustKmph":"20","FeelsLikeC":"25","FeelsLikeF":"77","chanceofrain":"0","chanceofremdry":"91","chanceofwindy":"0","chanceofovercast":"35","chanceofsunshine":"82","chanceoffrost":"0","chanceofhightemp":"10","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"9"},{"time":"2100","tempC":"22","tempF":"71","windspeedMiles":"8","windspeedKmph":"13","winddirDegree":"90","winddir16Point":"E","weatherCode":"113","weatherIconUrl":[{"value":"http://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"}],"weatherDesc":[{"value":"Clear"}],"precipMM":"0.0","humidity":"61","visibility":"10","pressure":"1020","cloudcover":"6","HeatIndexC":"25","HeatIndexF":"76","DewPointC":"14","DewPointF":"57","WindChillC":"22","WindChillF":"71","WindGustMiles":"14","WindGustKmph":"23","FeelsLikeC":"22","FeelsLikeF":"71","chanceofrain":"0","chanceofremdry":"89","chanceofwindy":"0","chanceofovercast":"28","chanceofsunshine":"84","chanceoffrost":"0","chanceofhightemp":"0","chanceoffog":"0","chanceofsnow":"0","chanceofthunder":"0","uvIndex":"1"}]}]}} \ No newline at end of file diff --git a/test/proxy-data/data1.headers b/test/proxy-data/data1.headers new file mode 100644 index 0000000..9b1ac5b --- /dev/null +++ b/test/proxy-data/data1.headers @@ -0,0 +1 @@ +{"Content-Type": "application/json"} \ No newline at end of file diff --git a/test/query.sh b/test/query.sh new file mode 100644 index 0000000..7d1eb60 --- /dev/null +++ b/test/query.sh @@ -0,0 +1,66 @@ +queries=( + / + /Kiev + /Kiev.png + /?T + /Киев + /Kiev?2 + "/Kiev?format=1" + "/Kiev?format=2" + "/Kiev?format=3" + "/Kiev?format=4" + "/Kiev?format=v2" + "/:help" + "/Kiev?T" + "/Kiev?p" + "/Kiev?q" + "/Kiev?Q" + "/Kiev_text=no_view=v2.png" +) + +options=$(cat < test-data/signatures +fi + +result_tmp=$(mktemp wttrin-test-XXXXX) + +while read -r -a args +do + for q in "${queries[@]}"; do + signature=$(echo "${args[@]}" "$q" | sha1sum | awk '{print $1}') + curl -ks "${args[@]}" "$server$q" > "$result_tmp" + + result=$(sha1sum "$result_tmp" | awk '{print $1}') + + # this must be moved to the server + # but for the moment we just clean up + # the cache after each call + rm -rf "/wttr.in/cache" + + if grep -Eq "(we are running out of queries|500 Internal Server Error)" "$result_tmp"; then + echo "$q" + fi + + if [[ $UPDATE = yes ]]; then + printf "%s %s %s\\n" "$signature" "$result" "${args[*]} $q" >> test-data/signatures + elif ! grep -q "$signature $result" test-data/signatures; then + echo "FAILED: curl -ks ${args[*]} $server$q" + fi + done +done <<< "${options}" + +rm "$result_tmp" diff --git a/test/test-data/signatures b/test/test-data/signatures new file mode 100644 index 0000000..edb43a2 --- /dev/null +++ b/test/test-data/signatures @@ -0,0 +1,68 @@ +8f27084b6294ddbe28dbcbf98f798730e8a79289 371718f3918eb35adeb2cfe8f6fbc52adef39520 / +ae537911bb7b0568f478073e661abee1cb4ff941 d123e570da22dee9798d353c4281cb5a2bdbaeac /Kiev +4dc586807c16020b9f4dbb705326c698bea41665 a186d89e95061a7887c005ffa8bd1e29362de2da /Kiev.png +3db1938bedc0ee0047bf3b043ddaf0aba1912f13 b85ed0c0c0214016eabdcc0283e7b8f4f682f5a9 /?T +2cc0ba7a57a6342e72fd7142ca18dbb0eae69416 ce7fb7a88cab697f5280ddabf344f0d397888956 /Киев +928142e88da142ea8075cbfe09bfef349e72dbb1 0f86f59a45b4485fea1375ca945503d9abb9a96d /Kiev?2 +4f6f0a16ff415fad1c102c8023c5d8365ef63402 16d85d2b01441f40b1a60f45603800923580b971 /Kiev?format=1 +c99903b86971ccccfcca4f13e6fca72776b4fbcf bd4c56b36d0c86e805702b5e6c71ba2b1cbf93c1 /Kiev?format=2 +2a0d6cd8d30a84328580611ca6dd6bed1d805a04 b9a5df200b9dd035d2fee4add1a938f621b2aa98 /Kiev?format=3 +4e4e15eeb6a8b6ddb5d00591c4b5e9b74a13e6bc c31ccd5f70ef1f317ff4ad99de5b6b9affaceb39 /Kiev?format=4 +a27d3e4ad7f820124ef57c9299715bc61cb71387 18afd7989100da758f68add862b0a2730e0c79f2 /Kiev?format=v2 +83cc0ef08c24ad7ecc81d1a6cbd693bb06214ece 212431752d0b0d21fabf073e98efa3f1bc24e76e /:help +310b64f65fc9f66a5142bf6104f4f9b9d5eef0ea b0bd07f0c87aae9464c091ccb955f41ec6973098 /Kiev?T +9bd1b460d4927df24724f45f69bd3132f3de8e04 d001bf6ab36b6c14f98f02fc4500706d7a9f05a8 /Kiev?p +3ee1a25d436799804d7ebd8371d8022fa55a71d7 80f18be012d0471dce9fcd2b500f482bcd635347 /Kiev?q +e0e8e7eca16bfac88503ac6d19a7a6c8b469c0fd d5d070c98237f0dffc82b176039f90a15f03a667 /Kiev?Q +d08d1fa2546fee0717d1eb663cf63cd1505b8885 5ccbb4c950bac7f33f1996af856f9678a4a47199 /Kiev_text=no_view=v2.png +3e1be80e942a2ea5450c60e1c0ebfb154aca3da1 76bdcb958640233fa0048bb14c9245f18b14f7c4 -A firefox / +ee6bf0665c2719cda3ec1fbdb80413d821c99b8e 3f9c5091269ece259cce13fc842265019001ed54 -A firefox /Kiev +98ef11678b7fd33425f97eeee70e00cd96206539 a186d89e95061a7887c005ffa8bd1e29362de2da -A firefox /Kiev.png +ecbcf2cb9004a754c4559ce7e92fead68f71721a bfd43c9cb44736e26752741ab2f500f9ca06da1e -A firefox /?T +74206d869128383dba2d840b848b90eb376fd851 7c6ce53ff25d91a5f46baa30077b69e0f09f2571 -A firefox /Киев +91b89025b5acd56ca475924e0eb559a9734f3333 dbd49d93eff2b2cf82f7d266f90de950207a0561 -A firefox /Kiev?2 +e6cb82dab95e05167ffbcb90a10d6cb03cd02ec1 16d85d2b01441f40b1a60f45603800923580b971 -A firefox /Kiev?format=1 +e65bc57e8d1df26c442a9ecf45afee390ff331a3 bd4c56b36d0c86e805702b5e6c71ba2b1cbf93c1 -A firefox /Kiev?format=2 +d743b331d5f4c81bbc8b168ce84a99ab22dc70cf b9a5df200b9dd035d2fee4add1a938f621b2aa98 -A firefox /Kiev?format=3 +bf359ee92690c3a3061542dc6e78cb42ca837412 c31ccd5f70ef1f317ff4ad99de5b6b9affaceb39 -A firefox /Kiev?format=4 +cb875772a6610c991b95b3fbfa22fc7192e25843 9b8e68e9701097316bdacfb13b0c07df23fc0aee -A firefox /Kiev?format=v2 +d520af45b491689d53024c696955db8b1e4eaa87 a76e0c26bac17e43af879db6cb11a3cd9eda2344 -A firefox /:help +6b80492b79a4cc510cb4a9654cb6ff085cdc1943 801d4c6d6837c9604944168a3930dfe05b0e9f5d -A firefox /Kiev?T +e13d7449ce756e55ba3e84e4b7e601b36d0044b6 c5a87804710ab70b8798f56579d276f4ce1806bf -A firefox /Kiev?p +3f6c192a6da5b79ea59ef94e99b9cbf4b0e7ede2 372aca50f441920ad623d62ee8fcde46d609f6f9 -A firefox /Kiev?q +f28ca2a7a47f4859eac7d0307ec7ac67a40e0adf 1b4b66d58bd7e27abeeca45581e686f12fefe76a -A firefox /Kiev?Q +62c5029cf297b1434c57228dc8c8cdfb5e68285d 5ccbb4c950bac7f33f1996af856f9678a4a47199 -A firefox /Kiev_text=no_view=v2.png +ed573b89ca5522d6ab69dc1686b98b00391076bd 9cd1b364c12acd74899ae34bfb9731f70b0b9b68 -H Accept-Language:ru / +b879673f66235bbf1913ff9abc58aff2fb8962d1 00a96a5d83608c2dad7921862bb3f244775f6b19 -H Accept-Language:ru /Kiev +83d99896cf866ecbaa6d2c64c12bd31bc7b35068 92dc07acb93633974eaff19e8c1a99e590e140d9 -H Accept-Language:ru /Kiev.png +9cbb6aa3e0b46e78229a32688db1cced9a44271d 1f82fb278d40520b4c1ef7378e1a5abc868c1f3e -H Accept-Language:ru /?T +095d8d38c667923131801595b903e007b5f902f3 4ede3397f9def696adc7ecf3ffd46a59b8fb25cb -H Accept-Language:ru /Киев +4e6cdfc38c9d9f2436438b345776c42cb8cab8a5 1b00c96a05f9daea8248a8e063d990797be933ad -H Accept-Language:ru /Kiev?2 +b7d8d0f0bb4c38aabac468c9a354bb4e2b401893 c97ca64c11eaa714b472bf723a3353abd4c5bd09 -H Accept-Language:ru /Kiev?format=1 +8f3bbfc9be6418e82edacecc54a9f3e9f26b7fbf 8a29f5bf1e412e2942a701b88dfcf382072b3f34 -H Accept-Language:ru /Kiev?format=2 +f1d4178892fd3dc38e9f966112d317859acc9122 8181bd5a0d7fff5b420d480160b9ea0e14d45aeb -H Accept-Language:ru /Kiev?format=3 +cf44e154504d9bc2b9b6066bbb0f5d52fc12f13e daca309c8ef168b97998e86dbbaab2d3963495b8 -H Accept-Language:ru /Kiev?format=4 +4955c849f67da53203b8c96b15a0bf0a4a471bc6 03afac96b43c7f1b2622b1015b8a4a3cb721c50a -H Accept-Language:ru /Kiev?format=v2 +3f69f4a605ce88643b4e0d62a588c92625d41aea 237e5cf3a0f4737df49d8382fc8a84f41603cbe5 -H Accept-Language:ru /:help +08553ca4bf71c738c4321fe7d84b4e6ff830956f 016fc03b18a8902f838719bbc171184603c08b60 -H Accept-Language:ru /Kiev?T +b70f8b3fc8aee126c04b27b0d3b4c503b4292cbf b60b68a9e77275884812f7e52b06f6012ba5682a -H Accept-Language:ru /Kiev?p +400efdba61125f8cb850d7c33caf4fc2739a960b 5ee4a043a91509ef57aec46a14a0c24f09e8ec47 -H Accept-Language:ru /Kiev?q +b9fd454e73343f262a6d99dd80487495bd647c6f a10718896a07baadb87adf2bf0026b1f00252213 -H Accept-Language:ru /Kiev?Q +8fed034e57624d0e0b33140673094e56e04087bc c7367485784883041c62f4c284aeacf690df71b4 -H Accept-Language:ru /Kiev_text=no_view=v2.png +3ce3dd46413f236244410f142a4b44356a0cedf9 1c2eea391b35c8bfed2541435e1788307aa06bc1 -H X-Forwarded-For:1.1.1.1 / +89be0a5787592298ce34f10b36da7ee87d1a1353 d123e570da22dee9798d353c4281cb5a2bdbaeac -H X-Forwarded-For:1.1.1.1 /Kiev +a9977eadc628b1ede5d4f91ee103dfb740caa2b1 a186d89e95061a7887c005ffa8bd1e29362de2da -H X-Forwarded-For:1.1.1.1 /Kiev.png +eec20c6be5e528967cddf6d0b72c84dbda553d43 9a39dbafa7e1550d374e38059c0f4b8f437e1739 -H X-Forwarded-For:1.1.1.1 /?T +e304153f0e1e9b41781bf4eb6fb6c4a5b7513aec ce7fb7a88cab697f5280ddabf344f0d397888956 -H X-Forwarded-For:1.1.1.1 /Киев +98f0b3a28863a861c6ac6d89ee5d49adb7f3f518 0f86f59a45b4485fea1375ca945503d9abb9a96d -H X-Forwarded-For:1.1.1.1 /Kiev?2 +cf04d7fe2cf36eba8d7fb4fa6def1c9015036456 16d85d2b01441f40b1a60f45603800923580b971 -H X-Forwarded-For:1.1.1.1 /Kiev?format=1 +67fbe9168566709450eb35d36c60c27105335a7e bd4c56b36d0c86e805702b5e6c71ba2b1cbf93c1 -H X-Forwarded-For:1.1.1.1 /Kiev?format=2 +b2604348bf39774c85b7c18ae7b51f63a2c9f31a b9a5df200b9dd035d2fee4add1a938f621b2aa98 -H X-Forwarded-For:1.1.1.1 /Kiev?format=3 +cf012400156c842e569b6a9f05b094e6b75348cd c31ccd5f70ef1f317ff4ad99de5b6b9affaceb39 -H X-Forwarded-For:1.1.1.1 /Kiev?format=4 +1f4981348cab19df9846cd3b3923ee7a972ff9fa 18afd7989100da758f68add862b0a2730e0c79f2 -H X-Forwarded-For:1.1.1.1 /Kiev?format=v2 +767a7407c14049fd77a6a2fedd1d8b35f6e47e0d 212431752d0b0d21fabf073e98efa3f1bc24e76e -H X-Forwarded-For:1.1.1.1 /:help +10631d55b42e7bc5ec15ffc5cddae712785eb354 b0bd07f0c87aae9464c091ccb955f41ec6973098 -H X-Forwarded-For:1.1.1.1 /Kiev?T +031478f562663eb9f577b04032993e2f098146f6 d001bf6ab36b6c14f98f02fc4500706d7a9f05a8 -H X-Forwarded-For:1.1.1.1 /Kiev?p +e106cd21a6b67196159c2baa023142e3a8859612 80f18be012d0471dce9fcd2b500f482bcd635347 -H X-Forwarded-For:1.1.1.1 /Kiev?q +1a16c9b52ba90cb7ad3dd8902bf41b31a287d49e d5d070c98237f0dffc82b176039f90a15f03a667 -H X-Forwarded-For:1.1.1.1 /Kiev?Q +83bd9cc6a646e44b75524474dd32f0fd1f5c5a39 5ccbb4c950bac7f33f1996af856f9678a4a47199 -H X-Forwarded-For:1.1.1.1 /Kiev_text=no_view=v2.png