|
| 1 | +suite: dissection storage configuration |
| 2 | +templates: |
| 3 | + - templates/04-hub-deployment.yaml |
| 4 | +tests: |
| 5 | + - it: should fallback to snapshot storageSize when dissection storageSize is empty |
| 6 | + asserts: |
| 7 | + - contains: |
| 8 | + path: spec.template.spec.containers[0].command |
| 9 | + content: -dissector-storage-size |
| 10 | + - contains: |
| 11 | + path: spec.template.spec.containers[0].command |
| 12 | + content: "20Gi" |
| 13 | + |
| 14 | + - it: should fallback to snapshot storageClass when dissection storageClass is empty |
| 15 | + set: |
| 16 | + tap.snapshots.local.storageClass: gp2 |
| 17 | + asserts: |
| 18 | + - contains: |
| 19 | + path: spec.template.spec.containers[0].command |
| 20 | + content: -dissector-storage-class |
| 21 | + - contains: |
| 22 | + path: spec.template.spec.containers[0].command |
| 23 | + content: gp2 |
| 24 | + |
| 25 | + - it: should not render dissector-storage-class when both dissection and snapshot storageClass are empty |
| 26 | + asserts: |
| 27 | + - notContains: |
| 28 | + path: spec.template.spec.containers[0].command |
| 29 | + content: -dissector-storage-class |
| 30 | + |
| 31 | + - it: should prefer dissection storageSize over snapshot storageSize |
| 32 | + set: |
| 33 | + tap.delayedDissection.storageSize: 100Gi |
| 34 | + tap.snapshots.local.storageSize: 50Gi |
| 35 | + asserts: |
| 36 | + - contains: |
| 37 | + path: spec.template.spec.containers[0].command |
| 38 | + content: -dissector-storage-size |
| 39 | + - contains: |
| 40 | + path: spec.template.spec.containers[0].command |
| 41 | + content: "100Gi" |
| 42 | + |
| 43 | + - it: should prefer dissection storageClass over snapshot storageClass |
| 44 | + set: |
| 45 | + tap.delayedDissection.storageClass: io2 |
| 46 | + tap.snapshots.local.storageClass: gp2 |
| 47 | + asserts: |
| 48 | + - contains: |
| 49 | + path: spec.template.spec.containers[0].command |
| 50 | + content: -dissector-storage-class |
| 51 | + - contains: |
| 52 | + path: spec.template.spec.containers[0].command |
| 53 | + content: io2 |
| 54 | + |
| 55 | + - it: should fallback to snapshot config for both storageSize and storageClass |
| 56 | + set: |
| 57 | + tap.snapshots.local.storageSize: 30Gi |
| 58 | + tap.snapshots.local.storageClass: gp3 |
| 59 | + asserts: |
| 60 | + - contains: |
| 61 | + path: spec.template.spec.containers[0].command |
| 62 | + content: -dissector-storage-size |
| 63 | + - contains: |
| 64 | + path: spec.template.spec.containers[0].command |
| 65 | + content: "30Gi" |
| 66 | + - contains: |
| 67 | + path: spec.template.spec.containers[0].command |
| 68 | + content: -dissector-storage-class |
| 69 | + - contains: |
| 70 | + path: spec.template.spec.containers[0].command |
| 71 | + content: gp3 |
| 72 | + |
| 73 | + - it: should not render dissector-storage-size when both dissection and snapshot storageSize are empty |
| 74 | + set: |
| 75 | + tap.delayedDissection.storageSize: "" |
| 76 | + tap.snapshots.local.storageSize: "" |
| 77 | + asserts: |
| 78 | + - notContains: |
| 79 | + path: spec.template.spec.containers[0].command |
| 80 | + content: -dissector-storage-size |
| 81 | + |
| 82 | + - it: should render all dissector args together with custom values |
| 83 | + set: |
| 84 | + tap.delayedDissection.cpu: "4" |
| 85 | + tap.delayedDissection.memory: 8Gi |
| 86 | + tap.delayedDissection.storageSize: 200Gi |
| 87 | + tap.delayedDissection.storageClass: local-path |
| 88 | + asserts: |
| 89 | + - contains: |
| 90 | + path: spec.template.spec.containers[0].command |
| 91 | + content: -dissector-cpu |
| 92 | + - contains: |
| 93 | + path: spec.template.spec.containers[0].command |
| 94 | + content: "4" |
| 95 | + - contains: |
| 96 | + path: spec.template.spec.containers[0].command |
| 97 | + content: -dissector-memory |
| 98 | + - contains: |
| 99 | + path: spec.template.spec.containers[0].command |
| 100 | + content: 8Gi |
| 101 | + - contains: |
| 102 | + path: spec.template.spec.containers[0].command |
| 103 | + content: -dissector-storage-size |
| 104 | + - contains: |
| 105 | + path: spec.template.spec.containers[0].command |
| 106 | + content: "200Gi" |
| 107 | + - contains: |
| 108 | + path: spec.template.spec.containers[0].command |
| 109 | + content: -dissector-storage-class |
| 110 | + - contains: |
| 111 | + path: spec.template.spec.containers[0].command |
| 112 | + content: local-path |
| 113 | + |
| 114 | + - it: should still render existing dissector-cpu and dissector-memory args |
| 115 | + asserts: |
| 116 | + - contains: |
| 117 | + path: spec.template.spec.containers[0].command |
| 118 | + content: -dissector-cpu |
| 119 | + - contains: |
| 120 | + path: spec.template.spec.containers[0].command |
| 121 | + content: "1" |
| 122 | + - contains: |
| 123 | + path: spec.template.spec.containers[0].command |
| 124 | + content: -dissector-memory |
| 125 | + - contains: |
| 126 | + path: spec.template.spec.containers[0].command |
| 127 | + content: 4Gi |
0 commit comments