Skip to content
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

Bumped version to 2.5. #297

Merged
merged 5 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.4.0'
OPENSEARCH_VERSION: '2.4.0-SNAPSHOT'
SECURITY_ANALYTICS_BRANCH: '2.4'
OPENSEARCH_DASHBOARDS_VERSION: '2.5'
OPENSEARCH_VERSION: '2.5.0-SNAPSHOT'
SECURITY_ANALYTICS_BRANCH: '2.5'
jobs:
tests:
name: Run Cypress E2E tests
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Sleep until OSD server starts
run: sleep 300
shell: bash

- name: Install Cypress
run: |
cd OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin
Expand All @@ -111,7 +111,7 @@ jobs:
with:
path: ${{ matrix.cypress_cache_folder }}
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

# for now just chrome, use matrix to do all browsers later
- name: Cypress tests
uses: cypress-io/github-action@v2
Expand All @@ -121,7 +121,7 @@ jobs:
wait-on: 'http://localhost:5601'
browser: chrome
env:
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}

# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.4.0'
OPENSEARCH_DASHBOARDS_VERSION: '2.5'
jobs:
tests:
name: Run unit tests
Expand Down
46 changes: 41 additions & 5 deletions cypress/integration/1_detectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,33 @@
*/

import { OPENSEARCH_DASHBOARDS_URL } from '../support/constants';
import sample_field_mappings from '../fixtures/sample_field_mappings.json';
import sample_index_settings from '../fixtures/sample_index_settings.json';

const testMappings = {
properties: {
'host-hostname': {
type: 'alias',
path: 'HostName',
},
'windows-message': {
type: 'alias',
path: 'Message',
},
'winlog-provider_name': {
type: 'alias',
path: 'Provider_Name',
},
'winlog-event_data-ServiceName': {
type: 'alias',
path: 'ServiceName',
},
'winlog-event_id': {
path: 'EventID',
type: 'alias',
},
},
};

describe('Detectors', () => {
const indexName = 'cypress-test-windows';
const detectorName = 'test detector';
Expand Down Expand Up @@ -71,9 +95,17 @@ describe('Detectors', () => {
// Check that correct page now showing
cy.contains('Configure field mapping');

// Show 50 rows per page
cy.contains('Rows per page').click({ force: true });
cy.contains('50 rows').click({ force: true });

// Show 50 rows per page
cy.contains('Rows per page').click({ force: true });
cy.contains('50 rows').click({ force: true });

// Select appropriate names to map fields to
for (let field_name in sample_field_mappings.properties) {
const mappedTo = sample_field_mappings.properties[field_name].path;
for (let field_name in testMappings.properties) {
const mappedTo = testMappings.properties[field_name].path;

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

for (let field in sample_field_mappings.properties) {
const mappedTo = sample_field_mappings.properties[field].path;
// Show 50 rows per page
cy.contains('Rows per page').click({ force: true });
cy.contains('50 rows').click({ force: true });

for (let field in testMappings.properties) {
const mappedTo = testMappings.properties[field].path;

cy.contains(field);
cy.contains(mappedTo);
Expand Down
4 changes: 2 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "securityAnalyticsDashboards",
"version": "2.4.0.0",
"opensearchDashboardsVersion": "2.4.0",
"version": "2.5.0.0",
"opensearchDashboardsVersion": "2.5.0",
"configPath": ["opensearch_security_analytics"],
"requiredPlugins": [],
"server": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch_security_analytics_dashboards",
"version": "2.4.0.0",
"version": "2.5.0.0",
"description": "OpenSearch Dashboards plugin for Security Analytics",
"main": "index.js",
"license": "Apache-2.0",
Expand Down