open-vault/api
Clint 6b4bdb1882
VLT091 plugin testing framework stepwise (#9270)
* Resolve merge conflicts and updates from running a test

* move testing/_test.go over to legacy

* updates

* Add core of plugin test framework Stepwise  (#9166)

* adding stepwise testing, but there are protocol buff error :/

* move file and update sdk/go.mo

* update/sync modules

* update from other branch

* update sdk/go.mod

* some cleanups after feedback

* remove enviornments from this PR

* update vendor

* change from running go mod tidy

* change from go mod tidy

* Update sdk/testing/stepwise/helpers.go

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* Update sdk/testing/stepwise/helpers.go

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* change panic to error

* Update sdk/testing/stepwise/helpers.go

return `nil` and not `err` at the end

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* Defer close() on successful Open of a file

* document the re-creation of steps

* Update sdk/testing/stepwise/stepwise.go

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* remove unused BarrierKeys()

* Update sdk/testing/stepwise/stepwise.go

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* updates from feedback

* fix return with bad arguments

* Rename things:

- StepOperation -> Operation
- StepwiseEnvironment -> Environment
- StepCheckFunc -> AssertionFunc
- step.Check -> step.Assert

* document the environment interface methods

* rename EnvironmentOptions to MountOptions

* rename Name to RegistryName

* remove ExpectError because it's redundant

* minor doc update

* Update sdk/testing/stepwise/stepwise.go

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* add checkShouldRun function

* remove redundant return

* remove vestigial PreCheck function

* add tt.Helper() to makeRequest

* minor code formatting and document 1-based index for log output of Steps

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>

* minor updates

* update sdk

* use local reference for api, vault dep

* Update sdk/testing/stepwise/stepwise.go

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>

* Update sdk/testing/stepwise/stepwise.go

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>

* cleanup some defer functions

* call fatal if environment setup fails, and don't call teardown

* defer re-setting client token in makeRequest

* Move legacy logicaltest back to testhelpers

* update mods and test files with go mod tidy

* go mod vendor

* remove relative replace directives

* restore old logical test location

* move declaration to main stepwise file

* remove index var and use i+1

* add testing for write, delete paths of makeRequest

* update stepwise core testing to do request counting

* remove unused methods

* Update sdk/testing/stepwise/stepwise.go

remove dead line

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* Update sdk/testing/stepwise/stepwise.go

fix capitalization in code comment

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* update code comments for SkipTeardown to clarify its use

* update stepwise

Co-authored-by: Michael Golowka <72365+pcman312@users.noreply.github.com>
Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-23 06:01:39 -05:00
..
test-fixtures moved the test cert keys to appropriate test-fixtures folder 2016-02-29 15:49:08 -05:00
api_test.go Redo API locking (#3508) 2017-11-02 09:30:04 -05:00
auth.go Remove RevokePrefix from the API too as we simply do not support it any 2016-04-05 11:00:12 -04:00
auth_token.go Add ability to renew by accessor (#7817) 2019-11-08 11:32:01 -05:00
client.go document response wrapping behavior (#8156) 2020-06-08 10:50:48 -04:00
client_test.go Fix SRV Lookups (#8520) 2020-03-11 14:22:58 +01:00
go.mod VLT091 plugin testing framework stepwise (#9270) 2020-06-23 06:01:39 -05:00
go.sum Move sdk/helper/random -> helper/random (#9226) 2020-06-17 14:24:38 -06:00
help.go Add a deprecated helper to tokenutil and JSON output to path-help (#7006) 2019-06-27 12:56:31 -04:00
lifetime_watcher.go Sync up Agent and API's renewers. (#7733) 2019-10-28 17:28:59 -07:00
logical.go document response wrapping behavior (#8156) 2020-06-08 10:50:48 -04:00
output_string.go Stop some curl whining (#6385) 2019-03-08 14:14:50 -05:00
plugin_helpers.go Fix automatic token set for plugin unwrap requests (#8058) 2020-01-02 10:40:13 +01:00
renewer_test.go Sync up Agent and API's renewers. (#7733) 2019-10-28 17:28:59 -07:00
request.go Fix SRV Lookups (#8520) 2020-03-11 14:22:58 +01:00
request_test.go Clean up request logic and use retryable's more efficient handling (#4670) 2018-06-01 09:12:43 -04:00
response.go API Response returns specialized error type (#6984) 2019-06-26 11:35:08 -07:00
secret.go Added missing entity_id to SecretAuth struct (#6819) 2019-06-04 10:04:20 -07:00
ssh.go API: Add context to each raw request call (#4987) 2018-07-24 15:49:55 -07:00
ssh_agent.go Add namespace parameter to ssh helper config (#9160) 2020-06-08 08:16:03 -07:00
ssh_agent_test.go Fix output-related tests (#4288) 2018-04-05 20:43:29 -04:00
sys.go api: separate sys out further 2015-03-11 17:46:41 -05:00
sys_audit.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
sys_auth.go Batch tokens (#755) 2018-10-15 12:56:24 -04:00
sys_capabilities.go Possibly fix Nomad capabilities issue (#5360) 2018-09-19 13:06:37 -04:00
sys_config_cors.go Remove injection into top routes (#5101) 2018-08-14 15:29:22 -04:00
sys_generate_root.go Recovery Mode (#7559) 2019-10-15 00:55:31 -04:00
sys_health.go Add missing performance_standby field to API 2019-01-17 18:15:00 -05:00
sys_init.go API: Add context to each raw request call (#4987) 2018-07-24 15:49:55 -07:00
sys_leader.go storage/raft: Add committed and applied indexes to the status output (#9011) 2020-05-18 16:07:27 -07:00
sys_leases.go Update API to use lease_id in body of sys/leases/revoke call (#7777) 2019-11-05 16:14:28 -05:00
sys_monitor.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
sys_mounts.go oss changes for entropy augmentation feature (#7670) 2019-10-17 10:33:00 -07:00
sys_plugins.go Added plugin reload function to api (#8777) 2020-05-04 11:14:23 -07:00
sys_policy.go Fix a couple of instances where we are using LIST verb (#6026) 2019-01-10 19:57:00 -05:00
sys_raft.go Handle request errors during raft snapshot (#8861) 2020-04-27 13:39:06 -05:00
sys_rekey.go Fixed wrong rekey recovery backup client API URL (#6841) 2019-06-11 10:05:44 +02:00
sys_rotate.go Remove injection into top routes (#5101) 2018-08-14 15:29:22 -04:00
sys_seal.go expose 'storage_type' on the sys/seal-status endpoint (#7486) 2019-09-18 14:07:18 -05:00
sys_stepdown.go Fix stepdown body closing 2018-08-04 11:50:29 -04:00