Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault 7721 ElastiCache Acceptance Tests #3

Conversation

maxcoulombe
Copy link
Contributor

Overview

Added a small Terraform project to bootstrap the necessary infrastructure to manually or automatically test the plugin.
Added a suite of acceptance tests that require access to a real ElastiCache instance and AWS account.
Tests are self-cleaning, after a successful run and if the teardown-env command is called there should be 0 leftovers cluttering the test account.
Converted the plugin to multiplexing as we are in the process of converting existing database plugins already.

Contributor Checklist

  • Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet
  • Documentation will be added when the plugin if officially released
  • Add output for any tests not ran in CI to the PR description (eg, acceptance tests)
/usr/local/go/bin/go tool test2json -t /tmp/GoLand/___1redisElastiCacheClient_test_go.test -test.v -test.paniconexit0 -test.run ^\QTest_redisElastiCacheDB_Initialize\E|\QTest_redisElastiCacheDB_NewUser\E|\QTest_redisElastiCacheDB_UpdateUser\E|\QTest_redisElastiCacheDB_DeleteUser\E|\QTest_generateUserId\E$
=== RUN   Test_redisElastiCacheDB_Initialize
--- PASS: Test_redisElastiCacheDB_Initialize (0.85s)
=== RUN   Test_redisElastiCacheDB_Initialize/initialize_and_verify_connection_succeeds
{"@level":"debug","@message":"initializing AWS ElastiCache Redis client","@timestamp":"2022-08-20T12:39:48.938265-04:00"}
{"@level":"debug","@message":"Verifying connection to instance","@timestamp":"2022-08-20T12:39:48.938456-04:00","url":"vault-plugin-elasticache-test.6ylpiw.0001.use1.cache.amazonaws.com:6379"}
    --- PASS: Test_redisElastiCacheDB_Initialize/initialize_and_verify_connection_succeeds (0.24s)
=== RUN   Test_redisElastiCacheDB_Initialize/initialize_with_invalid_config_fails
{"@level":"debug","@message":"initializing AWS ElastiCache Redis client","@timestamp":"2022-08-20T12:39:49.178704-04:00"}
{"@level":"debug","@message":"Verifying connection to instance","@timestamp":"2022-08-20T12:39:49.178843-04:00","url":"wrong"}
    --- PASS: Test_redisElastiCacheDB_Initialize/initialize_with_invalid_config_fails (0.61s)
=== RUN   Test_redisElastiCacheDB_NewUser
{"@level":"debug","@message":"initializing AWS ElastiCache Redis client","@timestamp":"2022-08-20T12:39:49.790740-04:00"}
{"@level":"debug","@message":"Verifying connection to instance","@timestamp":"2022-08-20T12:39:49.790854-04:00","url":"vault-plugin-elasticache-test.6ylpiw.0001.use1.cache.amazonaws.com:6379"}
--- PASS: Test_redisElastiCacheDB_NewUser (1.17s)
=== RUN   Test_redisElastiCacheDB_NewUser/create_new_valid_user_succeeds
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:49.867088-04:00","role":"role"}
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:49.987748-04:00","username":"v_displ_role_6lzm6veqoQBkmpGLegQt_1661013589"}
    --- PASS: Test_redisElastiCacheDB_NewUser/create_new_valid_user_succeeds (0.24s)
=== RUN   Test_redisElastiCacheDB_NewUser/create_new_valid_user_from_multiple_commands
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.102278-04:00","role":"role"}
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.264882-04:00","username":"v_displ_role_zbYKkbR6fnFogmLpKQdv_1661013590"}
    --- PASS: Test_redisElastiCacheDB_NewUser/create_new_valid_user_from_multiple_commands (0.28s)
=== RUN   Test_redisElastiCacheDB_NewUser/create_user_truncates_username
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.380699-04:00","role":"iAmEvenLongerTheApiWillDefinitelyRejectUsIfWeArePassedAsIsWithoutAnyModifications"}
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.485954-04:00","username":"v_iAmSu_iAmEvenLongerTheApiWillDefinitelyReject_8deLZBoaL8x8m64Q5vee_1661013590"}
    --- PASS: Test_redisElastiCacheDB_NewUser/create_user_truncates_username (0.23s)
=== RUN   Test_redisElastiCacheDB_NewUser/create_user_with_invalid_password_fails
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.607468-04:00","role":"role"}
    --- PASS: Test_redisElastiCacheDB_NewUser/create_user_with_invalid_password_fails (0.08s)
=== RUN   Test_redisElastiCacheDB_NewUser/create_user_with_invalid_statements_fails
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:50.692031-04:00","role":"role"}
    --- PASS: Test_redisElastiCacheDB_NewUser/create_user_with_invalid_statements_fails (0.27s)
=== RUN   Test_redisElastiCacheDB_UpdateUser
{"@level":"debug","@message":"initializing AWS ElastiCache Redis client","@timestamp":"2022-08-20T12:39:50.958234-04:00"}
{"@level":"debug","@message":"Verifying connection to instance","@timestamp":"2022-08-20T12:39:50.958376-04:00","url":"vault-plugin-elasticache-test.6ylpiw.0001.use1.cache.amazonaws.com:6379"}
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:51.194431-04:00","role":"role"}
=== CONT  Test_redisElastiCacheDB_UpdateUser
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 2b384415-c226-42c0-b4a6-b1073c454caf; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:54.823352-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 06da40e1-0c70-49b2-a3dd-395b9b8cb0a0; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:58.070864-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 845f1d86-8f92-4f65-8501-461f0c21bcc2; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:01.313745-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 3703628c-fd4b-4d3a-a231-c99d53a7650b; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:04.610381-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 872b70d0-ac82-41a6-8059-122ec4e6a7de; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:07.895447-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 53539280-5ba5-432b-8dd2-f8d614a64043; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:11.274408-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 3c510bae-5193-4f57-83e8-cc66f173af33; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:14.495361-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 4a20c736-e645-4e1f-9cb2-42044ecb6c5b; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:17.829645-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 12dd29ac-55c9-4bf7-93b8-65e07806d2fa; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:21.074314-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 85970133-f583-4bc2-9019-bf32b93fee9a; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:24.318296-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: d7644419-81f6-448f-9d23-c068ffb4fd1e; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:27.538321-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: cc9341a8-3ff5-48c7-9515-bc3ec2261ffb; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:30.758532-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591' due to: unable to delete user: InvalidUserState: User vdisplrolerpvbsyaw8jdpx5d883zl1661013591 has status modifying. Only active users can be deleted.
        	status code: 400, request id: 3de5f9b6-2c3c-43ec-aab0-a3b2c1618df9; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:34.059358-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
--- PASS: Test_redisElastiCacheDB_UpdateUser (43.49s)
=== RUN   Test_redisElastiCacheDB_UpdateUser/update_password_of_existing_user_succeeds
{"@level":"debug","@message":"updating AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:51.298452-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    --- PASS: Test_redisElastiCacheDB_UpdateUser/update_password_of_existing_user_succeeds (0.10s)
=== RUN   Test_redisElastiCacheDB_UpdateUser/update_password_of_non-existing_user_fails
{"@level":"debug","@message":"updating AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:51.398252-04:00","username":"I do not exist"}
    --- PASS: Test_redisElastiCacheDB_UpdateUser/update_password_of_non-existing_user_fails (0.10s)
=== RUN   Test_redisElastiCacheDB_UpdateUser/update_to_invalid_password_fails
{"@level":"debug","@message":"updating AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:51.494593-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:39:51.574992-04:00","username":"v_displ_role_rpVbSyaw8jDPX5D883zL_1661013591"}
    --- PASS: Test_redisElastiCacheDB_UpdateUser/update_to_invalid_password_fails (0.08s)
=== RUN   Test_redisElastiCacheDB_DeleteUser
{"@level":"debug","@message":"initializing AWS ElastiCache Redis client","@timestamp":"2022-08-20T12:40:34.447744-04:00"}
{"@level":"debug","@message":"Verifying connection to instance","@timestamp":"2022-08-20T12:40:34.447913-04:00","url":"vault-plugin-elasticache-test.6ylpiw.0001.use1.cache.amazonaws.com:6379"}
{"@level":"debug","@message":"creating new AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:34.558914-04:00","role":"role"}
=== CONT  Test_redisElastiCacheDB_DeleteUser
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 8be0faa1-8e6e-43fe-acc4-04e75091dfb7; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:38.014380-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: c9c0a4d3-692f-43f8-bbb2-4df330224a4b; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:41.296202-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 6a3ca37b-218c-4066-a2b0-1eeba2b1df06; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:44.566322-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: ca2c1414-7fe1-45e5-8950-0f2cf36b33fa; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:47.814403-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 31f0b08d-7636-4718-987b-8499134b5286; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:51.218293-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 4d92e97d-ad86-4b5e-b793-f2800b313e1d; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:54.518268-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 1c63b9b5-eb16-431c-ab2b-fca1a0931f40; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:57.806217-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 0dff2d34-75bc-4076-8fc5-d586a580ac0b; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:01.083198-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 0059f8f9-f1b0-4d9c-a7c5-13767e3e7616; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:04.450388-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 7c588e52-d579-42e6-a711-137bc322837b; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:07.751254-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 6949bff8-a628-490b-a2bd-a7f2573ca66a; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:10.991424-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: c8da621c-d4e7-4af6-9ac7-4e0a0e1fd720; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:14.266320-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: a24b4c8d-8a76-443a-8000-68f4cdcdd8e6; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:17.517741-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 6c20495e-0b95-4fbb-8b2f-6d0e24058d62; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:20.807864-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: a5f505b8-aa9b-487a-ab10-9502475e40fb; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:24.054298-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 9f7fc90e-a6f9-47c0-9373-e363a2925d20; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:27.298103-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 14126d1d-72b7-4792-8b05-1c3ed181b6b2; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:30.561862-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: ccd943a1-0d02-4c04-89f2-60cf2c0e56e0; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:33.870313-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 84ceaa40-2bf8-4bc9-b9ec-8d1b2233fcf0; retrying
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:41:37.127102-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    redisElastiCacheClient_test.go:120: unable to clean test user 'v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634' due to: unable to delete user: InvalidUserState: User vdisplrole4tidj0wjrnzgntgsovha1661013634 has status deleting. Only active users can be deleted.
        	status code: 400, request id: 0a204460-d89d-48a6-8652-97ba5ad717e8; retrying
--- PASS: Test_redisElastiCacheDB_DeleteUser (66.00s)
=== RUN   Test_redisElastiCacheDB_DeleteUser/delete_existing_user_succeeds
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:34.666782-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    --- PASS: Test_redisElastiCacheDB_DeleteUser/delete_existing_user_succeeds (0.15s)
=== RUN   Test_redisElastiCacheDB_DeleteUser/delete_non-existing_user_fails
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:34.816370-04:00","username":"I do not exist"}
{"@level":"debug","@message":"deleting AWS ElastiCache Redis user","@timestamp":"2022-08-20T12:40:34.918835-04:00","username":"v_displ_role_4tIdj0wjrnzgnTGsOVha_1661013634"}
    --- PASS: Test_redisElastiCacheDB_DeleteUser/delete_non-existing_user_fails (0.10s)
=== RUN   Test_generateUserId
--- PASS: Test_generateUserId (0.00s)
=== RUN   Test_generateUserId/compliant_username
    --- PASS: Test_generateUserId/compliant_username (0.00s)
=== RUN   Test_generateUserId/short_username
    --- PASS: Test_generateUserId/short_username (0.00s)
=== RUN   Test_generateUserId/username_too_long
    --- PASS: Test_generateUserId/username_too_long (0.00s)
=== RUN   Test_generateUserId/username_with_non-alphanumeric_characters
    --- PASS: Test_generateUserId/username_with_non-alphanumeric_characters (0.00s)
=== RUN   Test_generateUserId/username_starting_with_a_number
    --- PASS: Test_generateUserId/username_starting_with_a_number (0.00s)
PASS

Process finished with the exit code 0
  • Backwards compatible

@maxcoulombe maxcoulombe merged commit ecb43aa into vault-7720-ElastiCacheRedisBootstrap Aug 22, 2022
@maxcoulombe maxcoulombe deleted the vault-7721-ElastiCacheAcceptanceTEsts branch August 22, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant