-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add a system test #126
Conversation
This is cool! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together!
Could this functionality (package, deploy, test) be packaged into a stand-alone dependency – similar to post-install-check
?
before(async () => { | ||
// Clean up any old cloud functions just hanging out | ||
gcf = await getGCFClient(); | ||
await pruneFunctions(false); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
"assert-rejects": "^1.0.0", | ||
"await-spawn": "^2.1.1", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
it('should access the metadata service on GCF', async () => { | ||
const url = | ||
`https://us-central1-${projectId}.cloudfunctions.net/${fullPrefix}`; | ||
const res = await fetch(url); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This deploys a tiny function to GCF, uses a packed version of gcp-metadata to get a reesponse, and validates it.