github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/systemssync/fixtures_test.go (about) 1 package systemssync_test 2 3 import ( 4 "database/sql/driver" 5 "time" 6 7 "github.com/kyma-incubator/compass/components/director/internal/domain/systemssync" 8 "github.com/kyma-incubator/compass/components/director/internal/model" 9 "github.com/pkg/errors" 10 ) 11 12 var ( 13 syncID = "684aa2a7-3b96-4374-936a-bb758d631b6b" 14 syncTenantID = "11111111-2222-3333-4444-555555555555" 15 syncProductID = "PR" 16 lastSyncTime = time.Now() 17 testError = errors.New("test error") 18 ) 19 20 func fixSystemsSyncModel(id, tenantID, productID string, lastSyncTimestamp time.Time) *model.SystemSynchronizationTimestamp { 21 return &model.SystemSynchronizationTimestamp{ 22 ID: id, 23 TenantID: tenantID, 24 ProductID: productID, 25 LastSyncTimestamp: lastSyncTimestamp, 26 } 27 } 28 29 func fixSystemsSyncEntity(id, tenantID, productID string, lastSyncTimestamp time.Time) *systemssync.Entity { 30 return &systemssync.Entity{ 31 ID: id, 32 TenantID: tenantID, 33 ProductID: productID, 34 LastSyncTimestamp: lastSyncTimestamp, 35 } 36 } 37 38 func fixSystemsSyncTimestampsColumns() []string { 39 return []string{"id", "tenant_id", "product_id", "last_sync_timestamp"} 40 } 41 42 func fixSystemsSyncCreateArgs(entity systemssync.Entity) []driver.Value { 43 return []driver.Value{entity.ID, entity.TenantID, entity.ProductID, entity.LastSyncTimestamp} 44 }