-
Notifications
You must be signed in to change notification settings - Fork 0
Extract test utilities to testutil-gcloud
#131
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
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`.
|
@armiol PTAL. |
Can we do that in scope of the Gradle build? |
armiol
left a comment
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.
@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(); |
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.
I think it fits the previous line. It's here and above.
|
@armiol PTAL again. I've just discovered the credentials copying worked successfully even prior to this PR. No additional actions are needed. |
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.