Comments (9)
Yes indeed. You are more than welcome to write tests. I'm actually writing an example test file for the rewrite middleware right now (it's simple; a good starting point).
from caddy.
@j-mcnally See b2ee663
from caddy.
I'm keen on writing tests ..What would the best place to start writing tests ?
from caddy.
@Karthic-Hackintosh Welcome! Any of the middlewares here: https://github.com/mholt/caddy/tree/master/middleware
Each middleware has an associated "setup" file that also needs testing: https://github.com/mholt/caddy/tree/master/config/setup - all these do is parse the configuration and set up the middleware so it's ready to use.
Those would be great places to start.
from caddy.
Hi ,
Are you still need help to test stuff ?
Where i can find the example test you wrote ?
from caddy.
@miko-code We've made lots of progress, but still need help. For example, https://github.com/mholt/caddy/blob/master/config/setup/root.go needs tests. You can see an example of similar tests here (though these are more complicated): https://github.com/mholt/caddy/blob/master/config/setup/tls_test.go
root.go is super-easy to test and only needs one or a few assertions I think.
from caddy.
Hi,
As with everyone before me in this thread I would also like to help with some tests. I saw that the root.go is still without test so I'll take a look at it whenever I have time and try to write some. I'll need to get familiar with the functionallity first, but hopefully it won't take long..
from caddy.
@Makpoc We'd totally welcome your help :) Feel free to join us in Slack if you have any questions!
from caddy.
I'm closing this since we have tests in every package now and have vastly improved from having no tests at all. Thanks to all who have got us this far.
Tests will always be changing and needing improvements and more thorough coverage, so if you see this issue later, please don't hesitate to jump in to help with tests. Even though the issue is closed, we are always working on improving tests and test coverage. Feel free to ask if you want to get some pointers to get started contributing!
from caddy.
Related Issues (20)
- Inquiry on Using Starlark Scripting with Caddy HOT 4
- caddytls: tailscale cert manager not used as fallback for *.ts.net certs HOT 9
- reverseproxy: feature request: certificate pinning for use with tls_insecure_skip_verify HOT 1
- all: Support the riscv64 platform HOT 3
- Improve error message when trying to define a global matcher HOT 3
- Issue with Caddy Server Configuration for Domain HOT 1
- v2.8.0-rc.1: panic: runtime error: invalid memory address or nil pointer dereference HOT 5
- Intermediate certificate expired without using specified root certificate HOT 2
- Set `sign_with_root` via Caddyfile HOT 3
- core: caddy unable to start with an empty $HOME HOT 5
- Using proxy_protocol v2 with h2c backend gives wrong IP address to backend. HOT 19
- TLS does not work on NATed IPv4 literal HOT 1
- Feature-Request: [Templates] include from string buffer HOT 2
- Permission denied when first run after fresh installation. HOT 11
- ZeroSSL Issuer can't use dns_challenge_override_domain HOT 4
- Client_ip not merged as remote_ip used to in "not" expression HOT 3
- v2.8 is a major breaking change: update to CertMagic breaks LegoDeprecated HOT 1
- the change to SanitizedPathJoin in v2.8.x can cause routing to break in certain configurations HOT 5
- Build amd64 and arm are broken HOT 1
- X-Accel-Redirect style of header matching is broken in handle_response
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 caddy.