Create a mock local zendesk server for local ticket create flow testing - #8448
Open
jdolle wants to merge 4 commits into
Open
Create a mock local zendesk server for local ticket create flow testing#8448jdolle wants to merge 4 commits into
jdolle wants to merge 4 commits into
Conversation
Collaborator
Contributor
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
n1ru4l
reviewed
Sep 9, 2026
Comment on lines
+104
to
+105
| ZENDESK_SUBDOMAIN: zod.string(), | ||
| ZENDESK_BASE_URL: emptyString(zod.string().optional()), |
Contributor
There was a problem hiding this comment.
Why not simply remove the ZENDESK_SUBDOMAIN option in favor of ZENDESK_BASE_URL? I don't see a need to keep backwards compat here as this is not really an option that self-hosters use.
Also the ${this.config.baseUrl}/${this.config.subdomain} concat is a bit weird to me.
Collaborator
Author
There was a problem hiding this comment.
Adjusted. We'll need to add zendesk:baseUrl=https://theguild.zendesk.com to our pulumi config before deploying.
n1ru4l
approved these changes
Sep 9, 2026
n1ru4l
left a comment
Contributor
There was a problem hiding this comment.
Added a comment. Not a blocker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Currently, we have no good way of running or verifying the zendesk ticket creation flow locally. Sandbox environments in zendesk require significantly more $$ and we only very rarely modify this flow.
We needed a way to run our development server and easily view and modify this page like any other page in our app.
Description
Adds unit tests for the support-manager to ensure requirements are met, and adds a mock instance for local development testing.
During local testing, the mock data captured (via
curl -s -X PUT 'http://localhost:3043/mockserver/retrieve?type=REQUESTS' | jq) was:[ { "body": { "contentType": "application/json", "type": "JSON", "json": { "organization": { "name": "sadasfasdfasd (47587f20-3011-4f59-a585-38d67f8a94fd)", "external_id": "47587f20-3011-4f59-a585-38d67f8a94fd" } }, "rawBytes": "eyJvcmdhbml6YXRpb24iOnsibmFtZSI6InNhZGFzZmFzZGZhc2QgKDQ3NTg3ZjIwLTMwMTEtNGY1OS1hNTg1LTM4ZDY3ZjhhOTRmZCkiLCJleHRlcm5hbF9pZCI6IjQ3NTg3ZjIwLTMwMTEtNGY1OS1hNTg1LTM4ZDY3ZjhhOTRmZCJ9fQ==" }, "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "133" ], "idempotency-key": [ "47587f20-3011-4f59-a585-38d67f8a94fd" ], "Connection": [ "keep-alive" ], "content-type": [ "application/json" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "POST", "path": "/local/api/v2/organizations", "secure": false }, { "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "0" ], "Connection": [ "keep-alive" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "GET", "path": "/local/api/v2/organizations/1000/tickets", "queryStringParameters": { "sort": [ "-updated_at" ], "page[size]": [ "100" ] }, "secure": false }, { "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "0" ], "Connection": [ "keep-alive" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "GET", "path": "/local/api/v2/users/search", "queryStringParameters": { "query": [ "[email protected]" ] }, "secure": false }, { "body": { "contentType": "application/json", "type": "JSON", "json": { "user": { "name": "asdf asdf", "email": "[email protected]", "external_id": "010a5acb-1b38-46c9-a98e-eb52f4a17970", "identities": [ { "type": "foreign", "value": "[email protected]" } ], "role": "end-user", "verified": true }, "skip_verify_email": true }, "rawBytes": "eyJ1c2VyIjp7Im5hbWUiOiJhc2RmIGFzZGYiLCJlbWFpbCI6ImRvb0Bhc2RmLmNvbSIsImV4dGVybmFsX2lkIjoiMDEwYTVhY2ItMWIzOC00NmM5LWE5OGUtZWI1MmY0YTE3OTcwIiwiaWRlbnRpdGllcyI6W3sidHlwZSI6ImZvcmVpZ24iLCJ2YWx1ZSI6ImRvb0Bhc2RmLmNvbSJ9XSwicm9sZSI6ImVuZC11c2VyIiwidmVyaWZpZWQiOnRydWV9LCJza2lwX3ZlcmlmeV9lbWFpbCI6dHJ1ZX0=" }, "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "221" ], "idempotency-key": [ "010a5acb-1b38-46c9-a98e-eb52f4a17970" ], "Connection": [ "keep-alive" ], "content-type": [ "application/json" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "POST", "path": "/local/api/v2/users", "secure": false }, { "body": { "contentType": "application/json", "type": "JSON", "json": { "organization_membership": { "user_id": 2000, "organization_id": 1000 } }, "rawBytes": "eyJvcmdhbml6YXRpb25fbWVtYmVyc2hpcCI6eyJ1c2VyX2lkIjoyMDAwLCJvcmdhbml6YXRpb25faWQiOjEwMDB9fQ==" }, "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "67" ], "idempotency-key": [ "010a5acb-1b38-46c9-a98e-eb52f4a17970|v2" ], "Connection": [ "keep-alive" ], "content-type": [ "application/json" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "POST", "path": "/local/api/v2/organization_memberships", "secure": false }, { "body": { "contentType": "application/json", "type": "JSON", "json": { "ticket": { "organization_id": 1000, "submitter_id": 2000, "requester_id": 2000, "comment": { "body": "asdfasdasfa" }, "priority": "normal", "subject": "Test!", "custom_fields": [ { "id": 18185379454865, "value": "hobby_customer" } ] } }, "rawBytes": "eyJ0aWNrZXQiOnsib3JnYW5pemF0aW9uX2lkIjoxMDAwLCJzdWJtaXR0ZXJfaWQiOjIwMDAsInJlcXVlc3Rlcl9pZCI6MjAwMCwiY29tbWVudCI6eyJib2R5IjoiYXNkZmFzZGFzZmEifSwicHJpb3JpdHkiOiJub3JtYWwiLCJzdWJqZWN0IjoiVGVzdCEiLCJjdXN0b21fZmllbGRzIjpbeyJpZCI6MTgxODUzNzk0NTQ4NjUsInZhbHVlIjoiaG9iYnlfY3VzdG9tZXIifV19fQ==" }, "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "211" ], "idempotency-key": [ "e7a4a48464b182f577374815de31ddb07dc0e6b96bc55fe63f9e7231a2838de0" ], "Connection": [ "keep-alive" ], "content-type": [ "application/json" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "POST", "path": "/local/api/v2/tickets", "secure": false }, { "headers": { "authorization": [ "Basic bW9jazptb2Nr" ], "content-length": [ "0" ], "Connection": [ "keep-alive" ], "Host": [ "localhost:3043" ], "accept-encoding": [ "gzip, deflate, br" ], "user-agent": [ "" ], "accept": [ "application/json" ] }, "keepAlive": true, "method": "GET", "path": "/local/api/v2/organizations/1000/tickets", "queryStringParameters": { "sort": [ "-updated_at" ], "page[size]": [ "100" ] }, "secure": false } ]Checklist