Skip to content

Commit 507bc87

Browse files
test(smoke): Fix assertions
1 parent ad523c1 commit 507bc87

1 file changed

Lines changed: 60 additions & 50 deletions

File tree

tests/templates/kuttl/smoke/10-assert.yaml.j2

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,31 +1048,36 @@ metadata:
10481048
kind: OpenSearchCluster
10491049
name: opensearch
10501050
data:
1051-
opensearch.yml: |
1052-
cluster.name: opensearch
1053-
cluster.routing.allocation.disk.threshold_enabled: false
1054-
discovery.type: zen
1055-
network.host: 0.0.0.0
1056-
node.attr.role-group: cluster-manager
1057-
node.store.allow_mmap: false
1058-
path.logs: /stackable/log/opensearch
1059-
plugins.security.allow_default_init_securityindex: true
1060-
plugins.security.nodes_dn:
1061-
- DC=local,DC=cluster,DC=svc,DC=test,DC=opensearch-nodes-cluster-manager-headless,DC=opensearch-nodes-cluster-manager-*
1062-
- DC=local,DC=cluster,DC=svc,DC=test,DC=opensearch-nodes-data-headless,DC=opensearch-nodes-data-*
1063-
- CN=generated certificate for pod
1064-
{% if test_scenario['values']['server-use-tls'] == 'true' %}
1065-
plugins.security.ssl.http.enabled: true
1066-
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/tls.crt
1067-
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/tls.key
1068-
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/ca.crt
1069-
{% else %}
1070-
plugins.security.ssl.http.enabled: false
1071-
{% endif %}
1072-
plugins.security.ssl.transport.enabled: true
1073-
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/tls.crt
1074-
plugins.security.ssl.transport.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/tls.key
1075-
plugins.security.ssl.transport.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/ca.crt
1051+
log4j2.properties: |
1052+
{% raw %}
1053+
rootLogger.level = INFO
1054+
rootLogger.appenderRef.CONSOLE.ref = CONSOLE
1055+
rootLogger.appenderRef.FILE.ref = FILE
1056+
appender.CONSOLE.type = Console
1057+
appender.CONSOLE.name = CONSOLE
1058+
appender.CONSOLE.target = SYSTEM_ERR
1059+
appender.CONSOLE.layout.type = PatternLayout
1060+
appender.CONSOLE.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
1061+
appender.CONSOLE.filter.threshold.type = ThresholdFilter
1062+
appender.CONSOLE.filter.threshold.level = INFO
1063+
appender.FILE.type = RollingFile
1064+
appender.FILE.name = FILE
1065+
appender.FILE.fileName = /stackable/log/opensearch/opensearch_server.json
1066+
appender.FILE.filePattern = /stackable/log/opensearch/opensearch_server.json.%i
1067+
appender.FILE.layout.type = OpenSearchJsonLayout
1068+
appender.FILE.layout.type_name = server
1069+
appender.FILE.policies.type = Policies
1070+
appender.FILE.policies.size.type = SizeBasedTriggeringPolicy
1071+
appender.FILE.policies.size.size = 5MB
1072+
appender.FILE.strategy.type = DefaultRolloverStrategy
1073+
appender.FILE.strategy.max = 1
1074+
appender.FILE.filter.threshold.type = ThresholdFilter
1075+
appender.FILE.filter.threshold.level = INFO
1076+
{% endraw %}
1077+
# opensearch.yml: |
1078+
# The property "plugins.security.nodes_dn" in opensearch.yml contains the namespace and cluster
1079+
# domain. Since these cannot be substituted here, opensearch.yml is omitted in this assertion.
1080+
# This is okay, because the configuration file is already covered by the unit tests.
10761081
---
10771082
apiVersion: v1
10781083
kind: ConfigMap
@@ -1092,31 +1097,36 @@ metadata:
10921097
kind: OpenSearchCluster
10931098
name: opensearch
10941099
data:
1095-
opensearch.yml: |
1096-
cluster.name: opensearch
1097-
cluster.routing.allocation.disk.threshold_enabled: false
1098-
discovery.type: zen
1099-
network.host: 0.0.0.0
1100-
node.attr.role-group: data
1101-
node.store.allow_mmap: false
1102-
path.logs: /stackable/log/opensearch
1103-
plugins.security.allow_default_init_securityindex: true
1104-
plugins.security.nodes_dn:
1105-
- DC=local,DC=cluster,DC=svc,DC=test,DC=opensearch-nodes-cluster-manager-headless,DC=opensearch-nodes-cluster-manager-*
1106-
- DC=local,DC=cluster,DC=svc,DC=test,DC=opensearch-nodes-data-headless,DC=opensearch-nodes-data-*
1107-
- CN=generated certificate for pod
1108-
{% if test_scenario['values']['server-use-tls'] == 'true' %}
1109-
plugins.security.ssl.http.enabled: true
1110-
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/tls.crt
1111-
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/tls.key
1112-
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/server/ca.crt
1113-
{% else %}
1114-
plugins.security.ssl.http.enabled: false
1115-
{% endif %}
1116-
plugins.security.ssl.transport.enabled: true
1117-
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/tls.crt
1118-
plugins.security.ssl.transport.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/tls.key
1119-
plugins.security.ssl.transport.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/internal/ca.crt
1100+
log4j2.properties: |
1101+
{% raw %}
1102+
rootLogger.level = INFO
1103+
rootLogger.appenderRef.CONSOLE.ref = CONSOLE
1104+
rootLogger.appenderRef.FILE.ref = FILE
1105+
appender.CONSOLE.type = Console
1106+
appender.CONSOLE.name = CONSOLE
1107+
appender.CONSOLE.target = SYSTEM_ERR
1108+
appender.CONSOLE.layout.type = PatternLayout
1109+
appender.CONSOLE.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
1110+
appender.CONSOLE.filter.threshold.type = ThresholdFilter
1111+
appender.CONSOLE.filter.threshold.level = INFO
1112+
appender.FILE.type = RollingFile
1113+
appender.FILE.name = FILE
1114+
appender.FILE.fileName = /stackable/log/opensearch/opensearch_server.json
1115+
appender.FILE.filePattern = /stackable/log/opensearch/opensearch_server.json.%i
1116+
appender.FILE.layout.type = OpenSearchJsonLayout
1117+
appender.FILE.layout.type_name = server
1118+
appender.FILE.policies.type = Policies
1119+
appender.FILE.policies.size.type = SizeBasedTriggeringPolicy
1120+
appender.FILE.policies.size.size = 5MB
1121+
appender.FILE.strategy.type = DefaultRolloverStrategy
1122+
appender.FILE.strategy.max = 1
1123+
appender.FILE.filter.threshold.type = ThresholdFilter
1124+
appender.FILE.filter.threshold.level = INFO
1125+
{% endraw %}
1126+
# opensearch.yml: |
1127+
# The property "plugins.security.nodes_dn" in opensearch.yml contains the namespace and cluster
1128+
# domain. Since these cannot be substituted here, opensearch.yml is omitted in this assertion.
1129+
# This is okay, because the configuration file is already covered by the unit tests.
11201130
---
11211131
apiVersion: v1
11221132
kind: Service

0 commit comments

Comments
 (0)