gothinkster / golang-gin-realworld-example-app

Exemplary real world application built with Golang + Gin
https://realworld.io
MIT License
2.5k stars 495 forks source link

Synced go.mod with original vendors.json, additional minor clean-up. #24

Open pvillela opened 3 years ago

pvillela commented 3 years ago

I suspect the problems you reported are due to changes in some of the dependencies.  I went back to your previous commit on master, regenerated go.mod, and synced it with vendor.json (go mod vendor).  After that, I again removed the dependence on the starter-kit repo.  Again, all unit tests passed.

wangzitian0 commented 3 years ago

Please run the script: part inside https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/.travis.yml on local enviroment. Thanks!

pvillela commented 3 years ago

I ran the coverage script as instructed but it is not working -- it produces an empty coverage.txt and outputs the following to the terminal:

?   github.com/gothinkster/golang-gin-realworld-example-app/articles

[no test files]

However, when I run "go test ./... -coverprofile cover.out", sometimes it outputs the following to the terminal:

?   github.com/gothinkster/golang-gin-realworld-example-app [no test

files] ? github.com/gothinkster/golang-gin-realworld-example-app/articles [no test files] ok github.com/gothinkster/golang-gin-realworld-example-app/common 0.007s coverage: 100.0% of statements < lots of errors, starting with a SQLite disk I/O error>

and sometimes it outputs:

?   github.com/gothinkster/golang-gin-realworld-example-app [no test

files] ? github.com/gothinkster/golang-gin-realworld-example-app/articles [no test files] ok github.com/gothinkster/golang-gin-realworld-example-app/common 0.007s coverage: 100.0% of statements ok github.com/gothinkster/golang-gin-realworld-example-app/users 4.061s coverage: 100.0% of statements

The odd thing is that "go test ./..." always outputs:

? github.com/gothinkster/golang-gin-realworld-example-app [no test files] ? github.com/gothinkster/golang-gin-realworld-example-app/articles [no test files] ok github.com/gothinkster/golang-gin-realworld-example-app/common 0.010s ok github.com/gothinkster/golang-gin-realworld-example-app/users (cached)

So the tests are running fine but there may be some memory or tmp space limitation that is affecting SQLite when the tests are run with coverage.

On Wed, Mar 31, 2021 at 7:09 AM wangzitian0 @.***> wrote:

Please run the script: part inside https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/.travis.yml on local enviroment. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gothinkster/golang-gin-realworld-example-app/pull/24#issuecomment-810980634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4LPORQT55ZLYVD55AUBTTGL7GXANCNFSM42EKDNEQ .

wangzitian0 commented 3 years ago

@pvillela Could you please update the readme as the repo have use the go mod? As long as the basic script works fine, it was okay to me whether we use latest packages.

pvillela commented 3 years ago

Done. See new PR.

On Sun, Apr 11, 2021 at 5:15 AM wangzitian0 @.***> wrote:

@pvillela https://github.com/pvillela Could you please update the readme as the repo have use the go mod? As long as the basic script works fine, it was okay to me whether we use latest packages.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gothinkster/golang-gin-realworld-example-app/pull/24#issuecomment-817275839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4LPL3JFANKIHXZ3HAS7DTIFSBLANCNFSM42EKDNEQ .