Closed umputun closed 1 year ago
I'm looking at proc/processor.go
but have a couple of questions:
There is a direct http call in rss, err := feed.Parse(url)
. Shouldn't we add an abstraction here as well?
I'm not sure how to correctly terminate for {}
loop in the processor's Do
func. I guess it should be some mechanism that can be used to implement termination in the main.go
integration test as well.
I'm not sure how to correctly terminate for {} loop in the processor's Do
We just need to support ctx as a first parameter and use it for cancelation
There is a direct http call in rss, err := feed.Parse(url). Shouldn't we add an abstraction here as well?
I'm not sure if it is really necessary, because we can make httptest.Server to respond to URL without any mocking of feed.Parse
OK, thx for your answers, I'll try to implement it this week
The overall coverage is not what impressive and there are a few important files/units we would like to cover first:
proc/processor.go
- not tested, but should be easy to do, all deps in interfaces alreadyproc/twitter.go
- the primary method Send is not covered. Needs some abstractions for testing as it hits anaconda directlymain.go
- we need some integration tests. Running a local httptest to serve feeds with local mp3 and check resulting feed will be very nice. main has no termination support which needed to such a testproc/telegram.go
- Send is not covered #87