-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]> (cherry picked from commit fe27b02) Co-authored-by: Yuanqi(Ella) Zhu <[email protected]>
- Loading branch information
1 parent
1eafc2e
commit 0a0f03d
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...-dashboards/opensearch-dashboards/datasource-management-plugin/5_version_decouple.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) { | ||
describe('Create datasources', () => { | ||
before(() => { | ||
// Clean up before creating new data sources for testing | ||
cy.deleteAllDataSources(); | ||
cy.createDataSourceNoAuthWithTitle('ds_1'); | ||
cy.wait(6000); | ||
}); | ||
|
||
after(() => { | ||
// Clean up after all test are run | ||
cy.deleteAllDataSources(); | ||
// remove the default data source | ||
cy.setAdvancedSetting({ | ||
defaultDataSource: '', | ||
}); | ||
}); | ||
|
||
describe('Check datasource contains version decouple related information', () => { | ||
it('check installed plugins and data source version information is showed', () => { | ||
cy.request({ | ||
method: 'GET', | ||
url: '/api/saved_objects/_find?type=data-source', | ||
}).then((response) => { | ||
const savedObjects = response.body.saved_objects; | ||
expect( | ||
savedObjects, | ||
'Data sources should exist' | ||
).to.have.length.greaterThan(0); | ||
|
||
const dataSource = savedObjects[0]; | ||
const { attributes } = dataSource; | ||
expect(attributes).to.have.property('dataSourceVersion'); | ||
expect(attributes).to.have.property('installedPlugins'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} |