RITlug / teleirc

Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
https://docs.teleirc.com/
GNU General Public License v3.0
140 stars 45 forks source link

Implement unit testing for irc.go #314

Closed Tjzabel closed 4 years ago

Tjzabel commented 4 years ago

Summary

Before we write unit tests for the main irc.go file, we need to determine the method of testing that works best for the scope of this file.

Since irc.go makes heavy use of external libraries and functionality, we need to have a way to properly mock all of these external calls so we can efficiently test the desired functionality.

jwflory commented 4 years ago

Discussed in 2020-05-23 meeting.


Release-blocking: No

319 was a higher priority and this didn't make it into the v2.0.0 release window. We will rescope this issue and target it for a new release in next week's meeting.

jwflory commented 4 years ago

What is needed for this issue that is not already covered in the existing tests?

https://github.com/RITlug/teleirc/blob/master/internal/handlers/irc/irc_test.go

jwflory commented 4 years ago

Discussed in 2020-11-01 IRC/Telegram meeting.


The testing sprint begins! @Zedjones is taking this one on since he has the most prior experience working with the IRC side of things.

jwflory commented 4 years ago

Discussed in 2020-11-15 meeting.


We talked this one through, and without setting up an actual IRC server to test with, there is not much more we can do on this one. In the meeting, we agreed to close this as wontfix because the cost of creating tests is greater than the benefit they would bring us. IRC functionality is sufficiently tested.