mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-01 20:56:02 +09:00
test(linstor): select TLS documents by name, not by position
Both templates render several cert-manager objects, so a positional index silently retargets an assertion whenever a document is added or reordered above it. main now rejects new documentIndex selectors on multi-document templates for exactly that reason. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
2 files changed
+9
-3
No files matched your search
@@ -22,7 +22,9 @@ set:
|
||||
tests:
|
||||
- it: "issues the client certificate the operator is pointed at, from the blockstor CA"
|
||||
template: templates/blockstor-apiserver-tls.yaml
|
||||
documentIndex: 3
|
||||
documentSelector:
|
||||
path: metadata.name
|
||||
value: blockstor-apiserver-client
|
||||
asserts:
|
||||
- isKind:
|
||||
of: Certificate
|
||||
@@ -46,7 +48,9 @@ tests:
|
||||
|
||||
- it: "serves from the same CA the client certificate validates against"
|
||||
template: templates/blockstor-apiserver-tls.yaml
|
||||
documentIndex: 2
|
||||
documentSelector:
|
||||
path: metadata.name
|
||||
value: blockstor-apiserver-server
|
||||
asserts:
|
||||
- isKind:
|
||||
of: Certificate
|
||||
|
||||
@@ -68,9 +68,11 @@ tests:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- equal:
|
||||
path: spec.ca.secretName
|
||||
value: linstor-internal-ca
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: Issuer
|
||||
documentIndex: 1
|
||||
|
||||
# The plunger runs drbdadm against the node's DRBD resources on its own
|
||||
# schedule. Under blockstor those belong to blockstor-satellite alone, so the
|
||||
|
||||
Reference in new issue
Block a user