英文:
Skip certain folders containing static content during GoConvey testing of endpoint REST API
问题
我有一个public
文件夹用于提供静态资源。我编写了测试用例,使用Convey将静态内容保存在这个文件夹中。
由于在public文件夹中创建了新文件,它陷入了一个无休止的循环。
integration.go:120: 文件系统状态已修改,正在发布当前文件夹... 1452848214 1452848215
我该如何跳过这个文件夹?我尝试在文件夹中添加一个名为.goconvey
的文件,并将其设置为ignore
,但它不起作用。
有什么建议,如何跳过监视该文件夹?
英文:
I have a public
folder to serve static resources. I wrote tests to save static content in this folder using Convey.
It gets stuck in a never-ending loop due to the new files created in the public folder.
integration.go:120: File system state modified, publishing current folders... 1452848214 1452848215
How can I skip this folder? I tried adding .goconvey
file to the folder with ignore
but its not working.
Any suggestions, how to skip watching that folder?
答案1
得分: 3
在GoConvey中有一个标志可以帮助跳过那些文件夹。
goconvey -excludedDirs="public"
来源:https://github.com/smartystreets/goconvey/blob/master/goconvey.go#L44
来源:https://github.com/smartystreets/goconvey/issues/383
英文:
There is a flag in GoConvey which helps in skipping those folders.
goconvey -excludedDirs="public"
https://github.com/smartystreets/goconvey/blob/master/goconvey.go#L44
Source: https://github.com/smartystreets/goconvey/issues/383
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论