You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add infra support and helper function to create real datasource
Signed-off-by: Derek Ho <dxho@amazon.com>
* Remove logs from previous change
Signed-off-by: Derek Ho <dxho@amazon.com>
* Add test that uses the helper function to verify functionality
Signed-off-by: Derek Ho <dxho@amazon.com>
* Change to request and add it to appropriate workflows
Signed-off-by: Derek Ho <dxho@amazon.com>
* Add basic auth remote cluster
Signed-off-by: Derek Ho <dxho@amazon.com>
* Call function
Signed-off-by: Derek Ho <dxho@amazon.com>
* Move action
Signed-off-by: Derek Ho <dxho@amazon.com>
* Update action and usage in docs
Signed-off-by: Derek Ho <dxho@amazon.com>
* Checkout before access
Signed-off-by: Derek Ho <dxho@amazon.com>
* Add relative path
Signed-off-by: Derek Ho <dxho@amazon.com>
* Fix spelling
Signed-off-by: Derek Ho <dxho@amazon.com>
* Remove -d
Signed-off-by: Derek Ho <dxho@amazon.com>
* Move port logic
Signed-off-by: Derek Ho <dxho@amazon.com>
* Cat log
Signed-off-by: Derek Ho <dxho@amazon.com>
* Allow modification
Signed-off-by: Derek Ho <dxho@amazon.com>
* Duplicate download
Signed-off-by: Derek Ho <dxho@amazon.com>
* Change directory
Signed-off-by: Derek Ho <dxho@amazon.com>
* Change name
Signed-off-by: Derek Ho <dxho@amazon.com>
* Remove extra chmod
Signed-off-by: Derek Ho <dxho@amazon.com>
* Within test directory
Signed-off-by: Derek Ho <dxho@amazon.com>
* Fix
Signed-off-by: Derek Ho <dxho@amazon.com>
* Fix for windows, add helper function, show usage
Signed-off-by: Derek Ho <dxho@amazon.com>
* Remove pwd
Signed-off-by: Derek Ho <dxho@amazon.com>
* Move to temp dire
Signed-off-by: Derek Ho <dxho@amazon.com>
* Address PR feedback and try to spin up an instance with security
Signed-off-by: Derek Ho <dxho@amazon.com>
* Small action change and documentation add
Signed-off-by: Derek Ho <dxho@amazon.com>
---------
Signed-off-by: Derek Ho <dxho@amazon.com>
description: 'The version of OpenSearch that should be used, e.g "3.0.0"'
7
+
required: true
8
+
9
+
plugins:
10
+
description: 'A comma separated list of plugins to install. Leave empty to not install any. Each entry should be a full path prefixed with `file: `, for example: `file:$(pwd)/my-plugin.zip`'
11
+
required: false
12
+
13
+
security-enabled:
14
+
description: 'Whether security is enabled'
15
+
required: true
16
+
17
+
admin-password:
18
+
description: 'The admin password uses for the cluster'
19
+
required: false
20
+
21
+
security_config_file:
22
+
description: 'Path to a security config file to replace the default. Leave empty if security is not enabled or using the default config'
23
+
required: false
24
+
25
+
port:
26
+
description: 'Port to run OpenSearch. Leave empty to use the default config (9200)'
Copy file name to clipboardexpand all lines: DEVELOPER_GUIDE.md
+38
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,44 @@ Tests for plugins that are not a part of the [OpenSearch Dashboards](https://git
126
126
/<YOUR_PLUGIN_NAME>
127
127
```
128
128
129
+
### Tests for Multiple Datasources
130
+
131
+
Tests surrounding the multiple datasources feature can use the start-opensearch action that lives in this repo. Note that to test these related features, the following OSD config needs to be set: `osd-serve-args: --data_source.enabled=true`. Additionally, if testing with a remote datasource with basic auth enabled using this repo, an additional OSD config needs to be set: `osd-serve-args: --data_source.ssl.verificationMode: none`, so that the self-signed demo certificates can be used.
132
+
133
+
Example usage:
134
+
```
135
+
- uses: ./.github/actions/start-opensearch
136
+
with:
137
+
opensearch-version: 3.0.0
138
+
security-enabled: false
139
+
port: 9201
140
+
```
141
+
142
+
143
+
This will spin up an OpenSearch backend with version 3.0.0 on port 9201 within the same github runner. This OpenSearch can then be added as an datasource.
144
+
145
+
```
146
+
- uses: ./.github/actions/start-opensearch
147
+
with:
148
+
opensearch-version: 3.0.0
149
+
security-enabled: true
150
+
admin-password: admin
151
+
port: 9202
152
+
```
153
+
This will spin up an OpenSearch backend with version 3.0.0 on port 9202 with basic auth and admin credentials of "admin:admin" within the same github runner. This OpenSearch can then be added as an datasource.
154
+
155
+
To test UI/API compatibility with different versions you may want to spin up a matrix of OpenSearch backends with different versions than the local cluster. The earliest windows distribution supported is 2.4.
156
+
157
+
158
+
The DataSourceManagement Plugin exposes a helper function to create a data source on this port:
Copy file name to clipboardexpand all lines: cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
+6
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ const miscUtils = new MiscUtils(cy);
23
23
constusername=Cypress.env('username');
24
24
constpassword=Cypress.env('password');
25
25
26
+
// TODO: create datasource with basic auth and sigv4
27
+
26
28
if(Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')){
27
29
describe('Create datasources',()=>{
28
30
before(()=>{
@@ -385,6 +387,10 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
0 commit comments