-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add option for bwc tests in bundle level #652
Conversation
Signed-off-by: Zelin Hao <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 2.x #652 +/- ##
============================================
+ Coverage 75.48% 75.70% +0.21%
- Complexity 2611 2616 +5
============================================
Files 330 330
Lines 15115 15115
Branches 2338 2338
============================================
+ Hits 11410 11443 +33
+ Misses 2379 2348 -31
+ Partials 1326 1324 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
File getAsFile() { | ||
return fileTree(bwc_js_resource_location).getSingleFile() | ||
if (bwcBundleTest) { | ||
versions = ["1.3.2", bwcCurrentVersion] |
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.
get this 1.3.2 from bwcBundleVersion
?
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.
bwcBundleVersion
is actually 4 digits version and this would need to be 3 digits.
Since this would be fixed most of the time as the old version, we don't need to change it every time. We could add another line to derive 3 digits version from bwcBundleVersion
if you think that would be better.
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.
Wondering if there's a guide line of the bwc version, for example, on 2.5 branch, should we run bwc against the the latest 1.x version or the last 2.4.x version.
If it's 1.x version, then true we don't change this often I suppose.
build.gradle
Outdated
nodes.each { node -> | ||
node.extraConfigFile("kirk.pem", file("src/test/resources/security/kirk.pem")) | ||
node.extraConfigFile("kirk-key.pem", file("src/test/resources/security/kirk-key.pem")) | ||
node.extraConfigFile("esnode.pem", file("src/test/resources/security/esnode.pem")) | ||
node.extraConfigFile("esnode-key.pem", file("src/test/resources/security/esnode-key.pem")) | ||
node.extraConfigFile("root-ca.pem", file("src/test/resources/security/root-ca.pem")) | ||
node.setting("plugins.security.disabled", "true") | ||
node.setting("plugins.security.ssl.transport.pemcert_filepath", "esnode.pem") | ||
node.setting("plugins.security.ssl.transport.pemkey_filepath", "esnode-key.pem") | ||
node.setting("plugins.security.ssl.transport.pemtrustedcas_filepath", "root-ca.pem") | ||
node.setting("plugins.security.ssl.transport.enforce_hostname_verification", "false") | ||
node.setting("plugins.security.ssl.http.enabled", "true") | ||
node.setting("plugins.security.ssl.http.pemcert_filepath", "esnode.pem") | ||
node.setting("plugins.security.ssl.http.pemkey_filepath", "esnode-key.pem") | ||
node.setting("plugins.security.ssl.http.pemtrustedcas_filepath", "root-ca.pem") | ||
node.setting("plugins.security.allow_unsafe_democertificates", "true") | ||
node.setting("plugins.security.allow_default_init_securityindex", "true") | ||
node.setting("plugins.security.authcz.admin_dn", "CN=kirk,OU=client,O=client,L=test,C=de") | ||
node.setting("plugins.security.audit.type", "internal_elasticsearch") | ||
node.setting("plugins.security.enable_snapshot_restore_privilege", "true") | ||
node.setting("plugins.security.check_snapshot_restore_write_privileges", "true") | ||
node.setting("plugins.security.restapi.roles_enabled", "[\"all_access\", \"security_rest_api_access\"]") | ||
node.setting("plugins.security.system_indices.enabled", "true") | ||
} |
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.
See if you can move this to where you set up the test cluster using bundle
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.
This won't be applicable at this time because as far as i see we want to make the framework itself more generic. This codebase is actually derived from security repo on running bwc tests. It works as parameter to add certificates to the test cluster.
Signed-off-by: Zelin Hao <[email protected]>
* Add option for bwc tests in bundle level Signed-off-by: Zelin Hao <[email protected]> * Fix bug for security Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]> (cherry picked from commit 94c48e9)
* Add option for bwc tests in bundle level Signed-off-by: Zelin Hao <[email protected]> * Fix bug for security Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]> (cherry picked from commit 94c48e9) Signed-off-by: Zelin Hao <[email protected]>
* Add option for bwc tests in bundle level Signed-off-by: Zelin Hao <[email protected]> * Fix bug for security Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]> (cherry picked from commit 94c48e9) Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]> Co-authored-by: Zelin Hao <[email protected]>
* Add option for bwc tests in bundle level Signed-off-by: Zelin Hao <[email protected]> * Fix bug for security Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]>
* Add option for bwc tests in bundle level Signed-off-by: Zelin Hao <[email protected]> * Fix bug for security Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: Ronnak Saxena <[email protected]>
Description
Add option to run BWC tests in distribution level, which is running tests in the test cluster with latest distribution bundle installed and all plugins (included in the latest manifest) present.
The command to run BWC tests in distribution level would be
./gradlew bwcTestSuite -Dtests.security.manager=false -PcustomDistributionDownloadType=bundle
If property
customDistributionDownloadType
is not set nor set tobundle
, the BWC tests would be default to run in plugins level as previously configured.Issues Resolved
Part of opensearch-project/opensearch-build#2870
CheckList:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.