From d2c8fdf2622a133240aea4a4ec642f56c28a9103 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Sat, 9 Mar 2024 10:28:33 -0800 Subject: [PATCH] update tests and snapshots Signed-off-by: Shenoy Pratik --- common/constants/data_sources.ts | 3 + .../create_acceleration.test.tsx.snap | 196 +++++++++--------- .../create_acceleration_header.test.tsx.snap | 2 +- .../define_index_options.test.tsx.snap | 40 ++-- .../index_setting_options.test.tsx.snap | 150 +++++++------- .../index_type_selector.test.tsx.snap | 20 +- .../source_selector.test.tsx.snap | 65 +++--- .../__tests__/source_selector.test.tsx | 2 +- .../selectors/index_type_selector.tsx | 3 +- .../selectors/source_selector.tsx | 4 +- .../query_visual_editor.test.tsx.snap | 6 +- .../add_fields_modal.test.tsx.snap | 32 +-- .../delete_fields_modal.test.tsx.snap | 36 ++-- .../skipping_index_builder.test.tsx.snap | 6 +- 14 files changed, 283 insertions(+), 282 deletions(-) diff --git a/common/constants/data_sources.ts b/common/constants/data_sources.ts index 5462e9b19..63ff345ec 100644 --- a/common/constants/data_sources.ts +++ b/common/constants/data_sources.ts @@ -44,6 +44,9 @@ export const ACCELERATION_INDEX_TYPES = [ { label: 'Materialized View', value: 'materialized' }, ]; +export const ACC_INDEX_TYPE_DOCUMENTATION_URL = + 'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md'; + export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices have a naming format of pattern: \`prefix__suffix\`. They share a common prefix structure, which is \`flint____\`. Additionally, they may have a suffix that varies based on the index type. ##### Skipping Index - For 'Skipping' indices, a fixed index name 'skipping' is used, and this name cannot be modified by the user. The suffix added to this type is \`_index\`. diff --git a/public/components/datasources/components/manage/accelerations/create/__tests__/__snapshots__/create_acceleration.test.tsx.snap b/public/components/datasources/components/manage/accelerations/create/__tests__/__snapshots__/create_acceleration.test.tsx.snap index 55866b922..951139f2f 100644 --- a/public/components/datasources/components/manage/accelerations/create/__tests__/__snapshots__/create_acceleration.test.tsx.snap +++ b/public/components/datasources/components/manage/accelerations/create/__tests__/__snapshots__/create_acceleration.test.tsx.snap @@ -76,7 +76,7 @@ Array [ @@ -148,7 +148,7 @@ Array [ />
Data source @@ -165,7 +165,7 @@ Array [ class="euiFormRow__fieldWrapper" >
Database @@ -259,7 +259,7 @@ Array [ class="euiFormRow__fieldWrapper" >
Table @@ -353,7 +353,7 @@ Array [ class="euiFormRow__fieldWrapper" >
@@ -1315,7 +1315,7 @@ Array [ />,
Data source @@ -1332,7 +1332,7 @@ Array [ className="euiFormRow__fieldWrapper" >
A data source has to be configured and active to be able to select it and index data from.
@@ -1436,7 +1436,7 @@ Array [
,
Database @@ -1453,7 +1453,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the database that contains the tables you'd like to use.
@@ -1557,7 +1557,7 @@ Array [
,
Table @@ -1574,7 +1574,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the Spark table that has the data you would like to index.
@@ -1694,14 +1694,14 @@ Array [ />,
@@ -1744,7 +1744,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
@@ -1849,7 +1849,7 @@ Array [
,
Number of primary shards @@ -1872,10 +1872,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of primary shards for the index. The number of primary shards cannot be changed after the index is created.
@@ -1897,7 +1897,7 @@ Array [
,
Number of replicas @@ -1920,10 +1920,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of replicas each primary shard should have.
@@ -1945,14 +1945,14 @@ Array [
,
@@ -1961,8 +1961,8 @@ Array [ className="euiFormRow__fieldWrapper" >
@@ -2032,7 +2032,7 @@ Array [
Specify how often the index should refresh, which publishes the most recent changes and make them available for search.
@@ -2040,7 +2040,7 @@ Array [
,
Checkpoint location @@ -2063,10 +2063,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
The HDFS compatible file system location path for incremental refresh job checkpoint.
@@ -2102,7 +2102,7 @@ Array [ />,
Index name @@ -2136,7 +2136,7 @@ Array [ > @@ -2170,11 +2170,11 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Must be in lowercase letters. Cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \\, |, ?, #, >, or < are not allowed. Prefix and suffix are added to the name of generated OpenSearch index.
@@ -2240,7 +2240,7 @@ Array [
diff --git a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap index 15915e364..c9f121c45 100644 --- a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap +++ b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap @@ -15,7 +15,7 @@ Array [ />,
Index name @@ -49,7 +49,7 @@ Array [ > @@ -83,11 +83,11 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Must be in lowercase letters. Cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \\, |, ?, #, >, or < are not allowed. Prefix and suffix are added to the name of generated OpenSearch index.
@@ -130,7 +130,7 @@ Array [ />,
Index name @@ -164,7 +164,7 @@ Array [ > @@ -198,11 +198,11 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Must be in lowercase letters. Cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \\, |, ?, #, >, or < are not allowed. Prefix and suffix are added to the name of generated OpenSearch index.
@@ -245,7 +245,7 @@ Array [ />,
Index name @@ -279,7 +279,7 @@ Array [ > @@ -313,11 +313,11 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Must be in lowercase letters. Cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \\, |, ?, #, >, or < are not allowed. Prefix and suffix are added to the name of generated OpenSearch index.
diff --git a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_setting_options.test.tsx.snap b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_setting_options.test.tsx.snap index be7624c90..57a22ffaf 100644 --- a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_setting_options.test.tsx.snap +++ b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_setting_options.test.tsx.snap @@ -15,14 +15,14 @@ Array [ />,
@@ -65,7 +65,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
@@ -170,7 +170,7 @@ Array [
,
Number of primary shards @@ -193,10 +193,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of primary shards for the index. The number of primary shards cannot be changed after the index is created.
@@ -218,7 +218,7 @@ Array [
,
Number of replicas @@ -241,10 +241,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of replicas each primary shard should have.
@@ -266,14 +266,14 @@ Array [
,
@@ -282,8 +282,8 @@ Array [ className="euiFormRow__fieldWrapper" >
@@ -353,7 +353,7 @@ Array [
Specify how often the index should refresh, which publishes the most recent changes and make them available for search.
@@ -361,7 +361,7 @@ Array [
,
Checkpoint location @@ -384,10 +384,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
The HDFS compatible file system location path for incremental refresh job checkpoint.
@@ -423,14 +423,14 @@ Array [ />,
@@ -472,7 +472,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
@@ -578,7 +578,7 @@ Array [
,
Number of primary shards @@ -601,10 +601,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of primary shards for the index. The number of primary shards cannot be changed after the index is created.
@@ -626,7 +626,7 @@ Array [
,
Number of replicas @@ -649,10 +649,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of replicas each primary shard should have.
@@ -674,14 +674,14 @@ Array [
,
@@ -690,8 +690,8 @@ Array [ className="euiFormRow__fieldWrapper" >
@@ -761,7 +761,7 @@ Array [
Specify how often the index should refresh, which publishes the most recent changes and make them available for search.
@@ -769,7 +769,7 @@ Array [
,
Checkpoint location @@ -792,10 +792,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
The HDFS compatible file system location path for incremental refresh job checkpoint.
@@ -831,14 +831,14 @@ Array [ />,
@@ -880,7 +880,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
@@ -986,7 +986,7 @@ Array [
,
Number of primary shards @@ -1009,10 +1009,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of primary shards for the index. The number of primary shards cannot be changed after the index is created.
@@ -1034,7 +1034,7 @@ Array [
,
Number of replicas @@ -1057,10 +1057,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
Specify the number of replicas each primary shard should have.
@@ -1082,14 +1082,14 @@ Array [
,
@@ -1098,8 +1098,8 @@ Array [ className="euiFormRow__fieldWrapper" >
@@ -1169,7 +1169,7 @@ Array [
Specify how often the index should refresh, which publishes the most recent changes and make them available for search.
@@ -1177,7 +1177,7 @@ Array [
,
Checkpoint location @@ -1200,10 +1200,10 @@ Array [ className="euiFormControlLayout__childrenWrapper" >
The HDFS compatible file system location path for incremental refresh job checkpoint.
diff --git a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap index 7c9a22d40..3df2886c0 100644 --- a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap +++ b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap @@ -3,14 +3,14 @@ exports[`Index type selector components renders type selector with default options 1`] = `
@@ -53,7 +53,7 @@ exports[`Index type selector components renders type selector with default optio className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
@@ -161,14 +161,14 @@ exports[`Index type selector components renders type selector with default optio exports[`Index type selector components renders type selector with different options 1`] = `
@@ -210,7 +210,7 @@ exports[`Index type selector components renders type selector with different opt className="euiFormRow__fieldWrapper" >
Select the type of index you want to create. Each index type has benefits and costs.
diff --git a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap index 8daa8dcec..ffb1a8eb3 100644 --- a/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap +++ b/public/components/datasources/components/manage/accelerations/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap @@ -27,7 +27,7 @@ Array [ />,
Data source @@ -44,7 +44,7 @@ Array [ className="euiFormRow__fieldWrapper" >
A data source has to be configured and active to be able to select it and index data from.
@@ -148,7 +148,7 @@ Array [
,
Database @@ -165,7 +165,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the database that contains the tables you'd like to use.
@@ -269,7 +269,7 @@ Array [
,
Table @@ -286,7 +286,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the Spark table that has the data you would like to index.
@@ -418,7 +418,7 @@ Array [ />,
Data source @@ -435,7 +435,7 @@ Array [ className="euiFormRow__fieldWrapper" >
A data source has to be configured and active to be able to select it and index data from.
@@ -540,7 +540,7 @@ Array [
,
Database @@ -557,7 +557,7 @@ Array [ className="euiFormRow__fieldWrapper" >
Select the database that contains the tables you'd like to use.
@@ -662,7 +662,7 @@ Array [
,
Table @@ -679,7 +679,7 @@ Array [ className="euiFormRow__fieldWrapper" >
-