Comments (5)
I believe real issue is not that there were no tests, but that there were no Go packages:
$ mkdir foo && cd foo && go mod init example.com
$ go test ./...
go: warning: "./..." matched no packages
no packages to test
$ echo $?
1
Whereas if you have a package:
$ echo "package foo" > foo.go
$ go test ./...
? example.com [no test files]
$ echo $?
0
I'm not sure why Go made the distinction to treat "no matching packages" as a test failure; I guess to avoid mistakes. I believe if you have a matching Go package without tests Encore won't treat the tests as failing.
All that said, maybe Encore should treat this scenario as failing the build, and not just the tests? The "One or more tests failed" error is certainly confusing.
from encore.
hmm I did have a go package though:
.
However if I delete the test file now and re-run the build it does pass. Let me try and repro on a new project. Maybe I did something else wrong.
from encore.
Ok I reproed this.
- I ran encore create app
- I created a project called "testing-no-tests"
- I selected blank project.
- I created a package as follows:
- I ran git push encore
- The deploy failed: https://app.encore.dev/testing-no-tests-tv9i/deploys/staging/147po86agipf5vipittg with the same error:
from encore.
But did you actually commit the thing/thing.go
file? I believe the error you're seeing only happens when there are no Go packages.
from encore.
Aha I'm not sure I did :) will close!
from encore.
Related Issues (20)
- Expose trace information in `*encore.Request`
- Proposal: CLI command checking missing secrets against environments HOT 8
- Support OpenAPI schema generation HOT 1
- [BUG]: Topic missing publisher role in GCP deployment HOT 5
- Running encore on-prem/self-hosted HOT 1
- 1.15.0 is released but does not get installed by the installation script HOT 1
- Fatal error when running in debug mode HOT 3
- Can't decode query parameters to pointer types HOT 1
- Optional query parameter being sent as 'undefined'
- An unhandled panic occurred in the Encore compiler: runtime error: index out of range [3] with length 3 HOT 3
- Parser error: prob recursion HOT 4
- Install Encore CLI on Windows with scoop HOT 1
- error running encore app HOT 1
- Proposal: graceful shutdown improvements HOT 2
- Flow doesn't show databases for `sqldb.NewDatabase(...)`, only for `sqldb.Named(...)` HOT 1
- encore run panic
- Typescript generated client type error with slice optional query parameters HOT 1
- Support for other cloud providers HOT 4
- Compiler error is misleading when migrations folder is missing.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from encore.