testCase

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Get(ctx context.Context, cid, appID, id string) (models.TestCase, error)
	GetAll(ctx context.Context, cid, appID string, offset *int, limit *int, testCasePath, mockPath, tcsType string) ([]models.TestCase, error)
	GetApps(ctx context.Context, cid string) ([]string, error)
	Update(ctx context.Context, t []models.TestCase) error
	Delete(ctx context.Context, cid, id string) error
	Insert(ctx context.Context, t []models.TestCase, testCasePath, mockPath, cid string, Remove []string, Replace map[string]string) ([]string, error)
}

type TestCase

type TestCase struct {
	EnableDeDup bool
	// contains filtered or unexported fields
}

func New

func New(tdb models.TestCaseDB, log *zap.Logger, EnableDeDup bool, adb telemetry.Service, TestExport bool, mFS models.MockFS) *TestCase

func (*TestCase) Delete

func (r *TestCase) Delete(ctx context.Context, cid, id string) error

func (*TestCase) Get

func (r *TestCase) Get(ctx context.Context, cid, appID, id string) (models.TestCase, error)

Get returns testcase with specific company_id, app_id and id.

Note: During testcase-export, generated testcase will not be displayed in ui currently. Because path is not provided by the ui graphQL query.

func (*TestCase) GetAll

func (r *TestCase) GetAll(ctx context.Context, cid, appID string, offset *int, limit *int, testCasePath, mockPath, tcsType string) ([]models.TestCase, error)

GetAll fetches and returns testcases for the application.

Empty tcsType returns testcases of all types(ex: grpc and http).

func (*TestCase) GetApps

func (r *TestCase) GetApps(ctx context.Context, cid string) ([]string, error)

func (*TestCase) Insert added in v0.7.9

func (r *TestCase) Insert(ctx context.Context, t []models.TestCase, testCasePath, mockPath, cid string, fieldFilters []string, replace map[string]string) ([]string, error)

func (*TestCase) Update

func (r *TestCase) Update(ctx context.Context, t []models.TestCase) error

Jump to

Keyboard shortcuts

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