fluxcd-flux2/cmd/flux
Allen Porter 3a3bdc62c8 Make test harness more flexible with functions
Replace the 4 arguments to cmdTestCase with a function that
can let tests run arbitrary logic if it is more complex than
what is provided by the test harness. Move the existing logic
into functions that the test can use for common assertions on
golden files and golden values.

These changes were pulled out of PR #1696 to make a smaller review.

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-23 08:57:43 -07:00
..
testdata Remove fakeclient and use testenv for flux cmd tests 2021-08-18 18:53:53 -07:00
alert.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
alert_provider.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
bootstrap.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
bootstrap_git.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
bootstrap_github.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
bootstrap_gitlab.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
check.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
check_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
completion.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
completion_bash.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_fish.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_powershell.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_zsh.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
create.go Refactor cmd global variables into structs 2021-01-22 10:42:31 +01:00
create_alert.go Switch StringArrayVar flags to use StringSliceVar 2021-05-06 10:09:36 +01:00
create_alertprovider.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
create_helmrelease.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
create_image.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
create_image_policy.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
create_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
create_image_update.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
create_kustomization.go Switch StringArrayVar flags to use StringSliceVar 2021-05-06 10:09:36 +01:00
create_receiver.go Switch StringArrayVar flags to use StringSliceVar 2021-05-06 10:09:36 +01:00
create_secret.go Add sourcesecret and kustomization manifestgen 2021-02-26 16:58:41 +01:00
create_secret_git.go feat: display success message while create secrets via flux cli. 2021-08-04 21:31:57 +08:00
create_secret_helm.go feat: display success message while create secrets via flux cli. 2021-08-04 21:31:57 +08:00
create_secret_tls.go feat: display success message while create secrets via flux cli. 2021-08-04 21:31:57 +08:00
create_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
create_source_bucket.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
create_source_git.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
create_source_helm.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
create_tenant.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
delete.go Refactor cmd global variables into structs 2021-01-22 10:42:31 +01:00
delete_alert.go Format go imports 2021-04-07 16:40:16 +01:00
delete_alertprovider.go Format go imports 2021-04-07 16:40:16 +01:00
delete_helmrelease.go Format go imports 2021-04-07 16:40:16 +01:00
delete_image.go Rename flux delete auto to flux delete image 2021-02-04 11:57:40 +00:00
delete_image_policy.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
delete_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
delete_image_update.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
delete_kustomization.go Format go imports 2021-04-07 16:40:16 +01:00
delete_receiver.go Format go imports 2021-04-07 16:40:16 +01:00
delete_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
delete_source_bucket.go Format go imports 2021-04-07 16:40:16 +01:00
delete_source_git.go Format go imports 2021-04-07 16:40:16 +01:00
delete_source_helm.go Format go imports 2021-04-07 16:40:16 +01:00
docgen.go Remove ' command' from Flux CLI docs title 2021-05-06 08:52:36 +02:00
export.go Refactor all remaining create, delete, export, get command to use adapter 2021-03-25 21:54:58 +01:00
export_alert.go Format go imports 2021-04-07 16:40:16 +01:00
export_alertprovider.go Format go imports 2021-04-07 16:40:16 +01:00
export_helmrelease.go Format go imports 2021-04-07 16:40:16 +01:00
export_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
export_image_policy.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
export_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
export_image_update.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
export_kustomization.go Format go imports 2021-04-07 16:40:16 +01:00
export_receiver.go Format go imports 2021-04-07 16:40:16 +01:00
export_secret.go Format go imports 2021-04-07 16:40:16 +01:00
export_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
export_source_bucket.go Format go imports 2021-04-07 16:40:16 +01:00
export_source_git.go Format go imports 2021-04-07 16:40:16 +01:00
export_source_helm.go Format go imports 2021-04-07 16:40:16 +01:00
get.go Refactor e2e tests 2021-08-17 13:55:14 +03:00
get_alert.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_alertprovider.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_all.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_helmrelease.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image_all.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image_policy.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image_repository.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image_update.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_kustomization.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_receiver.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source_all.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source_bucket.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source_chart.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source_git.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_source_helm.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
helmrelease.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
helmrelease_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
image.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
image_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
install.go chore: remove deprecated io/ioutil 2021-07-30 20:51:46 +02:00
kustomization.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
kustomization_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
log.go Add Warningf to logger interface amd impl 2021-04-08 10:48:27 +03:00
logs.go Update flux logs examples 2021-03-18 11:10:21 +01:00
main.go Remove fakeclient and use testenv for flux cmd tests 2021-08-18 18:53:53 -07:00
main_e2e_test.go Remove fakeclient and use testenv for flux cmd tests 2021-08-18 18:53:53 -07:00
main_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
main_unit_test.go Refactor e2e tests 2021-08-17 13:55:14 +03:00
manifests.embed.go Improve build process embedded manifests 2021-03-08 16:06:44 +01:00
object.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
receiver.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
reconcile.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
reconcile_alert.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_alertprovider.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_helmrelease.go Fix reconcile with source in a different namespace 2021-04-16 08:53:30 +01:00
reconcile_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
reconcile_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
reconcile_image_updateauto.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
reconcile_kustomization.go Fix reconcile with source in a different namespace 2021-04-16 08:53:30 +01:00
reconcile_receiver.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
reconcile_source_bucket.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_source_git.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_source_helm.go Format go imports 2021-04-07 16:40:16 +01:00
reconcile_with_source.go Fix reconcile with source in a different namespace 2021-04-16 08:53:30 +01:00
resume.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_alert.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_helmrelease.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
resume_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
resume_image_updateauto.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
resume_kustomization.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_receiver.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_source.go Add resume source commands 2020-11-26 16:40:54 +02:00
resume_source_bucket.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_source_chart.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_source_git.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
resume_source_helm.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
source.go Request reconcile using patch instead of update 2021-08-04 13:08:36 +02:00
status.go Move StatusChecker to separate and generic pkg 2021-03-15 11:41:02 +01:00
suspend.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_alert.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_helmrelease.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
suspend_image_repository.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
suspend_image_updateauto.go Use image API v1beta1 2021-06-28 16:20:05 +01:00
suspend_kustomization.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_receiver.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_source.go Add suspend source commands 2020-11-26 16:22:47 +02:00
suspend_source_bucket.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_source_chart.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_source_git.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
suspend_source_helm.go Adds suspend and resume all cmd 2021-04-28 10:44:51 +01:00
trace.go Remove fakeclient and use testenv for flux cmd tests 2021-08-18 18:53:53 -07:00
trace_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00
uninstall.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
version.go Embed the install manifests in flux binary 2021-02-25 12:53:04 +02:00
version_test.go Make test harness more flexible with functions 2021-08-23 08:57:43 -07:00