Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

use actual json endpoint for scaffold triggers #215

Merged
merged 1 commit into from
Dec 21, 2017
Merged

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Dec 21, 2017

Before this PR, the scaffolded steps all used http://example.com/<key>.json which looks nice, but returns busted html whenever it's called. Instead, I switched the scaffolded steps to use https://jsonplaceholder.typicode.com, which is a test utility that supports all manner of endpoints and verbs. I'm using the default public stuff right now, but it's open source and we could customize it and host it ourselves if we want. The biggest advantage to self-hosting would be we could create wildcard endpoints to match the scaffold name (/whatever would work), but this seems straightforward enough as not to confuse devs.

Now, the scaffolded tests actually run!

Before:
screen shot 2017-12-21 at 12 57 57 am

After:
screen shot 2017-12-21 at 12 58 16 am

@xavdid xavdid requested a review from eliangcs December 21, 2017 07:01
Copy link
Member

@eliangcs eliangcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for using testable endpoints. I didn't pull this as the change looks simple enough. FYI, I recently discovered that we have ms-platform-tests and oauth-test-endpoints for the testing purpose. Maybe it's a good idea to merge them into one as a service that provides all kinds of auths and mock data? cc @bryanhelmig

@xavdid
Copy link
Contributor Author

xavdid commented Dec 21, 2017

good point! those are private right now, so if we're going to be sending these right to customers, I'd prefer something public. This is easy to tweak again if it's not working out though. Thanks for the 👀!

@xavdid xavdid merged commit bf9176d into master Dec 21, 2017
@xavdid xavdid deleted the working-templates branch December 21, 2017 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants