Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Aug 28, 2024
1 parent ad07747 commit 0033855
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions tests/tests_manifests_workflow/test_input_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ def test_create_manifest_opensearch_template(self) -> None:
"checks": ["gradle:publish", "gradle:properties:version"]}]
}
)
self.assertEqual(
input_manifest[1].to_dict(),
{
'schema-version': '1.0',
'name': 'OpenSearch',
'ci': {'image': {'name': 'opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v3',
'args': '-e JAVA_HOME=/opt/java/openjdk-11'}},
'components': [{'name': 'index-management',
'integ-test': {'build-dependencies': ['job-scheduler'],
'test-configs': ['with-security', 'without-security'],
'additional-cluster-configs': {'path.repo': ['/tmp']}},
'bwc-test': {'test-configs': ['with-security']}}]
}
)

def test_create_manifest_opensearch_default_template(self) -> None:
input_manifests = InputManifests("OpenSearch")
Expand All @@ -75,6 +89,20 @@ def test_create_manifest_opensearch_default_template(self) -> None:
"checks": ["gradle:publish", "gradle:properties:version"]}]
}
)
self.assertEqual(
input_manifest[1].to_dict(),
{
'schema-version': '1.0',
'name': 'OpenSearch',
'ci': {'image': {'name': 'opensearchstaging/ci-runner:ci-runner-al2-opensearch-build-v1',
'args': '-e JAVA_HOME=/opt/java/openjdk-21'}},
'components': [{'name': 'index-management',
'integ-test': {'build-dependencies': ['job-scheduler'],
'test-configs': ['with-security', 'without-security'],
'additional-cluster-configs': {'path.repo': ['/tmp']}},
'bwc-test': {'test-configs': ['with-security']}}]
}
)

def test_create_manifest_opensearch_previous_base_version(self) -> None:
input_manifests = InputManifests("OpenSearch")
Expand All @@ -97,6 +125,16 @@ def test_create_manifest_opensearch_dashboards_template(self) -> None:
"ref": "1.x"}]
}
)
self.assertEqual(
input_manifest[1].to_dict(),
{
'schema-version': '1.0',
'name': 'OpenSearch Dashboards',
'ci': {'image': {'name': 'opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v4'}},
'components': [{'name': 'indexManagementDashboards',
'integ-test': {'test-configs': ['with-security', 'without-security']}}]
}
)

def test_create_manifest_opensearch_dashboards_default_template(self) -> None:
input_manifests = InputManifests("OpenSearch Dashboards")
Expand All @@ -113,6 +151,26 @@ def test_create_manifest_opensearch_dashboards_default_template(self) -> None:
"checks": ["npm:package:version"]}]
}
)
self.assertEqual(
input_manifest[1].to_dict(),
{
'schema-version': '1.0',
'name': 'OpenSearch Dashboards',
'ci': {'image': {'name': 'opensearchstaging/ci-runner:ci-runner-almalinux8-opensearch-dashboards-integtest-v1'}},
'components': [{'name': 'OpenSearch-Dashboards',
'integ-test': {'test-configs': ['with-security', 'without-security'],
'additional-cluster-configs': {'vis_builder.enabled': True,
'data_source.enabled': True,
'savedObjects.maxImportPayloadBytes': 10485760,
'server.maxPayloadBytes': 1759977,
'logging.json': False,
'data.search.aggs.shardDelay.enabled': True,
'csp.warnLegacyBrowsers': False},
'ci-groups': 9}},
{'name': 'indexManagementDashboards',
'integ-test': {'test-configs': ['with-security', 'without-security']}}]
}
)

def test_create_manifest_opensearch_dashboards_previous_base_version(self) -> None:
input_manifests = InputManifests("OpenSearch-Dashboards")
Expand Down

0 comments on commit 0033855

Please sign in to comment.