(t *testing.T)
| 26 | ) |
| 27 | |
| 28 | func TestSchemaMutator(t *testing.T) { |
| 29 | |
| 30 | defaultConfig := metaCom.TableConfig{ |
| 31 | BatchSize: metastore.DefaultBatchSize, |
| 32 | ArchivingIntervalMinutes: metastore.DefaultArchivingIntervalMinutes, |
| 33 | ArchivingDelayMinutes: metastore.DefaultArchivingDelayMinutes, |
| 34 | BackfillMaxBufferSize: metastore.DefaultBackfillMaxBufferSize, |
| 35 | BackfillIntervalMinutes: metastore.DefaultBackfillIntervalMinutes, |
| 36 | BackfillThresholdInBytes: metastore.DefaultBackfillThresholdInBytes, |
| 37 | BackfillStoreBatchSize: metastore.DefaultBackfillStoreBatchSize, |
| 38 | RecordRetentionInDays: metastore.DefaultRecordRetentionInDays, |
| 39 | SnapshotIntervalMinutes: metastore.DefaultSnapshotIntervalMinutes, |
| 40 | SnapshotThreshold: metastore.DefaultSnapshotThreshold, |
| 41 | RedoLogRotationInterval: metastore.DefaultRedologRotationInterval, |
| 42 | MaxRedoLogFileSize: metastore.DefaultMaxRedoLogSize, |
| 43 | } |
| 44 | |
| 45 | testTable := metaCom.Table{ |
| 46 | Version: 0, |
| 47 | Name: "test1", |
| 48 | Columns: []metaCom.Column{ |
| 49 | { |
| 50 | Name: "col1", |
| 51 | Type: "Int32", |
| 52 | }, |
| 53 | }, |
| 54 | PrimaryKeyColumns: []int{0}, |
| 55 | Config: metastore.DefaultTableConfig, |
| 56 | } |
| 57 | testTable2 := metaCom.Table{ |
| 58 | Version: 0, |
| 59 | Name: "test1", |
| 60 | Columns: []metaCom.Column{ |
| 61 | { |
| 62 | Name: "col1", |
| 63 | Type: "Int32", |
| 64 | }, |
| 65 | { |
| 66 | Name: "col2", |
| 67 | Type: "Int32", |
| 68 | }, |
| 69 | }, |
| 70 | Config: metastore.DefaultTableConfig, |
| 71 | PrimaryKeyColumns: []int{0}, |
| 72 | } |
| 73 | testTable2.Config.BatchSize = 100 |
| 74 | |
| 75 | defaultValue := "default" |
| 76 | testTable3 := metaCom.Table{ |
| 77 | Version: 0, |
| 78 | Name: "test3", |
| 79 | Columns: []metaCom.Column{ |
| 80 | { |
| 81 | Name: "col1", |
| 82 | Type: "SmallEnum", |
| 83 | DefaultValue: &defaultValue, |
| 84 | }, |
| 85 | }, |
nothing calls this directly
no test coverage detected