Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930
  1. package ipblocklist_test
  2. import (
  3. "net"
  4. "testing"
  5. "github.com/9seconds/mtg/v2/ipblocklist"
  6. "github.com/stretchr/testify/suite"
  7. )
  8. type NoopTestSuite struct {
  9. suite.Suite
  10. }
  11. func (suite *NoopTestSuite) TestOp() {
  12. suite.False(ipblocklist.NewNoop().Contains(net.ParseIP("10.0.0.10")))
  13. suite.False(ipblocklist.NewNoop().Contains(net.ParseIP("10.0.0.10")))
  14. }
  15. func (suite *NoopTestSuite) TestRun() {
  16. blocklist := ipblocklist.NewNoop()
  17. blocklist.Run(0)
  18. blocklist.Shutdown()
  19. }
  20. func TestNoop(t *testing.T) {
  21. t.Parallel()
  22. suite.Run(t, &NoopTestSuite{})
  23. }