在进行端点 REST API 的 GoConvey 测试期间,跳过包含静态内容的特定文件夹。

huangapple go评论83阅读模式
英文:

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

huangapple
  • 本文由 发表于 2016年1月15日 16:10:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/34806703.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定