Skip to content
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

Merged
merged 2 commits into from
Nov 19, 2018
Merged

test: add a system test #126

merged 2 commits into from
Nov 19, 2018

Conversation

JustinBeckwith
Copy link
Contributor

This deploys a tiny function to GCF, uses a packed version of gcp-metadata to get a reesponse, and validates it.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 19, 2018
@stephenplusplus
Copy link
Contributor

This is cool!

@JustinBeckwith JustinBeckwith merged commit 947fa2a into googleapis:master Nov 19, 2018
Copy link
Contributor

@ofrobots ofrobots left a 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.

"assert-rejects": "^1.0.0",
"await-spawn": "^2.1.1",

This comment was marked as spam.

This comment was marked as spam.

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.

@JustinBeckwith JustinBeckwith mentioned this pull request Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants