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] channel.go handlers CreateChannel, & DeleteChannel #1535

Closed
2 tasks
elraphty opened this issue Feb 20, 2024 · 3 comments · Fixed by #1560
Closed
2 tasks

Backend [Integration Test] channel.go handlers CreateChannel, & DeleteChannel #1535

elraphty opened this issue Feb 20, 2024 · 3 comments · Fixed by #1560
Assignees
Labels
backend bounties go Pull requests that update Go code Posted testing
Milestone

Comments

@elraphty
Copy link
Contributor

Context

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

File to to test

handlers/channel.go

Design

Write tests for the channel handlers, the test should:

  • Should test that a user that is not authenticated cannot create a channel, a 401 error should be returned
  • Should test that an authenticated user can create a channel
  • Should test that a user cannot create a channel with a name that already exists, it should return 406
  • Should test that the owner of a channel can delete the channel
  • Should test that non-channel owners cannot delete the channel, it should return a 401 error.

Channel Handlers To Test

CreateChannel
DeleteChannel

Add tests to channel_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

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

AbdulWahab3181 commented Feb 20, 2024

@ecurrencyhodler Could you please assign me this task?

@Vayras
Copy link
Contributor

Vayras commented Feb 20, 2024

@ecurrencyhodler I can take this issue

@ecurrencyhodler ecurrencyhodler moved this from 🆕 New to 🧨 To Do in Bounties Platform Feb 20, 2024
@ecurrencyhodler ecurrencyhodler assigned Vayras and unassigned Vayras Feb 20, 2024
@AbdulWahab3181
Copy link
Contributor

@ecurrencyhodler assign me?

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
4 participants