testhelpers

package
v0.0.0-...-1d44d98 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertErrorContainsErrorMsgs

func AssertErrorContainsErrorMsgs(t *testing.T, err error, errMsgArr []string)

func AssertReportResultsEqual

func AssertReportResultsEqual(t *testing.T, expected, actual []map[string]interface{}, comparisonColumnNames []string)

func NewPrestoTable

func NewPrestoTable(name, namespace, catalog, schema string, columns []presto.Column) *metering.PrestoTable

func NewReport

func NewReport(name, namespace, testQueryName string, reportStart, reportEnd *time.Time, status metering.ReportStatus, schedule *metering.ReportSchedule, runImmediately bool) *metering.Report

NewReport creates a mock report used for testing purposes.

func NewReportDataSource

func NewReportDataSource(name, namespace string) *metering.ReportDataSource

func NewReportQuery

func NewReportQuery(name, namespace string, columns []metering.ReportQueryColumn) *metering.ReportQuery

func PtrToBool

func PtrToBool(val bool) *bool

func SetupLogger

func SetupLogger(logLevelStr string) logrus.FieldLogger

Types

type ReportDataSourceStore

type ReportDataSourceStore struct {
	// contains filtered or unexported fields
}

func NewReportDataSourceStore

func NewReportDataSourceStore(datasources []*metering.ReportDataSource) (store *ReportDataSourceStore)

func (*ReportDataSourceStore) GetReportDataSource

func (store *ReportDataSourceStore) GetReportDataSource(namespace, name string) (*metering.ReportDataSource, error)

type ReportQueryStore

type ReportQueryStore struct {
	// contains filtered or unexported fields
}

func NewReportQueryStore

func NewReportQueryStore(queries []*metering.ReportQuery) (store *ReportQueryStore)

func (*ReportQueryStore) GetReportQuery

func (store *ReportQueryStore) GetReportQuery(namespace, name string) (*metering.ReportQuery, error)

type ReportStore

type ReportStore struct {
	// contains filtered or unexported fields
}

func NewReportStore

func NewReportStore(reports []*metering.Report) (store *ReportStore)

func (*ReportStore) GetReport

func (store *ReportStore) GetReport(namespace, name string) (*metering.Report, error)

Jump to

Keyboard shortcuts

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