After merging: https://github.com/Kong/kong/pull/13069 it was revealed in some tests that kong global might not have been initialized yet. This PR checks first if kong global is defined as it's done in a few other places in this module. It's just to make sure unit test work.
Checklist
[x] The Pull Request has tests
[x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
Summary
After merging: https://github.com/Kong/kong/pull/13069 it was revealed in some tests that
kong
global might not have been initialized yet. This PR checks first if kong global is defined as it's done in a few other places in this module. It's just to make sure unit test work.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
KAG-4515