Kinda counter-inituative, but I'm building a service that relies on getting an IP from the ec2-metadata endpoint trouble is that endpoint is only available when within AWS.
I have some logic that will branch, if you aren't in an AWS environment. However, I could write a unit that just calls the endpoint and watch it fail, but I feel as so there are side-effects (My unit test is probably running in AWS :P). Is there someway I can mock a non-responding server? i.e non-routable?
Kinda counter-inituative, but I'm building a service that relies on getting an IP from the ec2-metadata endpoint trouble is that endpoint is only available when within AWS.
I have some logic that will branch, if you aren't in an AWS environment. However, I could write a unit that just calls the endpoint and watch it fail, but I feel as so there are side-effects (My unit test is probably running in AWS :P). Is there someway I can mock a non-responding server? i.e non-routable?