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

properly skip datastore tests from other repos #275

Conversation

bshaffer
Copy link
Contributor

note: this is from my fork, to test it works

@@ -25,6 +25,9 @@ public function setUp()
if (!getenv('GCLOUD_PROJECT')) {
$this->markTestSkipped('Must set GCLOUD_PROJECT');
}
if (!getenv('GOOGLE_APPLICATION_CREDENTIALS')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

GOOGLE_APPLICATION_CREDENTIALS is actually set in the .travis.yaml so it doesn't skip. I think you need to check the file existence.

@tmatsuo
Copy link
Contributor

tmatsuo commented Dec 14, 2016

GOOGLE_APPLICATION_CREDENTIALS should be set somewhere if you want to remove it from .travis.yaml anyways. I think it's more appropriate to check the file existence.

@bshaffer
Copy link
Contributor Author

@tmatsuo I added GOOGLE_APPLICATION_CREDENTIALS to the repo settings' environment variables.

Also I disagree, I think checking if the file exists is a pain because it's an additional check.

@bshaffer
Copy link
Contributor Author

We could possibly add the SkipIfMissingCredentials trait to the testing repo and then add that to all the tests.

@bshaffer
Copy link
Contributor Author

Closing for now, we'll find a better way to do this.

@bshaffer bshaffer closed this Feb 13, 2017
@bshaffer bshaffer deleted the properly-skip-datastore-tests branch February 13, 2017 19:33
SurferJeffAtGoogle pushed a commit to SurferJeffAtGoogle/php-docs-samples that referenced this pull request May 15, 2017
GoogleCloudPlatform#260)

* updates all samples for google/cloud-tools and adds delay to endpoints

* uses google/cloud 0.12 because of issue GoogleCloudPlatform#275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants