Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

test: add smoke test for app sample #663

Merged
merged 2 commits into from
Apr 4, 2019
Merged

test: add smoke test for app sample #663

merged 2 commits into from
Apr 4, 2019

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Mar 31, 2019

There are currently no tests available for the samples. This cleans up a few things and adds a simple test. In addition removes @google-cloud/repo-tools and it's configuration as it wasn't being used.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 31, 2019
@JustinBeckwith JustinBeckwith requested review from DominicKramer and a team March 31, 2019 18:04
@codecov
Copy link

codecov bot commented Mar 31, 2019

Codecov Report

Merging #663 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #663   +/-   ##
======================================
  Coverage    88.9%   88.9%           
======================================
  Files          15      15           
  Lines         946     946           
  Branches       83      83           
======================================
  Hits          841     841           
  Misses         87      87           
  Partials       18      18

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b079085...0855363. Read the comment docs.

Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

this LGTM, and is better than nothing -- is there any way for us to detect that logs have been emitted to stackdriver?


it('should run the quickstart', done => {
// select a random port between 49152 and 65535
const PORT = Math.floor((Math.random() * (65535-49152))) + 49152;
Copy link
Contributor

Choose a reason for hiding this comment

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

just a difference in style, I'd usually just pick a port and use it consistently for integration tests (I'd rather know that I'm not shutting down cleanly via failure to bind).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In retrospect, that's probably going to be fine too. Initially I was worried about the same tests running in parallel, but it doesn't matter since they're almost always in docker containers that should abstract it from us.

@JustinBeckwith
Copy link
Contributor Author

@DominicKramer from @bcoe question:

is there any way for us to detect that logs have been emitted to stackdriver?

@ofrobots
Copy link
Contributor

ofrobots commented Apr 3, 2019

is there any way for us to detect that logs have been emitted to stackdriver?

@bcoe can you elaborate.. as far as I can see there are no logs being emitted to a Stackdriver log stream. I only see console.logs.

@bcoe
Copy link
Contributor

bcoe commented Apr 4, 2019

@ofrobots I think I'm misunderstanding the default behavior of require('@google-cloud/debug-agent').start();, mainly I was wondering if there was a way in test to assert that it had instrumented the logging in the application -- not a blocker for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants