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

Backend [Integration Test] tribes.go handlers GenerateBudgetInvoice #1584

Closed
2 tasks
elraphty opened this issue Mar 5, 2024 · 7 comments
Closed
2 tasks
Assignees
Labels
backend bounties go Pull requests that update Go code Posted testing
Milestone

Comments

@elraphty
Copy link
Contributor

elraphty commented Mar 5, 2024

Context

We are trying to increase the test coverage for our Golang backend.

File to to test

handlers/tribes.go

Design

Write tests for the tribe handlers, the test should:

  • Should test that a wrong Post body returns a 406 error
  • Mock a call to relay /invoices that receives a body of sh {"amount": 0, "memo": "Budget Invoice"}
  • Should test that the amount passed by the user is equal to the amount sent for invoice generation
  • If the mock relay invoice call is successful, the payments get added to the payment history, the invoice gets added to the invoice list, and a success message is returned with a 200 Status

Tribes Handlers To Test

GenerateBudgetInvoice

Add tests to tribes_test.go

Acceptance Criteria

  • I have rebased and tested locally before submitting my PR
  • I can submit a PR within 2 days of taking the bounty

References

Here is an example backend test

@MirzaHanan
Copy link
Contributor

Hi @elraphty, @ecurrencyhodler
Please assign me?

@AbdulWahab3181
Copy link
Contributor

@ecurrencyhodler Could you please assign me?

@MuhammadUmer44
Copy link
Contributor

Hi @ecurrencyhodler,
Could you assign me?

@elraphty elraphty added backend bounties go Pull requests that update Go code testing labels Mar 5, 2024
@elraphty elraphty added this to the UCI Tests milestone Mar 5, 2024
@AbdulWahab3181
Copy link
Contributor

@ecurrencyhodler Could you please assign me?

@MirzaHanan
Copy link
Contributor

Hi @ecurrencyhodler,
assign me?

@ecurrencyhodler
Copy link
Contributor

This is yours Mirza. Next one is yours @MuhammadUmer44 but make sure to complete the other 2 bounties you're working on in the next couple of days.

@ecurrencyhodler
Copy link
Contributor

Paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bounties go Pull requests that update Go code Posted testing
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants