Commit cb80d0a
feat(gong): upgrade SDK to 2.0.0, add pytest unit tests (#282)
* feat(gong): upgrade SDK to 2.0.0, add pytest unit tests
- Bump autohive-integrations-sdk to ~=2.0.0
- Update _make_request to return response.data (FetchResponse breaking change)
- Convert all error returns to ActionError(message=...)
- Move GongAPIClient instantiation inside try blocks for consistent error handling
- Normalize None field values to empty strings/defaults to satisfy output schema
- Bump config.json version to 2.0.0
- Add gong/tests/conftest.py and test_gong_unit.py with 32 unit tests covering
all 5 actions: happy path, request verification, error paths, and edge cases
* fix(gong): fix check_code warning and rewrite integration tests with proper SDK 2.0 patterns
- Use limit param in search_calls to resolve config-code sync warning
- Rewrite test_gong_integration.py with pytest.mark.integration, skipif guard
for missing GONG_ACCESS_TOKEN, FetchResponse mocks, and proper ResultType assertions
* fix(gong): fix auth, optional params, add proper unit and integration tests
- Fix test_gong_unit.py to work with SDK 2.0.0: remove FetchResponse import,
use plain dict mocks, fix error assertions to check result.result.data.get("error")
instead of ActionError.message since gong.py returns ActionResult for all cases
- Add GONG_ACCESS_KEY and GONG_ACCESS_KEY_SECRET to .env.example
* fix(gong): fix gong.py for SDK 2.0.0 — remove ActionError, fix fetch return, rewrite tests
* fix(gong): complete sdk v2 error handling
* test(gong): align live tests with OAuth auth
* fix(gong): correct integration test import to use gong.gong module
* test(gong): use fake call ID to exercise all actions when account has no calls
---------
Co-authored-by: Shubhank <72601061+Sagsgit@users.noreply.github.com>
Co-authored-by: Kai Koenig <kai@ventego-creative.co.nz>1 parent a42bc7d commit cb80d0a
8 files changed
Lines changed: 771 additions & 389 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
This file was deleted.
0 commit comments