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.

base_internal_test.go 551B

12345678910111213141516171819202122232425262728293031
  1. package cli
  2. import (
  3. "path/filepath"
  4. "testing"
  5. "github.com/stretchr/testify/suite"
  6. )
  7. type BaseTestSuite struct {
  8. suite.Suite
  9. b base
  10. }
  11. func (suite *BaseTestSuite) SetupTest() {
  12. suite.b = base{}
  13. }
  14. func (suite *BaseTestSuite) TestReadConfigNok() {
  15. suite.Error(suite.b.ReadConfig(filepath.Join("testdata", "unknown"), "dev"))
  16. }
  17. func (suite *BaseTestSuite) TestReadConfig() {
  18. suite.NoError(suite.b.ReadConfig(filepath.Join("testdata", "minimal.toml"), "dev"))
  19. }
  20. func TestBase(t *testing.T) {
  21. t.Parallel()
  22. suite.Run(t, &BaseTestSuite{})
  23. }