shreemaan-abhishek opened a new pull request, #13645: URL: https://github.com/apache/apisix/pull/13645
### Description Follow-up test coverage for #12624. The existing `t/admin/plugin-metadata3.t` covers the `plugin.enable_data_encryption` nil-init state and the 404-GET crash, but it uses `example-plugin`, which has no `encrypt_fields`. So it never asserts the **primary** behavior the fix restored: that the first successful GET of an encrypted metadata field returns **plaintext**, not ciphertext. This PR adds a case using `azure-functions.master_apikey` (a real `encrypt_fields` metadata): 1. PUT the metadata (stored encrypted in etcd). 2. Assert etcd holds ciphertext. 3. Reset `plugin.enable_data_encryption = nil` to simulate a fresh worker where the flag has not been lazily initialized yet. 4. Assert the GET still returns the decrypted value - i.e. `plugin.enable_gde()` forces initialization on the GET path. Without #12624 this case returns ciphertext; with it, plaintext. Also scopes `local_conf`/`err` as locals in TEST 1 (they were previously assigned as globals). ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [x] I have added tests corresponding to this change - [x] I have updated the documentation to reflect this change (N/A - test-only) - [x] I have verified that this change is backward compatible (test-only, no runtime change) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
