#testing init and main function

6 messages · Page 1 of 1 (latest)

winter geyser
#

Hello! I am writing all my tests to increase my coverage rate. Because I have no tests for my functions init and main, my coverage rate takes a hit. But I don't know how to test them or even if it's relevant to test them.

So if someone has ever tested these functions I would love to see those tests!

Organisation/cmd/main.go:20:                                            init                                    0.0%
Organisation/cmd/main.go:56:                                            main                                    0.0%
slate scroll
#

Coverage rates are stupid

copper fulcrum
#

avoid init func if you can.
and main should be tested by integration tests only, where you check how all modules play together when integrated together (including db, files, network)

mellow kindle
#

you can look at testscript to test e2e / main

winter geyser