mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **PR Type**
Tests
___
### **Description**
Add comprehensive unit tests for cipher keys
Cover Akeyless provider form behaviors
Test encryption mechanism selection logic
Validate OpenObserve local secret workflows
___
### Diagram Walkthrough
```mermaid
flowchart LR
AddCipherKeySpec["AddCipherKey.spec.ts"] -- "mount, navigation, submit" --> AddCipherKeyVue["AddCipherKey.vue"]
AddCipherKeySpec -- "stubs, mocks" --> ServicesMocks["cipher_keys service"]
AkeylessSpec["AddAkeylessType.spec.ts"] -- "fields, validation, update mode" --> AddAkeylessTypeVue["AddAkeylessType.vue"]
OpenobserveSpec["AddOpenobserveType.spec.ts"] -- "local secret, update mode" --> AddOpenobserveTypeVue["AddOpenobserveType.vue"]
MechanismSpec["AddEncryptionMechanism.spec.ts"] -- "provider, algorithm" --> AddEncryptionMechanismVue["AddEncryptionMechanism.vue"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>AddAkeylessType.spec.ts</strong><dd><code>Tests for
Akeyless provider form behavior</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddAkeylessType.spec.ts
<ul><li>Add unit tests for Akeyless form fields<br> <li> Validate URL,
access ID, and HTML sanitization<br> <li> Test auth types (access_key,
ldap) conditional UI<br> <li> Test secret types (static_secret, dfc)
conditional UI and update mode</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-394b98b49b31d82146024ad8d9ad900a69afd49cb33d913514bb61058c7a2649">+324/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddCipherKey.spec.ts</strong><dd><code>Comprehensive
tests for AddCipherKey flow</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddCipherKey.spec.ts
<ul><li>Add end-to-end component tests with mocks/stubs<br> <li> Cover
create/update workflows and validations<br> <li> Test dynamic child
rendering and step navigation<br> <li> Verify helpers, state management,
and error handling</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-1ae71f00dfb6f9424d2443856ca3a419aaf2ee0c08900f7ef2ca44e41c1982e9">+616/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddEncryptionMechanism.spec.ts</strong><dd><code>Tests
for encryption mechanism selection</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddEncryptionMechanism.spec.ts
<ul><li>Add tests for provider type and algorithm options<br> <li>
Validate conditional rendering for simple provider<br> <li> Verify
bindings, validation, and accessibility props<br> <li> Include robust
stubs for Quasar selects</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-041335605ede2ba506406e550ba3c7663f4a8155f8c548f9e18b95ddfea4a51e">+402/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddOpenobserveType.spec.ts</strong><dd><code>Tests for
OpenObserve local secret form</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddOpenobserveType.spec.ts
<ul><li>Add tests for local secret input behavior<br> <li> Validate
required rules and data binding<br> <li> Cover update mode toggle and
buttons<br> <li> Verify field properties and structure</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-d4c9e84859e41b57861e8ec93d08f28111c13c5ca1143c0613f9e3f55051a2f2">+675/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___