Skip to content

Commit d210b5d

Browse files
authored
Bumped version to 2.5. (opensearch-project#297)
* Bumped version to 2.5. Signed-off-by: AWSHurneyt <[email protected]> * Fixed cypress test that started failing following backend 2.5 changes. Signed-off-by: AWSHurneyt <[email protected]> Signed-off-by: AWSHurneyt <[email protected]>
1 parent 5eeb983 commit d210b5d

File tree

5 files changed

+51
-15
lines changed

5 files changed

+51
-15
lines changed

.github/workflows/cypress-workflow.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
branches:
88
- "*"
99
env:
10-
OPENSEARCH_DASHBOARDS_VERSION: '2.4.0'
11-
OPENSEARCH_VERSION: '2.4.0-SNAPSHOT'
12-
SECURITY_ANALYTICS_BRANCH: '2.4'
10+
OPENSEARCH_DASHBOARDS_VERSION: '2.5'
11+
OPENSEARCH_VERSION: '2.5.0-SNAPSHOT'
12+
SECURITY_ANALYTICS_BRANCH: '2.5'
1313
jobs:
1414
tests:
1515
name: Run Cypress E2E tests
@@ -90,7 +90,7 @@ jobs:
9090
- name: Sleep until OSD server starts
9191
run: sleep 300
9292
shell: bash
93-
93+
9494
- name: Install Cypress
9595
run: |
9696
cd OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin
@@ -111,7 +111,7 @@ jobs:
111111
with:
112112
path: ${{ matrix.cypress_cache_folder }}
113113
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}
114-
114+
115115
# for now just chrome, use matrix to do all browsers later
116116
- name: Cypress tests
117117
uses: cypress-io/github-action@v2
@@ -121,7 +121,7 @@ jobs:
121121
wait-on: 'http://localhost:5601'
122122
browser: chrome
123123
env:
124-
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}
124+
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}
125125

126126
# Screenshots are only captured on failure, will change this once we do visual regression tests
127127
- uses: actions/upload-artifact@v1

.github/workflows/unit-tests-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches:
88
- "*"
99
env:
10-
OPENSEARCH_DASHBOARDS_VERSION: '2.4.0'
10+
OPENSEARCH_DASHBOARDS_VERSION: '2.5'
1111
jobs:
1212
tests:
1313
name: Run unit tests

cypress/integration/1_detectors.spec.js

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,33 @@
44
*/
55

66
import { OPENSEARCH_DASHBOARDS_URL } from '../support/constants';
7-
import sample_field_mappings from '../fixtures/sample_field_mappings.json';
87
import sample_index_settings from '../fixtures/sample_index_settings.json';
98

9+
const testMappings = {
10+
properties: {
11+
'host-hostname': {
12+
type: 'alias',
13+
path: 'HostName',
14+
},
15+
'windows-message': {
16+
type: 'alias',
17+
path: 'Message',
18+
},
19+
'winlog-provider_name': {
20+
type: 'alias',
21+
path: 'Provider_Name',
22+
},
23+
'winlog-event_data-ServiceName': {
24+
type: 'alias',
25+
path: 'ServiceName',
26+
},
27+
'winlog-event_id': {
28+
path: 'EventID',
29+
type: 'alias',
30+
},
31+
},
32+
};
33+
1034
describe('Detectors', () => {
1135
const indexName = 'cypress-test-windows';
1236
const detectorName = 'test detector';
@@ -71,9 +95,17 @@ describe('Detectors', () => {
7195
// Check that correct page now showing
7296
cy.contains('Configure field mapping');
7397

98+
// Show 50 rows per page
99+
cy.contains('Rows per page').click({ force: true });
100+
cy.contains('50 rows').click({ force: true });
101+
102+
// Show 50 rows per page
103+
cy.contains('Rows per page').click({ force: true });
104+
cy.contains('50 rows').click({ force: true });
105+
74106
// Select appropriate names to map fields to
75-
for (let field_name in sample_field_mappings.properties) {
76-
const mappedTo = sample_field_mappings.properties[field_name].path;
107+
for (let field_name in testMappings.properties) {
108+
const mappedTo = testMappings.properties[field_name].path;
77109

78110
cy.contains('tr', field_name).within(() => {
79111
cy.get(`[data-test-subj="detector-field-mappings-select"]`).click().type(mappedTo);
@@ -105,8 +137,12 @@ describe('Detectors', () => {
105137
// Confirm field mappings registered
106138
cy.contains('Field mapping');
107139

108-
for (let field in sample_field_mappings.properties) {
109-
const mappedTo = sample_field_mappings.properties[field].path;
140+
// Show 50 rows per page
141+
cy.contains('Rows per page').click({ force: true });
142+
cy.contains('50 rows').click({ force: true });
143+
144+
for (let field in testMappings.properties) {
145+
const mappedTo = testMappings.properties[field].path;
110146

111147
cy.contains(field);
112148
cy.contains(mappedTo);

opensearch_dashboards.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "securityAnalyticsDashboards",
3-
"version": "2.4.0.0",
4-
"opensearchDashboardsVersion": "2.4.0",
3+
"version": "2.5.0.0",
4+
"opensearchDashboardsVersion": "2.5.0",
55
"configPath": ["opensearch_security_analytics"],
66
"requiredPlugins": [],
77
"server": true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opensearch_security_analytics_dashboards",
3-
"version": "2.4.0.0",
3+
"version": "2.5.0.0",
44
"description": "OpenSearch Dashboards plugin for Security Analytics",
55
"main": "index.js",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)