Extract test utilities to testutil-gcloud#131
Merged
dmitrykuzmin merged 30 commits intomasterfrom Oct 2, 2019
Merged
Conversation
Also the datastore emulator will now run on the default port 8081.
It's not `gcloud`-related. Its place is probably in `base` but for now every project does this thing separately in its own way.
It's too specific to be in a test lib. Users are better off implementing their own versions of the `TestDatastoreWrapper`.
Also did a minor refactoring.
Also did a minor test refactoring.
Also fixed the project ID in `start-datastore scripts.
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
- Coverage 95.01% 94% -1.01%
- Complexity 487 523 +36
==========================================
Files 62 66 +4
Lines 1785 1918 +133
Branches 97 107 +10
==========================================
+ Hits 1696 1803 +107
- Misses 58 78 +20
- Partials 31 37 +6 |
To conform with the type already thrown by the `Resource`.
Contributor
Author
|
@armiol PTAL. |
Contributor
Can we do that in scope of the Gradle build? |
armiol
reviewed
Oct 2, 2019
Contributor
armiol
left a comment
There was a problem hiding this comment.
@dmitrykuzmin LGTM with a comment. Please also see my question in scope of the PR.
| // Make sure the entity is no longer present in the Datastore. | ||
| Entity entityReadAfterClear = wrapper.read(key); | ||
| assertThat(entityReadAfterClear) | ||
| .isNull(); |
Contributor
There was a problem hiding this comment.
I think it fits the previous line. It's here and above.
Contributor
Author
|
@armiol PTAL again. I've just discovered the credentials copying worked successfully even prior to this PR. No additional actions are needed. |
armiol
approved these changes
Oct 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new module
testutil-gcloud.This module exposes the test utilities previously located in the
gcloud-javatests, so they can be used in the client projects.Most notably, the module exposes the
TestDatastoreStorageFactorywhich allows to clean up the storage on demand.Spine version advances to
1.1.3-SNAPSHOT+1.