Skip to content

Commit 6f1cb8d

Browse files
committed
test: Add CRD roundtrip test data
1 parent a92f78c commit 6f1cb8d

1 file changed

Lines changed: 82 additions & 1 deletion

File tree

  • rust/operator-binary/src/crd

rust/operator-binary/src/crd/mod.rs

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,88 @@ spec:
15491549

15501550
impl RoundtripTestData for v1alpha1::HbaseClusterSpec {
15511551
fn roundtrip_test_data() -> Vec<Self> {
1552-
vec![]
1552+
stackable_operator::utils::yaml_from_str_singleton_map(indoc::indoc! {r#"
1553+
- image:
1554+
productVersion: 2.6.4
1555+
pullPolicy: IfNotPresent
1556+
clusterOperation:
1557+
reconciliationPaused: false
1558+
stopped: true
1559+
clusterConfig:
1560+
hdfsConfigMapName: test-hdfs
1561+
zookeeperConfigMapName: test-znode
1562+
vectorAggregatorConfigMapName: vector-aggregator-discovery
1563+
authentication:
1564+
tlsSecretClass: my-tls
1565+
kerberos:
1566+
secretClass: my-kerberos
1567+
authorization:
1568+
opa:
1569+
configMapName: opa
1570+
package: hbase
1571+
masters:
1572+
envOverrides:
1573+
COMMON_VAR: role-value
1574+
ROLE_VAR: role-value
1575+
config:
1576+
gracefulShutdownTimeout: 1m
1577+
resources:
1578+
cpu:
1579+
min: 250m
1580+
max: "1"
1581+
memory:
1582+
limit: 1Gi
1583+
logging:
1584+
enableVectorAgent: true
1585+
listenerClass: cluster-internal
1586+
configOverrides:
1587+
hbase-site.xml:
1588+
hbase.master.info.port: "16010"
1589+
roleGroups:
1590+
default:
1591+
replicas: 2
1592+
configOverrides:
1593+
hbase-site.xml:
1594+
hbase.master.info.port: "16011"
1595+
envOverrides:
1596+
COMMON_VAR: group-value
1597+
GROUP_VAR: group-value
1598+
regionServers:
1599+
config:
1600+
gracefulShutdownTimeout: 2m
1601+
resources:
1602+
cpu:
1603+
min: 250m
1604+
max: "2"
1605+
memory:
1606+
limit: 2Gi
1607+
logging:
1608+
enableVectorAgent: true
1609+
regionMover:
1610+
runBeforeShutdown: true
1611+
ack: true
1612+
maxThreads: 1
1613+
listenerClass: cluster-internal
1614+
roleGroups:
1615+
default:
1616+
replicas: 3
1617+
restServers:
1618+
config:
1619+
gracefulShutdownTimeout: 1m
1620+
resources:
1621+
cpu:
1622+
min: 100m
1623+
max: "1"
1624+
memory:
1625+
limit: 1Gi
1626+
logging:
1627+
enableVectorAgent: true
1628+
listenerClass: cluster-internal
1629+
roleGroups:
1630+
default:
1631+
replicas: 1
1632+
"#})
1633+
.expect("Failed to parse HbaseClusterSpec YAML")
15531634
}
15541635
}
15551636
}

0 commit comments

Comments
 (0)