summaryrefslogtreecommitdiff
path: root/integration/plugin/logging/cmd
Commit message (Collapse)AuthorAgeFilesLines
* linting: gosec: fix or suppress G112, G114 in test codeSebastiaan van Stijn2022-09-043-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating test-code only; set ReadHeaderTimeout for some, or suppress the linter error for others. contrib/httpserver/server.go:11:12: G114: Use of net/http serve function that has no support for setting timeouts (gosec) log.Panic(http.ListenAndServe(":80", nil)) ^ integration/plugin/logging/cmd/close_on_start/main.go:42:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec) server := http.Server{ Addr: l.Addr().String(), Handler: mux, } integration/plugin/logging/cmd/discard/main.go:17:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec) server := http.Server{ Addr: l.Addr().String(), Handler: mux, } integration/plugin/logging/cmd/dummy/main.go:14:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec) server := http.Server{ Addr: l.Addr().String(), Handler: http.NewServeMux(), } integration/plugin/volumes/cmd/dummy/main.go:14:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec) server := http.Server{ Addr: l.Addr().String(), Handler: http.NewServeMux(), } testutil/fixtures/plugin/basic/basic.go:25:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec) server := http.Server{ Addr: l.Addr().String(), Handler: http.NewServeMux(), } volume/testutils/testutils.go:170:5: G114: Use of net/http serve function that has no support for setting timeouts (gosec) go http.Serve(l, mux) ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-271-2/+1
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Support configuration of log cacher.Brian Goff2020-02-191-0/+1
| | | | | | | | | | Configuration over the API per container is intentionally left out for the time being, but is supported to configure the default from the daemon config. Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit cbecf48bc352e680a5390a7ca9cff53098cd16d7) Signed-off-by: Madhu Venugopal <madhu@docker.com>
* Support reads for all log drivers.Brian Goff2020-02-193-0/+108
| | | | | | | | | This supplements any log driver which does not support reads with a custom read implementation that uses a local file cache. Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit d675e2bf2b75865915c7a4552e00802feeb0847f) Signed-off-by: Madhu Venugopal <madhu@docker.com>
* Improvements to the test runnersBrian Goff2019-07-313-3/+0
| | | | | | | | | | | | | 1. Use `go list` to get list of integration dirs to build. This means we do not need to have a valid `.go` in every subdirectory and also filters out other dirs like "bundles" which may have been created. 2. Add option to specify custom flags for integration and integration-cli. This is needed so both suites can be run AND set custom flags... since the cli suite does not support standard go flags. 3. Add options to skip an entire integration suite. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix logging plugin crash unrecoverableBrian Goff2018-05-142-0/+49
| | | | | | | | | | | In cases where a logging plugin has crashed when the daemon tries to copy the container stdio to the logging plugin it returns a broken pipe error and any log entries that occurr while the plugin is down are lost. Fix this by opening read+write in the daemon so logs are not lost while the plugin is down. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Move log validator logic after plugins are loadedBrian Goff2018-02-153-0/+21
This ensures that all log plugins are registered when the log validator is run. Signed-off-by: Brian Goff <cpuguy83@gmail.com>