Kanban (#393)
Fix tests Add error docs Add swagger docs for bucket endpoints Add integration tests Fix tests Fix err shadow Make sure a bucket and a task belong to the same list when adding or updating a task Add tests Add getting users of a bucket Fix log level when testing Fix lint Add migration for buckets Cleanup/Comments/Reorganization Add Kanban bucket handling Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/393
This commit is contained in:
@ -70,7 +70,7 @@ func CreateDBEngine() (engine *xorm.Engine, err error) {
|
||||
}
|
||||
|
||||
engine.SetMapper(core.GonicMapper{})
|
||||
logger := log.NewXormLogger()
|
||||
logger := log.NewXormLogger("")
|
||||
engine.SetLogger(logger)
|
||||
|
||||
// Cache
|
||||
|
103
pkg/db/fixtures/buckets.yml
Normal file
103
pkg/db/fixtures/buckets.yml
Normal file
@ -0,0 +1,103 @@
|
||||
- id: 1
|
||||
title: testbucket1
|
||||
list_id: 1
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 2
|
||||
title: testbucket2
|
||||
list_id: 1
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 3
|
||||
title: testbucket3
|
||||
list_id: 1
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 4
|
||||
title: testbucket4 - other list
|
||||
list_id: 2
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
# The following are not or only partly owned by user 1
|
||||
- id: 5
|
||||
title: testbucket5
|
||||
list_id: 20
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 6
|
||||
title: testbucket6
|
||||
list_id: 6
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 7
|
||||
title: testbucket7
|
||||
list_id: 7
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 8
|
||||
title: testbucket8
|
||||
list_id: 8
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 9
|
||||
title: testbucket9
|
||||
list_id: 9
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 10
|
||||
title: testbucket10
|
||||
list_id: 10
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 11
|
||||
title: testbucket11
|
||||
list_id: 11
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 12
|
||||
title: testbucket13
|
||||
list_id: 12
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 13
|
||||
title: testbucket13
|
||||
list_id: 13
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 14
|
||||
title: testbucket14
|
||||
list_id: 14
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 15
|
||||
title: testbucket15
|
||||
list_id: 15
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 16
|
||||
title: testbucket16
|
||||
list_id: 16
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
||||
- id: 17
|
||||
title: testbucket17
|
||||
list_id: 17
|
||||
created_by_id: 1
|
||||
created: 1587244432
|
||||
updated: 1587244432
|
@ -7,6 +7,7 @@
|
||||
index: 1
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
bucket_id: 1
|
||||
- id: 2
|
||||
text: 'task #2 done'
|
||||
done: true
|
||||
@ -15,6 +16,7 @@
|
||||
index: 2
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
bucket_id: 1
|
||||
- id: 3
|
||||
text: 'task #3 high prio'
|
||||
done: false
|
||||
@ -24,6 +26,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
priority: 100
|
||||
bucket_id: 2
|
||||
- id: 4
|
||||
text: 'task #4 low prio'
|
||||
done: false
|
||||
@ -33,6 +36,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
priority: 1
|
||||
bucket_id: 2
|
||||
- id: 5
|
||||
text: 'task #5 higher due date'
|
||||
done: false
|
||||
@ -42,6 +46,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
due_date_unix: 1543636724
|
||||
bucket_id: 2
|
||||
- id: 6
|
||||
text: 'task #6 lower due date'
|
||||
done: false
|
||||
@ -51,6 +56,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
due_date_unix: 1543616724
|
||||
bucket_id: 3
|
||||
- id: 7
|
||||
text: 'task #7 with start date'
|
||||
done: false
|
||||
@ -60,6 +66,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
start_date_unix: 1544600000
|
||||
bucket_id: 3
|
||||
- id: 8
|
||||
text: 'task #8 with end date'
|
||||
done: false
|
||||
@ -69,6 +76,7 @@
|
||||
created: 1543626724
|
||||
updated: 1543626724
|
||||
end_date_unix: 1544700000
|
||||
bucket_id: 3
|
||||
- id: 9
|
||||
text: 'task #9 with start and end date'
|
||||
done: false
|
||||
|
@ -46,7 +46,7 @@ func CreateTestEngine() (engine *xorm.Engine, err error) {
|
||||
}
|
||||
|
||||
engine.SetMapper(core.GonicMapper{})
|
||||
logger := log.NewXormLogger()
|
||||
logger := log.NewXormLogger("DEBUG")
|
||||
logger.ShowSQL(os.Getenv("UNIT_TESTS_VERBOSE") == "1")
|
||||
engine.SetLogger(logger)
|
||||
x = engine
|
||||
|
Reference in New Issue
Block a user