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

Extract test utilities to testutil-gcloud #131

Merged
merged 30 commits into from
Oct 2, 2019
Merged

Conversation

dmitrykuzmin
Copy link
Contributor

@dmitrykuzmin dmitrykuzmin commented Oct 1, 2019

This PR introduces a new module testutil-gcloud.

This module exposes the test utilities previously located in the gcloud-java tests, so they can be used in the client projects.

Most notably, the module exposes the TestDatastoreStorageFactory which allows to clean up the storage on demand.

Spine version advances to 1.1.3-SNAPSHOT+1.

@dmitrykuzmin dmitrykuzmin self-assigned this Oct 1, 2019
@codecov
Copy link

codecov bot commented Oct 1, 2019

Codecov Report

Merging #131 into master will decrease coverage by 1%.
The diff coverage is 86.58%.

@@            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

@dmitrykuzmin
Copy link
Contributor Author

@armiol PTAL.

@armiol
Copy link
Contributor

armiol commented Oct 2, 2019

@dmitrykuzmin

Please note, that now to build the project locally, you need to copy the spine-dev.json resource into folders $(projectDir)/datastore/src/test/resources and $(projectDir)/testutil-gcloud/src/test/resources.

Can we do that in scope of the Gradle build?

Copy link
Contributor

@armiol armiol left a 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();
Copy link
Contributor

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.

@dmitrykuzmin
Copy link
Contributor Author

@armiol PTAL again.

I've just discovered the credentials copying worked successfully even prior to this PR. No additional actions are needed.

@dmitrykuzmin dmitrykuzmin merged commit e0bc530 into master Oct 2, 2019
@dmitrykuzmin dmitrykuzmin deleted the testutil-gcloud branch October 2, 2019 16:51
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.

2 participants