openshift-applier icon indicating copy to clipboard operation
openshift-applier copied to clipboard

Can we use molecule to test for expected failures?

Open etsauer opened this issue 6 years ago • 0 comments

@sabre1041 @oybed after doing troubleshooting for #91, i realized that we were basically swallowing errors that we should expect to be thrown. I'm wondering if we can incorporate "expected failures" to our molecule suite. Some examples:

If I pass:

template: "https://nonexistantdomain.com/template.ym"

I should expect ansible to throw:

urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

If I pass:

template: "https://raw.githubusercontent.com/file/missing.yml"

I should expect:

urllib.error.HTTPError: HTTP Error 404: Not Found

etsauer avatar Jan 29 '19 22:01 etsauer