-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Tests] Extract the testing logic that emulates a Google Cloud Storage service #28576
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
Merged
Conversation
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
c03c9b3 to
abc3baa
Compare
a39fda9 to
313a67a
Compare
Member
Author
|
@rjernst Same here, I'd loke to move forward on this. Could you please review this when you have time? Thanks a lot. |
This commit extracts in a dedicated class the request/response logic that "emulates" a Google Cloud Storage service in our repository-gcs tests. The idea behind this is to make the logic more reusable.
313a67a to
669ae75
Compare
ywelsch
approved these changes
Feb 21, 2018
Contributor
ywelsch
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.
LGTM
Member
Author
|
Thanks @ywelsch |
tlrx
added a commit
that referenced
this pull request
Feb 21, 2018
This pull request extracts in a dedicated class the request/response logic that "emulates" a Google Cloud Storage service in our repository-gcs tests. The idea behind this is to make the logic more reusable. The class MockHttpTransport has been renamed to MockStorage which now only takes care of instantiating a Storage client and does the low-level request/response plumbing needed by this client. The "Google Cloud Storage" logic has been extracted from MockHttpTransport and put in a new GoogleCloudStorageTestServer that is now independent from the google client testing framework.
martijnvg
added a commit
that referenced
this pull request
Feb 22, 2018
* es/master: (143 commits) Revert "Disable BWC tests for build issues" Remove AcknowledgedRestListener in favour of RestToXContentListener (#28724) Build: Consolidate archives and packages configuration (#28760) Skip some plugins service tests on Windows Migrate some *ResponseTests to AbstractStreamableXContentTestCase (#28749) Disable BWC tests for build issues Ensure that azure stream has socket privileges (#28751) [DOCS] Fixed broken link. Pass InputStream when creating XContent parser (#28754) [DOCS] Changed to use transient setting to reenabled allocation. Closes #27677 Delay path expansion on Windows [TEST] replace randomAsciiAlphanumOfLengthBetween with randomAsciiLettersOfLengthBetween [Tests] Extract the testing logic for Google Cloud Storage (#28576) [Docs] Update links to java9 docs (#28750) version set in ingest pipeline (#27573) Revert "Add startup logging for standalone tests" Tests: don't wait for completion while trying to get completed task Add 5.6.9 snapshot version [Docs] Java high-level REST client : clean up (#28703) Updated distribution outputs in contributing docs ...
martijnvg
added a commit
that referenced
this pull request
Feb 22, 2018
* es/6.x: (140 commits) Remove AcknowledgedRestListener in favour of RestToXContentListener (#28724) Migrate some *ResponseTests to AbstractStreamableXContentTestCase (#28749) Revert "Disable BWC tests for build issues" Skip some plugins service tests on Windows Build: Consolidate archives and packages configuration (#28760) Ensure that azure stream has socket privileges (#28773) Disable BWC tests for build issues Pass InputStream when creating XContent parser (#28754) [DOCS] Fixed broken link. [DOCS] Changed to use transient setting to reenabled allocation. Closes #27677 Delay path expansion on Windows [TEST] replace randomAsciiAlphanumOfLengthBetween with randomAsciiLettersOfLengthBetween REST high-level client: add support for Rollover Index API (#28698) [Tests] Extract the testing logic for Google Cloud Storage (#28576) Moved Grok helper code to a separate Gradle module and let ingest-common module depend on it. version set in ingest pipeline (#27573) [Docs] Update links to java9 docs (#28750) Revert "Add startup logging for standalone tests" Tests: don't wait for completion while trying to get completed task Add 5.6.9 snapshot version ...
tlrx
added a commit
to tlrx/elasticsearch
that referenced
this pull request
Feb 22, 2018
This commit adds a GoogleCloudStorageFixture that uses the logic of a GoogleCloudStorageTestServer (added in elastic#28576) to emulate a remote Google Cloud Storage service. By adding this fixture and a new integration test, we should be able to catch more bugs when upgrading the client library. In consequence the old REST test RepositoryGcsClientYamlTestSuiteIT has been removed. The GoogleCloudStorageTestServer has to be adapted a bit for batch requests. The fixture is started by the googleCloudStorageFixture task and a custom Service Account file is created and added to the Elasticsearch keystore for each test.
tlrx
added a commit
that referenced
this pull request
Mar 9, 2018
This commit adds a GoogleCloudStorageFixture that uses the logic of a GoogleCloudStorageTestServer (added in #28576) to emulate a remote Google Cloud Storage service. By adding this fixture and a more complete integration test, we should be able to catch more bugs when upgrading the client library. The fixture is started by the googleCloudStorageFixture task and a custom Service Account file is created and added to the Elasticsearch keystore for each test.
tlrx
added a commit
that referenced
this pull request
Mar 9, 2018
This commit adds a GoogleCloudStorageFixture that uses the logic of a GoogleCloudStorageTestServer (added in #28576) to emulate a remote Google Cloud Storage service. By adding this fixture and a more complete integration test, we should be able to catch more bugs when upgrading the client library. The fixture is started by the googleCloudStorageFixture task and a custom Service Account file is created and added to the Elasticsearch keystore for each test.
sebasjm
pushed a commit
to sebasjm/elasticsearch
that referenced
this pull request
Mar 10, 2018
…8576) This pull request extracts in a dedicated class the request/response logic that "emulates" a Google Cloud Storage service in our repository-gcs tests. The idea behind this is to make the logic more reusable. The class MockHttpTransport has been renamed to MockStorage which now only takes care of instantiating a Storage client and does the low-level request/response plumbing needed by this client. The "Google Cloud Storage" logic has been extracted from MockHttpTransport and put in a new GoogleCloudStorageTestServer that is now independent from the google client testing framework.
sebasjm
pushed a commit
to sebasjm/elasticsearch
that referenced
this pull request
Mar 10, 2018
This commit adds a GoogleCloudStorageFixture that uses the logic of a GoogleCloudStorageTestServer (added in elastic#28576) to emulate a remote Google Cloud Storage service. By adding this fixture and a more complete integration test, we should be able to catch more bugs when upgrading the client library. The fixture is started by the googleCloudStorageFixture task and a custom Service Account file is created and added to the Elasticsearch keystore for each test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
>test
Issues or PRs that are addressing/adding tests
v6.3.0
v7.0.0-beta1
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 pull request extracts in a dedicated class the request/response logic that "emulates" a Google Cloud Storage service in our repository-gcs tests.
The idea behind this is to make the logic more reusable (as a follow up I'd like to create a new test fixture that will use this logic inside an
AsynchronousServerSocketChannel)The class
MockHttpTransporthas been renamed toMockStoragewhich now only takes care of instantiating aStorageclient and does the low-level request/response plumbing needed by this client.The "Google Cloud Storage" logic has been extracted from
MockHttpTransportand put in a newGoogleCloudStorageTestServerthat is now independent from the google client testing framework.