Documentation
¶
Index ¶
- func Canon(t *testing.T, source model.Source)
- func ConductSequenceWithAllSubsequencesTest(t *testing.T, sequenceCase dt_canon.CanonizedSequenceCase, ...)
- func Dump(t *testing.T, source dp_model.Source)
- func FromClickhouse(t *testing.T, src *model.ChSource, noTimeCols bool) string
- func ReferenceTestFn(transfer *model.Transfer, sinkAsSource model.Source, ...) func(*testing.T)
- func Table() []abstract.ChangeItem
- type Row
- type Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConductSequenceWithAllSubsequencesTest ¶
func ConductSequenceWithAllSubsequencesTest(t *testing.T, sequenceCase dt_canon.CanonizedSequenceCase, transfer *dp_model.Transfer, sink abstract.Sinker, sinkAsSource dp_model.Source)
ConductSequenceWithAllSubsequencesTest is the method which MUST be called by concrete sequence checking tests. It automatically conducts a test for all subsequences of the given sequence test and canonizes the output.
func FromClickhouse ¶
func ReferenceTestFn ¶
func ReferenceTestFn(transfer *model.Transfer, sinkAsSource model.Source, items []abstract.ChangeItem) func(*testing.T)
ReferenceTestFn returns a function which conducts a reference test with the given items and transfer for all transfer typesystem versions.
Reference test is a canonization test which records the final state of the target database (sink) after a precanonized set of "reference" items has been pushed into the target. The final state of the target database is obtained as if it was a snapshot source; that is why a sink-as-source object is required.
This method conducts a cleanup of the target database automatically before each test. Note that transfer's target endpoint should specify cleanup policy DROP or TRUNCATE for this feature to work.
func Table ¶
func Table() []abstract.ChangeItem
Types ¶
type Row ¶
type Row struct {
Key int64 `yson:"t_int64_key"`
SystemKey int64 `yson:"t_int64_system_key"`
Int8 int8 `yson:"t_int8"`
Int16 int16 `yson:"t_int16"`
Int32 int32 `yson:"t_int32"`
Int64 int64 `yson:"t_int64"`
UInt8 uint8 `yson:"t_uint8"`
UInt16 uint16 `yson:"t_uint16"`
UInt32 uint32 `yson:"t_uint32"`
UInt64 uint64 `yson:"t_uint64"`
Float float32 `yson:"t_float"`
Double float64 `yson:"t_double"`
Bool bool `yson:"t_bool"`
String string `yson:"t_string"`
Utf8 string `yson:"t_utf8"`
Date time.Time `yson:"t_date"`
DateTime time.Time `yson:"t_datetime"`
Timestamp time.Time `yson:"t_timestamp"`
//Interval int64 `yson:"t_interval"`
Yson string `yson:"t_yson"`
Decimal string `yson:"t_decimal"`
List []uint64 `yson:"t_list"`
Struct Struct `yson:"t_struct"`
Tuple []interface{} `yson:"t_tuple"`
VarTuple []interface{} `yson:"t_var_tuple"`
VarStruct []interface{} `yson:"t_var_struct"`
Dict map[string]string `yson:"t_dict"`
Tagged string `yson:"t_tagged"`
}