有计划支持一些go的内存数据库来让单测更轻量么? #1636
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1636
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
像题目中所描述,项目中使用了xorm,代码中的storage layer需要跑unit testing则必须依赖一个真实存在的服务,为了让单测更轻量,所以考虑引入ramsql等类似的go实现的内存数据库,在ci流程、integration testing中再去使用真实的db服务。使本地unit testing更轻量。所以请问有这方面的计划么?
@joint-song different databases have different SQL syntax, I don't think it will make work easier to use another database server. Xorm use drone ci which support database docker images and all xorm tests run on sqlite/mysql/mssql/postgres/tidb/cockroach images.
Thanks for your reply.
Recently I'm trying to lightweight unit testing of many layers including storage layer. It would make TDD easier if I can run all unit testing without any infra layers.
Each database dialect differences much in clause, function, and types. I can totally understand what you said and the big difficulty to implement such a functionality.
I'll still startup a db server in my local machine during development. And I'll close this issue as well.