tests

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupMockAccesscontrol

func SetupMockAccesscontrol(t *testing.T, userpermissionsfunc func(c context.Context, siu *models.SignedInUser) ([]*accesscontrol.Permission, error), disableAccessControl bool) *accesscontrolmock.Mock

func SetupUserServiceAccount

func SetupUserServiceAccount(t *testing.T, sqlStore *sqlstore.SQLStore, testUser TestUser) *models.User

Types

type Calls

type Calls struct {
	DeleteServiceAccount []interface{}
}

type ServiceAccountMock

type ServiceAccountMock struct{}

create mock for serviceaccountservice

func (*ServiceAccountMock) DeleteServiceAccount

func (s *ServiceAccountMock) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error

type ServiceAccountsStoreMock

type ServiceAccountsStoreMock struct {
	Calls Calls
}

func (*ServiceAccountsStoreMock) DeleteServiceAccount

func (s *ServiceAccountsStoreMock) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error

type TestUser

type TestUser struct {
	Login            string
	IsServiceAccount bool
}

Jump to

Keyboard shortcuts

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