-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add developer support #27
Conversation
I observe 404 errors, it seems like developers are only available on enterprise version. Is there any way to validate those entities ? Fixed by commit 04256f9 |
Haven't reviewed this completely yet, but it'll be affected by the same issue with enabling the Portal before testing it that necessitated #30 You may want to wait for another reviewer to complete review before making changes to your PR in case #30 changes at all, but assuming it goes in as-is, tests would need to add the new Since adding developers further requires authentication (and by extension, basic session conifuration), your workspace Config would need some additional items. I believe this should work:
|
Tests will need to provide
|
I added what was recommended concerning the password and meta fields. What should we do next, wait for the merging of the pull request #30 ? |
Yeah, once #30 is reviewed and merged, rework tests against it final merged version to enable the Portal and set other Portal settings needed for this. Edit: go figure, wrote this before seeing that #30 had been approved. It's now in and tests support enabling the Portal and cleaning up workspaces after, so please add similar gates for the tests here. Assuming I got the config interface correct earlier, the intialization config should be like:
Something is still going wrong with part of the tests when I set up the Portal manually first. The updated developer isn't being set properly from the
That then panics when it attempts to assert the Email equality. Not immediately sure what's causing that: the update does in fact go through (I can see the modified email when looking at the admin API) and there's nothing that jumps out as unusual in the developer |
Add pagination options to the List functions and add a ListAll function for the developer role and RBAC role services.
The /developers/roles endpoint does not actually support a PUT variant, only POST. POST does accept role objects with IDs.
- Add a new argument to runWhenEnterprise() to check if the Portal is enabled. - Enable the Portal workspace configuration in Portal tests, and disable it after.
Add some basic helpers for working with a workspace in tests: - Initialize a test workspace - Update a test workspace's configuration - Restore a test workspace to its original configuration When a test requires modifying workspace configuration, use NewTestWorkspace() after creating the test client to store the current workspace configuration, use Update() as needed within the test, and then call Reset() at the end of the test to restore the original configuration.
Is the database the same between two tests execution? Could it be related to the consumer table? |
Sort of--with manual runs you have to rely on the tests cleaning up after themselves, and while most do (they delete the objects they create and confirm they're gone at the end), a test failing in the middle means that cleanup won't happen. If that occurs, or if the cleanup is imperfect, I'll run this between tests to clear it:
Since these didn't have the Portal setup scaffolding yet, I'd just been deleting the developer to leave the Portal configuration I'd added manually in place. Leftover data from previous runs shouldn't be the cause of the empty You're not seeing the same when you test locally then? Can you confirm what you set in the Portal config and what version you're testing against? |
* fix(rbac) include Negative when marshaling RBAC Include the Negative field when marshaling RBAC types to JSON. The RBAC entity and endpoint permissions types have custom JSON marshalers to account for differences between Kong's GET output and the expected inputs to PUT/PATCH/POST: https://github.com/Kong/go-kong/pull/5/files#r495600736 Previously, these marshalers omitted the Negative fields, so requests outbound from go-kong would never set Negative, and it would always be the default (false). Fix FTI-2405
…ot/go-kong into feature/developer
f863f02 is interesting; thanks for figuring out that oddity. https://github.com/Kong/go-kong/runs/2249818490 is a CI run for branch on this repo that includes this suggestion along with the rest of the PR. Pulling fork branches into local repos is a bit of a clunky solution to make Enterprise CI run/work around GitHub limitations on secret use in PRs from forks, but it works. |
Co-authored-by: Travis Raines <raines.travis@gmail.com>
@ChristianJacquot apologies for this being a bit late, but please fill out the following form to claim your contributor swag as thanks for this contribution: |
This pull request is for handling developers in Go-kong and finally to allow deck to do it.