Skip to content
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

TODO #33

Open
schmorrison opened this issue Aug 21, 2021 · 7 comments
Open

TODO #33

schmorrison opened this issue Aug 21, 2021 · 7 comments

Comments

@schmorrison
Copy link
Owner

  • Writing units tests
    • setup http client and server for mocking endpoints and responses
    • provide extremely simple way for contributors to provide an endpoint unit test
  • Add a map[string]interface{} to response structs and decode JSON into it as well as the root struct
    • this could be a field, accessed as normal, or an embedded struct that provides methods for accessing the decoded values
  • Write a different TokenLoaderSaver interface example because AppEngine subpackages have been deprecated AFAIK
  • Research Zoho docs to find all the possible HTTP request body encoding formats.
  • Figure out how to allow users to add custom fields in responses/requests. This may require embedding structs in a different way.

Please create a new issue if you decided to work on these.

@ashishsnigam
Copy link
Contributor

@schmorrison I will pick first thing first, Writing unit tests. Will start with Zoho expense api to add unit tests for it. PR should contain support added + new unit tests. Hope to complete it soon.

@schmorrison
Copy link
Owner Author

schmorrison commented Aug 24, 2021 via email

@schmorrison
Copy link
Owner Author

@ashishsnigam Any progress on this? If I have some time this weekend I could review what you have, or I could take a run at it if you haven't got a start yet.

@ashishsnigam
Copy link
Contributor

@schmorrison I am still not able to start working on it due to time crunch but I hope to start working on it October onwards only. Sorry for it.

@schmorrison
Copy link
Owner Author

@ashishsnigam I've just pushed some testing stuff, I never tried on a data endpoint but did test on the OAuth endpoints. You should be able to write a test for a specific endpoint pretty simply , it won't actually send the request to Zoho but we can test the marshal/unmarshal body, authentication, etc.

If you want an example let me know, but it should be pretty straightforward. You can check oauth_test.go for how I tested to OAuth endpoints with the current test struct.

@ashishsnigam
Copy link
Contributor

@schmorrison Thanks. Will try to check it out soon but too busy with day job.

@schmorrison
Copy link
Owner Author

  • Create a http handler that simplifies catching OAuth redirect when not a localhost address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants