realestate-com-au / akamai-rspec

Test your akamai configuration with rspec
24 stars 13 forks source link

Fix partially matching origins #1

Closed ryandoyle closed 9 years ago

ryandoyle commented 9 years ago

Hi

If I'm not mistaken it looks like there is a bug in the be_served_from_origin matcher. If an origin was something.com, this matcher would pass for thing.com etc...

I ended up removing the alias methods and separating each out. Also the check at the end of the matcher was redundant so I've removed that too. The x-cache-key that I am using in the tests is "real" (with sites and numbers changed). I am assuming the format is consistent (but I might be wrong).

I've also added a Rakefile (It gives you similar functionality to what is in rebuild_and_install.sh). You might find this useful - I generally prefer performing tasks on a project via rake.

Thanks! Ryan

beegibson commented 9 years ago

Good catch, thanks.