Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Feb 8, 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 (as a follow up I'd like to create a new test fixture that will use this logic inside an AsynchronousServerSocketChannel)

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.

@tlrx tlrx added >test Issues or PRs that are addressing/adding tests review v7.0.0 labels Feb 8, 2018
@tlrx tlrx force-pushed the extract-storage-logic branch 2 times, most recently from c03c9b3 to abc3baa Compare February 13, 2018 15:32
@clintongormley clintongormley added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed :Plugin Repository GCS labels Feb 14, 2018
@tlrx tlrx force-pushed the extract-storage-logic branch 2 times, most recently from a39fda9 to 313a67a Compare February 15, 2018 08:19
@tlrx
Copy link
Member Author

tlrx commented Feb 15, 2018

@rjernst Same here, I'd loke to move forward on this. Could you please review this when you have time? Thanks a lot.

@tlrx tlrx requested a review from rjernst February 15, 2018 08:26
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.
@tlrx tlrx force-pushed the extract-storage-logic branch from 313a67a to 669ae75 Compare February 21, 2018 10:44
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@tlrx tlrx merged commit 9a95be3 into elastic:master Feb 21, 2018
@tlrx
Copy link
Member Author

tlrx commented Feb 21, 2018

Thanks @ywelsch

@tlrx tlrx added the v6.3.0 label Feb 21, 2018
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.
@tlrx tlrx deleted the extract-storage-logic branch February 21, 2018 12:36
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants