linkerd2/cli/cmd/testdata
Kevin Leimkuhler 66070c26f4
Introduce go generate to embed static templates (#2189)
# Problem
In order to switch Linkerd template rendering to use `.yaml` files, static
assets must be bundled in the Go binary for use by `linkerd install`.

# Solution
The solution should not affect the local development process of building and
testing.

[vfsgen](https://github.com/shurcooL/vfsgen) generates Go code that statically
implements the provided `http.FileSystem`. Paired with `go generate` and Go
[build tags](https://golang.org/pkg/go/build/), we can continue to use the
template files on disk when developing with no change required.

In `!prod` Go builds, the `cli/static/templates.go` file provides a
`http.FileSystem` to the local templates. In `prod` Go builds, `go generate
./cli` generates `cli/static/generated_templates.gogen.go` that statically
provides the template files.

When built with `-tags prod`, the executable will be built with the staticlly
generated file instead of the local files.

# Validation
The binaries were compiled locally with `bin/docker-build`. The binaries were
then tested with `bin/test-run (pwd)/target/cli/darwin/linkerd`. All tests
passed.

No change was required to successfully run `bin/go-run cli install`. No change
was required to run `bin/linkerd install`.

Fixes #2153

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2019-02-04 18:09:47 -08:00
..
inject-filepath Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
check_output.golden Add hint URLs for all checks (#2159) 2019-01-30 16:26:57 -08:00
inject_contour.input.yml Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_contour.report Fix Unicode and color output for Windows (#2114) 2019-01-23 09:55:44 -08:00
inject_contour.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_contour_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_already_injected.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_already_injected.input.yml When injecting, perform an uninject as a first step (#2089) 2019-01-17 10:15:23 -08:00
inject_emojivoto_already_injected.report When injecting, perform an uninject as a first step (#2089) 2019-01-17 10:15:23 -08:00
inject_emojivoto_already_injected.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment.input.yml Refactor `conduit inject` code to make it unit-testable. (#379) 2018-02-18 12:33:52 -10:00
inject_emojivoto_deployment.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_deployment.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_controller_name.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment_controller_name.input.yml Rename CLI from conduit to linkerd (#1312) 2018-07-12 17:14:07 -07:00
inject_emojivoto_deployment_controller_name.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_deployment_controller_name.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_controller_name_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_deployment_hostNetwork_false.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment_hostNetwork_false.input.yml Remove executable bit from non-executable files. (#1335) 2018-07-16 13:55:52 -10:00
inject_emojivoto_deployment_hostNetwork_false.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_deployment_hostNetwork_false.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_hostNetwork_true.input.yml Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_hostNetwork_true.report Fix Unicode and color output for Windows (#2114) 2019-01-23 09:55:44 -08:00
inject_emojivoto_deployment_hostNetwork_true.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_hostNetwork_true_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_deployment_injectDisabled.input.yml Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_injectDisabled.report Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_injectDisabled.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_injectDisabled_uninject.report Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_no_init_container.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment_tls.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment_udp.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_deployment_udp.input.yml Inject warns on UDP ports (#1617) 2018-09-11 10:12:45 -07:00
inject_emojivoto_deployment_udp.report Fix Unicode and color output for Windows (#2114) 2019-01-23 09:55:44 -08:00
inject_emojivoto_deployment_udp.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_deployment_udp_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_deployment_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_istio.input.yml When injecting, perform an uninject as a first step (#2089) 2019-01-17 10:15:23 -08:00
inject_emojivoto_istio.report Fix Unicode and color output for Windows (#2114) 2019-01-23 09:55:44 -08:00
inject_emojivoto_istio.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_istio_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_list.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_list.input.yml Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_emojivoto_list.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_list.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_list_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_pod.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_pod.input.yml Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_emojivoto_pod.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_pod.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_pod_tls.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_pod_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_pod_with_requests.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_pod_with_requests.input.yml Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_emojivoto_pod_with_requests.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_pod_with_requests.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_pod_with_requests_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_emojivoto_statefulset.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_emojivoto_statefulset.input.yml Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_emojivoto_statefulset.report Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_emojivoto_statefulset.report.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_emojivoto_statefulset_uninject.report Add newline separator above uninject reports (#2104) 2019-01-17 11:12:54 -08:00
inject_gettest_deployment.bad.golden Added `linkerd uninject` command (#2054) 2019-01-14 17:39:31 -05:00
inject_gettest_deployment.bad.golden.verbose Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_gettest_deployment.bad.input.yml Print error message only when invalid YAML file is used with inject command (#389) 2018-02-20 11:59:41 -08:00
inject_gettest_deployment.good.golden.stderr Update check and inject output (#2087) 2019-01-16 15:14:14 -08:00
inject_gettest_deployment.good.golden.stderr.verbose Add pod spec annotation to disable injection in CLI and auto-injector (#2187) 2019-02-01 16:57:06 -08:00
inject_gettest_deployment.good.golden.yml Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
inject_gettest_deployment.good.input.yml Print error message only when invalid YAML file is used with inject command (#389) 2018-02-20 11:59:41 -08:00
install-cni-plugin_default.golden Added flags to allow further configuration of destination cni bin and cni conf directories; fixed up spacing in template. (#2181) 2019-01-31 13:52:39 -08:00
install-cni-plugin_fully_configured.golden Added flags to allow further configuration of destination cni bin and cni conf directories; fixed up spacing in template. (#2181) 2019-01-31 13:52:39 -08:00
install-cni-plugin_fully_configured_equal_dsts.golden Added flags to allow further configuration of destination cni bin and cni conf directories; fixed up spacing in template. (#2181) 2019-01-31 13:52:39 -08:00
install-sp_default.golden Add cli command to install linkerd service profiles (#2099) 2019-01-24 11:34:19 -08:00
install-sp_output.golden Add cli command to install linkerd service profiles (#2099) 2019-01-24 11:34:19 -08:00
install_default.golden Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
install_ha_output.golden Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
install_ha_with_overrides_output.golden Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
install_no_init_container.golden Configure proxy keepalives via the environment (#2193) 2019-02-04 16:16:43 -08:00
install_no_init_container_auto_inject.golden Introduce go generate to embed static templates (#2189) 2019-02-04 18:09:47 -08:00
install_output.golden Introduce go generate to embed static templates (#2189) 2019-02-04 18:09:47 -08:00
install_single_namespace_output.golden Introduce go generate to embed static templates (#2189) 2019-02-04 18:09:47 -08:00
routes_one_output.golden Improve routes command to list all routes (#2066) 2019-01-16 17:15:35 -08:00
routes_one_output_json.golden Improve routes command to list all routes (#2066) 2019-01-16 17:15:35 -08:00
stat_all_output.golden Added support for json output in `linkerd stat` (#1749) 2018-10-15 14:10:48 -07:00
stat_all_output_json.golden Allow stat summary to query for multiple resources (#1841) 2018-11-14 10:44:04 -08:00
stat_one_output.golden Added support for json output in `linkerd stat` (#1749) 2018-10-15 14:10:48 -07:00
stat_one_output_json.golden Allow stat summary to query for multiple resources (#1841) 2018-11-14 10:44:04 -08:00
tap_busy_output.golden Add resource metadata to Tap CLI output (#1437) 2018-08-20 14:25:26 -07:00
tap_busy_output_wide.golden Add resource metadata to Tap CLI output (#1437) 2018-08-20 14:25:26 -07:00
tap_empty_output.golden Make several CLI commands testable (#86) 2017-12-27 14:10:41 -05:00