test

package
v0.54.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigningKey = []byte(`-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEApYHspLfY2IY8ZFIQEuKWMWSgGMUApOz6R16ZEifBEh+B/E3v
Gl9Pm+G/QhwTUVM/OvLCajX2Gf0zvpDFmOfLhIFYGnI8o94E8zo/5xoz/sJxy9iN
1soS9vpC9MxQU4W4QjoX78OHKBkYQkqsQs6sb+ZRxX90Og/PQUl/F0eeldX+8INd
HzCF1Ju8yh2pDjGKTEO3seCEoHBM6OG8optE7mcjTvDs2VpSzOeaZ0uxTOV9YxOV
73aTrcm79kVw12lyXbeNsx3fKKPiELY6TWR6loi8tIBb77tzJRCdScudVhF9MV9q
mbKqHZU/XE2FlSmHxs1Ijn8z+plXG9Gg7bYFpQIDAQABAoIBABBU8MgUSDadkGoJ
2wIyD8YR+uZW0kh0BgJy6EHtYFTsfQQroJOGojFsplXctV9KCqxDdkHKz10jKi78
1DLRdLi/lrUNXsSAzRY/Qj0Izeauw1HtLZnrWNG8Qk0ruCV1xYfreZ80OSsQxt8L
xVHWWRe1r44AlLSCCN6VZRAkBhcc3SI3AuW5l+BwicMljkPeHzbq2SGAIxxHw4Hn
3+aV+U1tth2taeDFhYnUwx4uGscsMFJebohllILqyz5oXJkm4Xo5ulViPBNudYvC
aH2IdwLhyngYjEHexVzuj9SEcKXYgeNWRL9hO5by5a85q0h4NVsYHaqCttEuW7Rp
l2zs7sUCgYEA1kkQMY0QR5WTT4Ogdmw2dN2TLuzmzt8fFYmuDw/1Hp62twrTnlq9
QBFbtcD00UkrLkSnSrLsHFgtGPFlcT0y8YD2n+zlgncF+zthXTqdAYDEZc2lNtIB
t3GJnKU2q8U9CGEwxMS0izQPbriwbrhIKVJPJ/lR0fUNM6N3sXWDsRcCgYEAxboC
gVLZSC5PtmcEDLFnYvqfReVEQ9nTYdIajIAq4nIWpqOxVbEb5KQZkm7KvmU6d7Yq
EjNQHuFqg9txyrw8z+kYoNrmo6T3wwoPspmwSzsu49S5pD+cEwnyF0hgU+yzsKIZ
MGU+Skpy1BQF0Anox0QFcLf/XxizLKm+DcWIXKMCgYBuqZrQTC5NGaTS2oIixi21
Wrxo7nUf/sA5yjl2k+Idpw9rJg81Z1z22kAHdBe6gVPoeBIBFLe0x6C6kee2fElz
yQsUei3om3keToMwt1Vf8lT60iHxVrEGQH81w2iheqHTUwXxiDhI72DM6FpNQ6QY
muZAGZS0nh3sPg5ROgQBjwKBgQDBHdjeiJWRizHtvBXXc9m/cXroYHFZN8HeM8Ac
Y/3+p2F6JjzIri/JE4GqZK1+Yg5F59SVbCqfzpgi6szsLwfSJR8Z1FMZl8EpbIVC
chsej1JP0W/zfPEqIzehB96VeYVTSi8B9pBtLOOUQW4f79276bLKkdtI/S3avHrU
po51swKBgC3+fkww8C8F6YIitAruTy4AkFp6Gr736hbnCPeLWtfW2HxXN5ca86h4
RvySYHtJvP64+7ncMqNjMnX8MbJZdoW3FE4gKomVof26/oUk/zHKNn5BECPIqEQv
XeJEyyEjosSa3qWACDYorGMnzRXdeJa5H7J0W+G3x4tH2LMW8VHS
-----END RSA PRIVATE KEY-----`)

SigningKey is a test key, do not use it in real life

View Source
var TestKey []byte

TestKey is a test key encoded in base64, do not use it in real life

Functions

func GetTestName

func GetTestName(t *testing.T) string

GetTestName returns the name the test

func LoadTestingConf

func LoadTestingConf(t require.TestingT, serviceType string) map[string]string

LoadTestingConf loads test configuration tests.cfg.json

Types

type Bootstrapf

type Bootstrapf func(context.Context, sdk.DefaultValues, func() *gorp.DbMap) error

type FakeHTTPClient

type FakeHTTPClient struct {
	T        *testing.T
	Response *http.Response
	Error    error
}

FakeHTTPClient implements sdk.HTTPClient and returns always the same response

func (*FakeHTTPClient) Do

func (f *FakeHTTPClient) Do(r *http.Request) (*http.Response, error)

Do implements sdk.HTTPClient and returns always the same response

type FakeTransaction

type FakeTransaction struct {
	*gorp.DbMap
}

func SetupPGToCancel

func SetupPGToCancel(t require.TestingT, m *gorpmapper.Mapper, serviceType string, bootstrapFunc ...Bootstrapf) (*FakeTransaction, *database.DBConnectionFactory, cache.Store, func())

SetupPGToCancel setup PG DB for test

func SetupPGWithMapper

func SetupPGWithMapper(t *testing.T, m *gorpmapper.Mapper, serviceType string, bootstrapFunc ...Bootstrapf) (*FakeTransaction, cache.Store)

func (*FakeTransaction) Commit

func (f *FakeTransaction) Commit() error

func (*FakeTransaction) Rollback

func (f *FakeTransaction) Rollback() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL