opentelekomcloud / vault-plugin-secrets-openstack

Create OpenStack tokens using HashiCorp Vault
Apache License 2.0
23 stars 6 forks source link

Vault: ``static-creds`` implementation #99

Closed artem-lifshits closed 2 years ago

artem-lifshits commented 2 years ago

This PR add static-creds read path and relevant acceptance/unit tests, api documentation. static-roles logic was also updated.

Acceptance tests (failing on unrelated info test):

Running acceptance tests... === RUN TestPlugin === RUN TestPlugin/TestCloudLifecycle === RUN TestPlugin/TestCloudLifecycle/WriteCloud === RUN TestPlugin/TestCloudLifecycle/ReadCloud === RUN TestPlugin/TestCloudLifecycle/ListClouds === RUN TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === PAUSE TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === RUN TestPlugin/TestCloudLifecycle/ListClouds/method-GET === PAUSE TestPlugin/TestCloudLifecycle/ListClouds/method-GET === CONT TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === CONT TestPlugin/TestCloudLifecycle/ListClouds/method-GET === RUN TestPlugin/TestCloudLifecycle/DeleteCloud === RUN TestPlugin/TestCredsLifecycle === RUN TestPlugin/TestCredsLifecycle/root_token === RUN TestPlugin/TestCredsLifecycle/user_token === RUN TestPlugin/TestCredsLifecycle/user_password === RUN TestPlugin/TestInfo info_test.go:42: Error Trace: info_test.go:42 Error: Should NOT be empty, but was &{ } Test: TestPlugin/TestInfo === RUN TestPlugin/TestRoleLifecycle roles_test.go:53: Cloud with name sjz3x3v53l was created === RUN TestPlugin/TestRoleLifecycle/WriteRole === RUN TestPlugin/TestRoleLifecycle/ReadRole === RUN TestPlugin/TestRoleLifecycle/ListRoles === RUN TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === PAUSE TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === RUN TestPlugin/TestRoleLifecycle/ListRoles/method-GET === PAUSE TestPlugin/TestRoleLifecycle/ListRoles/method-GET === CONT TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === CONT TestPlugin/TestRoleLifecycle/ListRoles/method-GET === RUN TestPlugin/TestRoleLifecycle/DeleteRole === CONT TestPlugin/TestRoleLifecycle plugin_test.go:337: Cloud with name sjz3x3v53l has been removed === RUN TestPlugin/TestRootRotate rotate_test.go:65: Cloud with name default1 was created rotate_test.go:68: Cloud with name 9jy7 was created plugin_test.go:337: Cloud with name 9jy7 has been removed plugin_test.go:337: Cloud with name default1 has been removed === RUN TestPlugin/TestStaticCredsLifecycle === RUN TestPlugin/TestStaticCredsLifecycle/user_password === RUN TestPlugin/TestStaticCredsLifecycle/user_token === RUN TestPlugin/TestStaticRoleLifecycle === RUN TestPlugin/TestStaticRoleLifecycle/WriteRole === RUN TestPlugin/TestStaticRoleLifecycle/ReadRole === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === PAUSE TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === PAUSE TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === CONT TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === CONT TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === RUN TestPlugin/TestStaticRoleLifecycle/DeleteRole --- FAIL: TestPlugin (21.57s) --- PASS: TestPlugin/TestCloudLifecycle (0.09s) --- PASS: TestPlugin/TestCloudLifecycle/WriteCloud (0.08s) --- PASS: TestPlugin/TestCloudLifecycle/ReadCloud (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds/method-LIST (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds/method-GET (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/DeleteCloud (0.00s) --- PASS: TestPlugin/TestCredsLifecycle (6.18s) --- PASS: TestPlugin/TestCredsLifecycle/root_token (1.95s) --- PASS: TestPlugin/TestCredsLifecycle/user_token (2.19s) --- PASS: TestPlugin/TestCredsLifecycle/user_password (0.98s) --- FAIL: TestPlugin/TestInfo (0.00s) --- PASS: TestPlugin/TestRoleLifecycle (0.01s) --- PASS: TestPlugin/TestRoleLifecycle/WriteRole (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ReadRole (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles/method-LIST (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles/method-GET (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/DeleteRole (0.00s) --- PASS: TestPlugin/TestRootRotate (5.21s) --- PASS: TestPlugin/TestStaticCredsLifecycle (6.76s) --- PASS: TestPlugin/TestStaticCredsLifecycle/user_password (2.87s) --- PASS: TestPlugin/TestStaticCredsLifecycle/user_token (3.06s) --- PASS: TestPlugin/TestStaticRoleLifecycle (3.17s) --- PASS: TestPlugin/TestStaticRoleLifecycle/WriteRole (1.23s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ReadRole (0.01s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/DeleteRole (0.00s) FAIL FAIL github.com/opentelekomcloud/vault-plugin-secrets-openstack/acceptance 22.159s FAIL make: *** [functional] Error 1

Unit tests:

=== RUN TestBackend_sharedCloud === RUN TestBackend_sharedCloud/existing === RUN TestBackend_sharedCloud/non-existing --- PASS: TestBackend_sharedCloud (0.00s) --- PASS: TestBackend_sharedCloud/existing (0.00s) --- PASS: TestBackend_sharedCloud/non-existing (0.00s) === RUN TestSharedCloud_client === RUN TestSharedCloud_client/existing-client === RUN TestSharedCloud_client/new-client --- PASS: TestSharedCloud_client (0.00s) --- PASS: TestSharedCloud_client/existing-client (0.00s) --- PASS: TestSharedCloud_client/new-client (0.00s) === RUN TestCloudCreate === RUN TestCloudCreate/EmptyConfig === RUN TestCloudCreate/Create === RUN TestCloudCreate/Update === RUN TestCloudCreate/Read === RUN TestCloudCreate/Delete === RUN TestCloudCreate/List --- PASS: TestCloudCreate (0.00s) --- PASS: TestCloudCreate/EmptyConfig (0.00s) --- PASS: TestCloudCreate/Create (0.00s) --- PASS: TestCloudCreate/Update (0.00s) --- PASS: TestCloudCreate/Read (0.00s) --- PASS: TestCloudCreate/Delete (0.00s) --- PASS: TestCloudCreate/List (0.00s) === RUN TestCredentialsRead_ok === RUN TestCredentialsRead_ok/root_token === RUN TestCredentialsRead_ok/user_token === RUN TestCredentialsRead_ok/user_password === RUN TestCredentialsRead_ok/token_revoke === RUN TestCredentialsRead_ok/user_password_revoke --- PASS: TestCredentialsRead_ok (0.01s) --- PASS: TestCredentialsRead_ok/root_token (0.00s) --- PASS: TestCredentialsRead_ok/user_token (0.00s) --- PASS: TestCredentialsRead_ok/user_password (0.00s) --- PASS: TestCredentialsRead_ok/token_revoke (0.00s) --- PASS: TestCredentialsRead_ok/user_password_revoke (0.00s) === RUN TestCredentialsRead_error === RUN TestCredentialsRead_error/read-fail === RUN TestCredentialsRead_error/no-user-post === RUN TestCredentialsRead_error/no-users-token-post --- PASS: TestCredentialsRead_error (0.00s) --- PASS: TestCredentialsRead_error/read-fail (0.00s) --- PASS: TestCredentialsRead_error/no-user-post (0.00s) --- PASS: TestCredentialsRead_error/no-users-token-post (0.00s) === RUN TestCredentialsRevoke_error === RUN TestCredentialsRevoke_error/no-token-delete === RUN TestCredentialsRevoke_error/no-user-delete --- PASS: TestCredentialsRevoke_error (0.00s) --- PASS: TestCredentialsRevoke_error/no-token-delete (0.00s) --- PASS: TestCredentialsRevoke_error/no-user-delete (0.00s) === RUN TestInfoRead === PAUSE TestInfoRead === RUN TestRoleStoragePath --- PASS: TestRoleStoragePath (0.00s) === RUN TestRoleGet === PAUSE TestRoleGet === RUN TestRoleExistence === PAUSE TestRoleExistence === RUN TestRoleList === PAUSE TestRoleList === RUN TestRoleDelete === PAUSE TestRoleDelete === RUN TestRoleCreate === PAUSE TestRoleCreate === RUN TestRoleUpdate === PAUSE TestRoleUpdate === RUN TestRotateRootCredentials_ok --- PASS: TestRotateRootCredentials_ok (0.00s) === RUN TestRotateRootCredentials_error === PAUSE TestRotateRootCredentials_error === RUN TestStaticCredentialsRead_ok === RUN TestStaticCredentialsRead_ok/user_token === RUN TestStaticCredentialsRead_ok/user_password --- PASS: TestStaticCredentialsRead_ok (0.00s) --- PASS: TestStaticCredentialsRead_ok/user_token (0.00s) --- PASS: TestStaticCredentialsRead_ok/user_password (0.00s) === RUN TestStaticCredentialsRead_error === RUN TestStaticCredentialsRead_error/read-fail === RUN TestStaticCredentialsRead_error/no-token-post === RUN TestStaticCredentialsRead_error/no-token-get --- PASS: TestStaticCredentialsRead_error (0.00s) --- PASS: TestStaticCredentialsRead_error/read-fail (0.00s) --- PASS: TestStaticCredentialsRead_error/no-token-post (0.00s) --- PASS: TestStaticCredentialsRead_error/no-token-get (0.00s) === RUN TestStaticRoleStoragePath --- PASS: TestStaticRoleStoragePath (0.00s) === RUN TestStaticRoleGet === PAUSE TestStaticRoleGet === RUN TestStaticRoleExistence === PAUSE TestStaticRoleExistence === RUN TestStaticRoleList === PAUSE TestStaticRoleList === RUN TestStaticRoleDelete === PAUSE TestStaticRoleDelete === RUN TestStaticRoleCreate === PAUSE TestStaticRoleCreate === RUN TestStaticRoleUpdate === PAUSE TestStaticRoleUpdate === CONT TestInfoRead === CONT TestRotateRootCredentials_error === RUN TestRotateRootCredentials_error/read-fail === CONT TestStaticRoleDelete === CONT TestStaticRoleUpdate === CONT TestRoleDelete === RUN TestRoleDelete/existing === CONT TestStaticRoleExistence === CONT TestRoleCreate === CONT TestStaticRoleGet === PAUSE TestRoleDelete/existing === RUN TestRoleDelete/not-existing === CONT TestStaticRoleCreate === RUN TestStaticRoleCreate/ok === PAUSE TestRoleDelete/not-existing === RUN TestStaticRoleExistence/existing === RUN TestStaticRoleCreate/ok/token === PAUSE TestStaticRoleCreate/ok/token === RUN TestStaticRoleCreate/ok/password === PAUSE TestStaticRoleExistence/existing === RUN TestStaticRoleExistence/not-existing === RUN TestStaticRoleUpdate/ok === RUN TestStaticRoleDelete/existing === PAUSE TestStaticRoleDelete/existing === RUN TestRoleCreate/ok --- PASS: TestInfoRead (0.00s) === CONT TestRoleExistence === RUN TestRoleExistence/existing === PAUSE TestRoleExistence/existing === RUN TestRoleExistence/not-existing === PAUSE TestRoleExistence/not-existing === RUN TestRoleExistence/get-err === PAUSE TestRoleExistence/get-err === RUN TestRotateRootCredentials_error/no-change === CONT TestRoleList === RUN TestRoleList/ok === RUN TestStaticRoleGet/existing === RUN TestRoleDelete/error === RUN TestStaticRoleDelete/not-existing === CONT TestRoleUpdate === RUN TestRoleCreate/ok/admin === PAUSE TestRoleCreate/ok/admin === RUN TestRoleCreate/ok/token === PAUSE TestRoleCreate/ok/token === RUN TestRoleCreate/ok/password === PAUSE TestRoleCreate/ok/password === PAUSE TestStaticRoleCreate/ok/password === RUN TestRoleUpdate/ok === RUN TestStaticRoleCreate/ok/rotation_duration === PAUSE TestStaticRoleCreate/ok/rotation_duration === RUN TestStaticRoleCreate/ok/endpoint-override === PAUSE TestStaticRoleCreate/ok/endpoint-override === PAUSE TestStaticRoleExistence/not-existing === RUN TestStaticRoleExistence/get-err === PAUSE TestStaticRoleExistence/get-err === CONT TestRoleGet === RUN TestRoleGet/existing === PAUSE TestRoleGet/existing === RUN TestRoleGet/not-existing === PAUSE TestRoleGet/not-existing === RUN TestRoleGet/get-err === PAUSE TestRoleGet/get-err === PAUSE TestStaticRoleGet/existing === RUN TestStaticRoleGet/not-existing === PAUSE TestStaticRoleGet/not-existing === RUN TestRoleList/error === CONT TestRoleExistence/existing === PAUSE TestRoleList/error === RUN TestRoleList/filter === PAUSE TestRoleList/filter === RUN TestRoleList/filter-get-err === PAUSE TestRoleList/filter-get-err === RUN TestStaticRoleGet/get-err === PAUSE TestStaticRoleGet/get-err === CONT TestRoleExistence/get-err === RUN TestStaticRoleUpdate/not-existing === CONT TestStaticRoleCreate/ok/token === PAUSE TestStaticRoleDelete/not-existing === RUN TestStaticRoleDelete/error === PAUSE TestStaticRoleDelete/error === RUN TestStaticRoleDelete/error-get === RUN TestRoleUpdate/not-existing === RUN TestRoleCreate/ok/ttl === PAUSE TestRoleCreate/ok/ttl === RUN TestRoleCreate/ok/endpoint-override === PAUSE TestRoleCreate/ok/endpoint-override === CONT TestRoleGet/existing === CONT TestRoleExistence/not-existing === PAUSE TestRoleDelete/error === RUN TestRoleDelete/error-get === PAUSE TestRoleDelete/error-get --- PASS: TestStaticRoleUpdate (0.00s) --- PASS: TestStaticRoleUpdate/ok (0.00s) --- PASS: TestStaticRoleUpdate/not-existing (0.00s) === CONT TestStaticRoleCreate/ok/rotation_duration --- PASS: TestRoleUpdate (0.00s) --- PASS: TestRoleUpdate/ok (0.00s) --- PASS: TestRoleUpdate/not-existing (0.00s) === CONT TestStaticRoleExistence/not-existing --- PASS: TestRoleExistence (0.00s) --- PASS: TestRoleExistence/get-err (0.00s) --- PASS: TestRoleExistence/existing (0.00s) --- PASS: TestRoleExistence/not-existing (0.00s) === CONT TestRoleList/error === CONT TestStaticRoleExistence/get-err === CONT TestStaticRoleGet/existing === CONT TestStaticRoleExistence/existing === CONT TestRoleGet/get-err === CONT TestStaticRoleList === CONT TestStaticRoleCreate/ok/password === CONT TestStaticRoleCreate/ok/endpoint-override === CONT TestRoleGet/not-existing === RUN TestStaticRoleList/ok === CONT TestRoleCreate/ok/admin === CONT TestRoleList/filter-get-err === RUN TestStaticRoleList/error === PAUSE TestStaticRoleList/error === RUN TestStaticRoleList/filter === PAUSE TestStaticRoleList/filter === RUN TestStaticRoleList/filter-get-err === PAUSE TestStaticRoleList/filter-get-err === CONT TestRoleList/filter --- PASS: TestStaticRoleExistence (0.00s) --- PASS: TestStaticRoleExistence/not-existing (0.00s) --- PASS: TestStaticRoleExistence/get-err (0.00s) --- PASS: TestStaticRoleExistence/existing (0.00s) === CONT TestStaticRoleGet/not-existing === CONT TestStaticRoleGet/get-err === CONT TestRoleCreate/ok/ttl === CONT TestRoleCreate/ok/endpoint-override --- PASS: TestRoleList (0.00s) --- PASS: TestRoleList/ok (0.00s) --- PASS: TestRoleList/error (0.00s) --- PASS: TestRoleList/filter-get-err (0.00s) --- PASS: TestRoleList/filter (0.00s) === CONT TestRoleCreate/ok/password === CONT TestRoleCreate/ok/token === CONT TestRoleDelete/existing --- PASS: TestStaticRoleGet (0.00s) --- PASS: TestStaticRoleGet/existing (0.00s) --- PASS: TestStaticRoleGet/get-err (0.00s) --- PASS: TestStaticRoleGet/not-existing (0.00s) === CONT TestStaticRoleDelete/existing === CONT TestRoleDelete/error === CONT TestRoleDelete/not-existing === CONT TestStaticRoleDelete/not-existing === CONT TestRoleDelete/error-get === CONT TestStaticRoleDelete/error --- PASS: TestRoleGet (0.00s) --- PASS: TestRoleGet/existing (0.00s) --- PASS: TestRoleGet/get-err (0.00s) --- PASS: TestRoleGet/not-existing (0.00s) === CONT TestStaticRoleList/error === CONT TestStaticRoleList/filter-get-err === CONT TestStaticRoleList/filter === RUN TestRoleCreate/error --- PASS: TestRoleDelete (0.00s) --- PASS: TestRoleDelete/existing (0.00s) --- PASS: TestRoleDelete/error (0.00s) --- PASS: TestRoleDelete/error-get (0.00s) --- PASS: TestRoleDelete/not-existing (0.00s) === RUN TestRoleCreate/error/root-ttl --- PASS: TestStaticRoleDelete (0.00s) --- PASS: TestStaticRoleDelete/error-get (0.00s) --- PASS: TestStaticRoleDelete/existing (0.00s) --- PASS: TestStaticRoleDelete/not-existing (0.00s) --- PASS: TestStaticRoleDelete/error (0.00s) === PAUSE TestRoleCreate/error/root-ttl === RUN TestRoleCreate/error/root-password === PAUSE TestRoleCreate/error/root-password === RUN TestRoleCreate/error/root-user-groups === PAUSE TestRoleCreate/error/root-user-groups === RUN TestRoleCreate/error/root-user-roles === PAUSE TestRoleCreate/error/root-user-roles === RUN TestRoleCreate/error/without-cloud === PAUSE TestRoleCreate/error/without-cloud === CONT TestRoleCreate/error/root-ttl === CONT TestRoleCreate/error/without-cloud --- PASS: TestStaticRoleList (0.00s) --- PASS: TestStaticRoleList/ok (0.00s) --- PASS: TestStaticRoleList/error (0.00s) --- PASS: TestStaticRoleList/filter-get-err (0.00s) --- PASS: TestStaticRoleList/filter (0.00s) === CONT TestRoleCreate/error/root-user-groups === CONT TestRoleCreate/error/root-password === CONT TestRoleCreate/error/root-user-roles === RUN TestRoleCreate/not-existing-cloud === PAUSE TestRoleCreate/not-existing-cloud === RUN TestRoleCreate/save-store-err === PAUSE TestRoleCreate/save-store-err === CONT TestRoleCreate/not-existing-cloud === CONT TestRoleCreate/save-store-err --- PASS: TestRoleCreate (0.00s) --- PASS: TestRoleCreate/ok (0.00s) --- PASS: TestRoleCreate/ok/admin (0.00s) --- PASS: TestRoleCreate/ok/ttl (0.00s) --- PASS: TestRoleCreate/ok/endpoint-override (0.00s) --- PASS: TestRoleCreate/ok/password (0.00s) --- PASS: TestRoleCreate/ok/token (0.00s) --- PASS: TestRoleCreate/error (0.00s) --- PASS: TestRoleCreate/error/root-ttl (0.00s) --- PASS: TestRoleCreate/error/without-cloud (0.00s) --- PASS: TestRoleCreate/error/root-user-groups (0.00s) --- PASS: TestRoleCreate/error/root-user-roles (0.00s) --- PASS: TestRoleCreate/error/root-password (0.00s) --- PASS: TestRoleCreate/save-store-err (0.00s) --- PASS: TestRoleCreate/not-existing-cloud (0.00s) === RUN TestRotateRootCredentials_error/no-post === RUN TestRotateRootCredentials_error/no-get --- PASS: TestRotateRootCredentials_error (0.01s) --- PASS: TestRotateRootCredentials_error/read-fail (0.00s) --- PASS: TestRotateRootCredentials_error/no-change (0.00s) --- PASS: TestRotateRootCredentials_error/no-post (0.00s) --- PASS: TestRotateRootCredentials_error/no-get (0.00s) === RUN TestStaticRoleCreate/error === RUN TestStaticRoleCreate/error/username === PAUSE TestStaticRoleCreate/error/username === RUN TestStaticRoleCreate/error/without-cloud === PAUSE TestStaticRoleCreate/error/without-cloud === CONT TestStaticRoleCreate/error/username === CONT TestStaticRoleCreate/error/without-cloud === RUN TestStaticRoleCreate/not-existing-cloud === PAUSE TestStaticRoleCreate/not-existing-cloud === RUN TestStaticRoleCreate/save-store-err === PAUSE TestStaticRoleCreate/save-store-err === CONT TestStaticRoleCreate/not-existing-cloud === CONT TestStaticRoleCreate/save-store-err --- PASS: TestStaticRoleCreate (0.01s) --- PASS: TestStaticRoleCreate/ok (0.00s) --- PASS: TestStaticRoleCreate/ok/token (0.00s) --- PASS: TestStaticRoleCreate/ok/rotation_duration (0.00s) --- PASS: TestStaticRoleCreate/ok/password (0.00s) --- PASS: TestStaticRoleCreate/ok/endpoint-override (0.00s) --- PASS: TestStaticRoleCreate/error (0.00s) --- PASS: TestStaticRoleCreate/error/username (0.00s) --- PASS: TestStaticRoleCreate/error/without-cloud (0.00s) --- PASS: TestStaticRoleCreate/save-store-err (0.00s) --- PASS: TestStaticRoleCreate/not-existing-cloud (0.00s) PASS ok github.com/opentelekomcloud/vault-plugin-secrets-openstack/openstack 0.404s ? github.com/opentelekomcloud/vault-plugin-secrets-openstack/openstack/fixtures [no test files]

Process finished with the exit code 0

artem-lifshits commented 2 years ago

UNIT TESTS:


=== RUN TestBackend_sharedCloud === RUN TestBackend_sharedCloud/existing === RUN TestBackend_sharedCloud/non-existing --- PASS: TestBackend_sharedCloud (0.00s) --- PASS: TestBackend_sharedCloud/existing (0.00s) --- PASS: TestBackend_sharedCloud/non-existing (0.00s) === RUN TestSharedCloud_client === RUN TestSharedCloud_client/existing-client === RUN TestSharedCloud_client/new-client --- PASS: TestSharedCloud_client (0.00s) --- PASS: TestSharedCloud_client/existing-client (0.00s) --- PASS: TestSharedCloud_client/new-client (0.00s) === RUN TestCloudCreate === RUN TestCloudCreate/EmptyConfig === RUN TestCloudCreate/Create === RUN TestCloudCreate/Update === RUN TestCloudCreate/Read === RUN TestCloudCreate/Delete === RUN TestCloudCreate/List --- PASS: TestCloudCreate (0.00s) --- PASS: TestCloudCreate/EmptyConfig (0.00s) --- PASS: TestCloudCreate/Create (0.00s) --- PASS: TestCloudCreate/Update (0.00s) --- PASS: TestCloudCreate/Read (0.00s) --- PASS: TestCloudCreate/Delete (0.00s) --- PASS: TestCloudCreate/List (0.00s) === RUN TestCredentialsRead_ok === RUN TestCredentialsRead_ok/root_token === RUN TestCredentialsRead_ok/user_token === RUN TestCredentialsRead_ok/user_password === RUN TestCredentialsRead_ok/token_revoke === RUN TestCredentialsRead_ok/user_password_revoke --- PASS: TestCredentialsRead_ok (0.01s) --- PASS: TestCredentialsRead_ok/root_token (0.00s) --- PASS: TestCredentialsRead_ok/user_token (0.00s) --- PASS: TestCredentialsRead_ok/user_password (0.00s) --- PASS: TestCredentialsRead_ok/token_revoke (0.00s) --- PASS: TestCredentialsRead_ok/user_password_revoke (0.00s) === RUN TestCredentialsRead_error === RUN TestCredentialsRead_error/read-fail === RUN TestCredentialsRead_error/no-user-post === RUN TestCredentialsRead_error/no-users-token-post --- PASS: TestCredentialsRead_error (0.00s) --- PASS: TestCredentialsRead_error/read-fail (0.00s) --- PASS: TestCredentialsRead_error/no-user-post (0.00s) --- PASS: TestCredentialsRead_error/no-users-token-post (0.00s) === RUN TestCredentialsRevoke_error === RUN TestCredentialsRevoke_error/no-user-delete === RUN TestCredentialsRevoke_error/no-token-delete --- PASS: TestCredentialsRevoke_error (0.00s) --- PASS: TestCredentialsRevoke_error/no-user-delete (0.00s) --- PASS: TestCredentialsRevoke_error/no-token-delete (0.00s) === RUN TestInfoRead === PAUSE TestInfoRead === RUN TestRoleStoragePath --- PASS: TestRoleStoragePath (0.00s) === RUN TestRoleGet === PAUSE TestRoleGet === RUN TestRoleExistence === PAUSE TestRoleExistence === RUN TestRoleList === PAUSE TestRoleList === RUN TestRoleDelete === PAUSE TestRoleDelete === RUN TestRoleCreate === PAUSE TestRoleCreate === RUN TestRoleUpdate === PAUSE TestRoleUpdate === RUN TestRotateRootCredentials_ok --- PASS: TestRotateRootCredentials_ok (0.00s) === RUN TestRotateRootCredentials_error === PAUSE TestRotateRootCredentials_error === RUN TestStaticCredentialsRead_ok === RUN TestStaticCredentialsRead_ok/user_token === RUN TestStaticCredentialsRead_ok/user_password --- PASS: TestStaticCredentialsRead_ok (0.00s) --- PASS: TestStaticCredentialsRead_ok/user_token (0.00s) --- PASS: TestStaticCredentialsRead_ok/user_password (0.00s) === RUN TestStaticCredentialsRead_error === RUN TestStaticCredentialsRead_error/read-fail === RUN TestStaticCredentialsRead_error/no-token-post === RUN TestStaticCredentialsRead_error/no-token-get --- PASS: TestStaticCredentialsRead_error (0.00s) --- PASS: TestStaticCredentialsRead_error/read-fail (0.00s) --- PASS: TestStaticCredentialsRead_error/no-token-post (0.00s) --- PASS: TestStaticCredentialsRead_error/no-token-get (0.00s) === RUN TestStaticRoleStoragePath --- PASS: TestStaticRoleStoragePath (0.00s) === RUN TestStaticRoleGet === PAUSE TestStaticRoleGet === RUN TestStaticRoleExistence === PAUSE TestStaticRoleExistence === RUN TestStaticRoleList === PAUSE TestStaticRoleList === RUN TestStaticRoleDelete === PAUSE TestStaticRoleDelete === RUN TestStaticRoleCreate === PAUSE TestStaticRoleCreate === RUN TestStaticRoleUpdate === PAUSE TestStaticRoleUpdate === CONT TestInfoRead === CONT TestRotateRootCredentials_error === CONT TestStaticRoleDelete === CONT TestStaticRoleExistence === CONT TestStaticRoleGet === CONT TestStaticRoleUpdate === RUN TestStaticRoleDelete/existing === PAUSE TestStaticRoleDelete/existing === RUN TestStaticRoleDelete/not-existing === RUN TestStaticRoleExistence/existing === RUN TestStaticRoleGet/existing === PAUSE TestStaticRoleDelete/not-existing --- PASS: TestInfoRead (0.00s) === CONT TestStaticRoleCreate === RUN TestStaticRoleCreate/ok === RUN TestStaticRoleDelete/error === RUN TestStaticRoleCreate/ok/token === PAUSE TestStaticRoleDelete/error === PAUSE TestStaticRoleCreate/ok/token === RUN TestStaticRoleCreate/ok/password === PAUSE TestStaticRoleCreate/ok/password === RUN TestStaticRoleCreate/ok/rotation_duration === PAUSE TestStaticRoleCreate/ok/rotation_duration === CONT TestRoleDelete === RUN TestRoleDelete/existing === CONT TestStaticRoleList === RUN TestStaticRoleList/ok === CONT TestRoleUpdate === CONT TestRoleCreate === RUN TestRoleCreate/ok === RUN TestRotateRootCredentials_error/read-fail === PAUSE TestStaticRoleGet/existing === RUN TestStaticRoleUpdate/ok === PAUSE TestStaticRoleExistence/existing === RUN TestStaticRoleDelete/error-get === RUN TestStaticRoleCreate/ok/endpoint-override === PAUSE TestRoleDelete/existing === RUN TestRoleUpdate/ok === PAUSE TestStaticRoleCreate/ok/endpoint-override === RUN TestStaticRoleGet/not-existing === RUN TestRoleCreate/ok/token === PAUSE TestStaticRoleGet/not-existing === RUN TestStaticRoleGet/get-err === PAUSE TestRoleCreate/ok/token === PAUSE TestStaticRoleGet/get-err === PAUSE TestStaticRoleDelete/error-get === CONT TestRoleExistence === RUN TestRoleExistence/existing === PAUSE TestRoleExistence/existing === RUN TestRoleExistence/not-existing === PAUSE TestRoleExistence/not-existing === RUN TestRoleExistence/get-err === PAUSE TestRoleExistence/get-err === CONT TestRoleGet === RUN TestRoleGet/existing === PAUSE TestRoleGet/existing === RUN TestRoleGet/not-existing === PAUSE TestRoleGet/not-existing === RUN TestRoleGet/get-err === PAUSE TestRoleGet/get-err === CONT TestRoleList === RUN TestRoleList/ok === RUN TestRoleList/error === PAUSE TestRoleList/error === RUN TestRoleList/filter === PAUSE TestRoleList/filter === RUN TestRoleList/filter-get-err === PAUSE TestRoleList/filter-get-err === RUN TestStaticRoleExistence/not-existing === PAUSE TestStaticRoleExistence/not-existing === RUN TestStaticRoleExistence/get-err === PAUSE TestStaticRoleExistence/get-err === CONT TestStaticRoleCreate/ok/password === RUN TestRoleDelete/not-existing === PAUSE TestRoleDelete/not-existing === RUN TestRoleDelete/error === PAUSE TestRoleDelete/error === RUN TestRoleDelete/error-get === PAUSE TestRoleDelete/error-get === CONT TestStaticRoleDelete/existing === RUN TestRoleCreate/ok/password === PAUSE TestRoleCreate/ok/password === RUN TestRoleCreate/ok/ttl === PAUSE TestRoleCreate/ok/ttl === RUN TestRoleCreate/ok/endpoint-override === PAUSE TestRoleCreate/ok/endpoint-override === RUN TestRoleCreate/ok/admin === RUN TestStaticRoleList/error === CONT TestRoleExistence/existing === PAUSE TestStaticRoleList/error === RUN TestStaticRoleList/filter === PAUSE TestStaticRoleList/filter === RUN TestStaticRoleList/filter-get-err === RUN TestRotateRootCredentials_error/no-post === RUN TestRoleUpdate/not-existing === CONT TestStaticRoleCreate/ok/endpoint-override === PAUSE TestRoleCreate/ok/admin === PAUSE TestStaticRoleList/filter-get-err === CONT TestStaticRoleGet/existing === CONT TestStaticRoleCreate/ok/rotation_duration === RUN TestStaticRoleUpdate/not-existing === CONT TestStaticRoleDelete/error-get === CONT TestStaticRoleCreate/ok/token --- PASS: TestRoleUpdate (0.00s) --- PASS: TestRoleUpdate/ok (0.00s) --- PASS: TestRoleUpdate/not-existing (0.00s) === CONT TestStaticRoleDelete/error === CONT TestStaticRoleDelete/not-existing === CONT TestStaticRoleGet/get-err === CONT TestRoleExistence/get-err === CONT TestStaticRoleGet/not-existing --- PASS: TestStaticRoleDelete (0.00s) --- PASS: TestStaticRoleDelete/existing (0.00s) --- PASS: TestStaticRoleDelete/error-get (0.00s) --- PASS: TestStaticRoleDelete/not-existing (0.00s) --- PASS: TestStaticRoleDelete/error (0.00s) === CONT TestRoleExistence/not-existing --- PASS: TestStaticRoleUpdate (0.00s) --- PASS: TestStaticRoleUpdate/ok (0.00s) --- PASS: TestStaticRoleUpdate/not-existing (0.00s) === CONT TestRoleGet/existing --- PASS: TestRoleExistence (0.00s) --- PASS: TestRoleExistence/existing (0.00s) --- PASS: TestRoleExistence/get-err (0.00s) --- PASS: TestRoleExistence/not-existing (0.00s) === CONT TestRoleGet/not-existing === CONT TestRoleList/error --- PASS: TestStaticRoleGet (0.00s) --- PASS: TestStaticRoleGet/get-err (0.00s) --- PASS: TestStaticRoleGet/existing (0.00s) --- PASS: TestStaticRoleGet/not-existing (0.00s) === CONT TestStaticRoleExistence/existing === CONT TestRoleGet/get-err === CONT TestRoleList/filter === CONT TestRoleDelete/existing === CONT TestRoleList/filter-get-err --- PASS: TestRoleGet (0.00s) --- PASS: TestRoleGet/existing (0.00s) --- PASS: TestRoleGet/not-existing (0.00s) --- PASS: TestRoleGet/get-err (0.00s) === CONT TestStaticRoleExistence/not-existing === CONT TestRoleDelete/not-existing === CONT TestRoleDelete/error === CONT TestStaticRoleExistence/get-err === CONT TestRoleDelete/error-get --- PASS: TestRoleList (0.00s) --- PASS: TestRoleList/ok (0.00s) --- PASS: TestRoleList/error (0.00s) --- PASS: TestRoleList/filter (0.00s) --- PASS: TestRoleList/filter-get-err (0.00s) === CONT TestRoleCreate/ok/token --- PASS: TestStaticRoleExistence (0.00s) --- PASS: TestStaticRoleExistence/existing (0.00s) --- PASS: TestStaticRoleExistence/not-existing (0.00s) --- PASS: TestStaticRoleExistence/get-err (0.00s) === CONT TestRoleCreate/ok/endpoint-override === CONT TestRoleCreate/ok/ttl === CONT TestRoleCreate/ok/admin --- PASS: TestRoleDelete (0.00s) --- PASS: TestRoleDelete/existing (0.00s) --- PASS: TestRoleDelete/not-existing (0.00s) --- PASS: TestRoleDelete/error (0.00s) --- PASS: TestRoleDelete/error-get (0.00s) === CONT TestStaticRoleList/error === CONT TestStaticRoleList/filter-get-err === CONT TestStaticRoleList/filter === CONT TestRoleCreate/ok/password --- PASS: TestStaticRoleList (0.00s) --- PASS: TestStaticRoleList/ok (0.00s) --- PASS: TestStaticRoleList/error (0.00s) --- PASS: TestStaticRoleList/filter-get-err (0.00s) --- PASS: TestStaticRoleList/filter (0.00s) === RUN TestRotateRootCredentials_error/no-get === RUN TestRoleCreate/error === RUN TestRoleCreate/error/root-password === PAUSE TestRoleCreate/error/root-password === RUN TestRoleCreate/error/root-user-groups === PAUSE TestRoleCreate/error/root-user-groups === RUN TestRoleCreate/error/root-user-roles === PAUSE TestRoleCreate/error/root-user-roles === RUN TestRoleCreate/error/without-cloud === PAUSE TestRoleCreate/error/without-cloud === RUN TestRoleCreate/error/root-ttl === PAUSE TestRoleCreate/error/root-ttl === CONT TestRoleCreate/error/root-password === CONT TestRoleCreate/error/root-ttl === CONT TestRoleCreate/error/root-user-roles === CONT TestRoleCreate/error/root-user-groups === CONT TestRoleCreate/error/without-cloud === RUN TestRoleCreate/not-existing-cloud === PAUSE TestRoleCreate/not-existing-cloud === RUN TestRoleCreate/save-store-err === PAUSE TestRoleCreate/save-store-err === CONT TestRoleCreate/not-existing-cloud === CONT TestRoleCreate/save-store-err --- PASS: TestRoleCreate (0.01s) --- PASS: TestRoleCreate/ok (0.00s) --- PASS: TestRoleCreate/ok/token (0.00s) --- PASS: TestRoleCreate/ok/admin (0.00s) --- PASS: TestRoleCreate/ok/endpoint-override (0.00s) --- PASS: TestRoleCreate/ok/password (0.00s) --- PASS: TestRoleCreate/ok/ttl (0.00s) --- PASS: TestRoleCreate/error (0.00s) --- PASS: TestRoleCreate/error/root-password (0.00s) --- PASS: TestRoleCreate/error/root-ttl (0.00s) --- PASS: TestRoleCreate/error/root-user-roles (0.00s) --- PASS: TestRoleCreate/error/without-cloud (0.00s) --- PASS: TestRoleCreate/error/root-user-groups (0.00s) --- PASS: TestRoleCreate/save-store-err (0.00s) --- PASS: TestRoleCreate/not-existing-cloud (0.00s) === RUN TestRotateRootCredentials_error/no-change --- PASS: TestRotateRootCredentials_error (0.01s) --- PASS: TestRotateRootCredentials_error/read-fail (0.00s) --- PASS: TestRotateRootCredentials_error/no-post (0.00s) --- PASS: TestRotateRootCredentials_error/no-get (0.00s) --- PASS: TestRotateRootCredentials_error/no-change (0.00s) === RUN TestStaticRoleCreate/error === RUN TestStaticRoleCreate/error/username === PAUSE TestStaticRoleCreate/error/username === RUN TestStaticRoleCreate/error/without-cloud === PAUSE TestStaticRoleCreate/error/without-cloud === CONT TestStaticRoleCreate/error/username === CONT TestStaticRoleCreate/error/without-cloud === RUN TestStaticRoleCreate/not-existing-cloud === PAUSE TestStaticRoleCreate/not-existing-cloud === RUN TestStaticRoleCreate/save-store-err === PAUSE TestStaticRoleCreate/save-store-err === CONT TestStaticRoleCreate/not-existing-cloud === CONT TestStaticRoleCreate/save-store-err --- PASS: TestStaticRoleCreate (0.01s) --- PASS: TestStaticRoleCreate/ok (0.00s) --- PASS: TestStaticRoleCreate/ok/password (0.01s) --- PASS: TestStaticRoleCreate/ok/endpoint-override (0.00s) --- PASS: TestStaticRoleCreate/ok/rotation_duration (0.00s) --- PASS: TestStaticRoleCreate/ok/token (0.01s) --- PASS: TestStaticRoleCreate/error (0.00s) --- PASS: TestStaticRoleCreate/error/username (0.00s) --- PASS: TestStaticRoleCreate/error/without-cloud (0.00s) --- PASS: TestStaticRoleCreate/save-store-err (0.00s) --- PASS: TestStaticRoleCreate/not-existing-cloud (0.00s) PASS ok github.com/opentelekomcloud/vault-plugin-secrets-openstack/openstack (cached) ? github.com/opentelekomcloud/vault-plugin-secrets-openstack/openstack/fixtures [no test files]

Process finished with the exit code 0

ACCEPTANCE TESTS:


Running acceptance tests... === RUN TestPlugin === RUN TestPlugin/TestCloudLifecycle === RUN TestPlugin/TestCloudLifecycle/WriteCloud === RUN TestPlugin/TestCloudLifecycle/ReadCloud === RUN TestPlugin/TestCloudLifecycle/ListClouds === RUN TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === PAUSE TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === RUN TestPlugin/TestCloudLifecycle/ListClouds/method-GET === PAUSE TestPlugin/TestCloudLifecycle/ListClouds/method-GET === CONT TestPlugin/TestCloudLifecycle/ListClouds/method-LIST === CONT TestPlugin/TestCloudLifecycle/ListClouds/method-GET === RUN TestPlugin/TestCloudLifecycle/DeleteCloud === RUN TestPlugin/TestCredsLifecycle === RUN TestPlugin/TestCredsLifecycle/root_token === RUN TestPlugin/TestCredsLifecycle/user_token === RUN TestPlugin/TestCredsLifecycle/user_password === RUN TestPlugin/TestInfo info_test.go:42: Error Trace: info_test.go:42 Error: Should NOT be empty, but was &{ } Test: TestPlugin/TestInfo === RUN TestPlugin/TestRoleLifecycle roles_test.go:53: Cloud with name sd91veye0k was created === RUN TestPlugin/TestRoleLifecycle/WriteRole === RUN TestPlugin/TestRoleLifecycle/ReadRole === RUN TestPlugin/TestRoleLifecycle/ListRoles === RUN TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === PAUSE TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === RUN TestPlugin/TestRoleLifecycle/ListRoles/method-GET === PAUSE TestPlugin/TestRoleLifecycle/ListRoles/method-GET === CONT TestPlugin/TestRoleLifecycle/ListRoles/method-LIST === CONT TestPlugin/TestRoleLifecycle/ListRoles/method-GET === RUN TestPlugin/TestRoleLifecycle/DeleteRole === CONT TestPlugin/TestRoleLifecycle plugin_test.go:337: Cloud with name sd91veye0k has been removed === RUN TestPlugin/TestRootRotate rotate_test.go:65: Cloud with name default1 was created rotate_test.go:68: Cloud with name k9tn was created plugin_test.go:337: Cloud with name k9tn has been removed plugin_test.go:337: Cloud with name default1 has been removed === RUN TestPlugin/TestStaticCredsLifecycle === RUN TestPlugin/TestStaticCredsLifecycle/user_password === RUN TestPlugin/TestStaticCredsLifecycle/user_token === RUN TestPlugin/TestStaticRoleLifecycle === RUN TestPlugin/TestStaticRoleLifecycle/WriteRole === RUN TestPlugin/TestStaticRoleLifecycle/ReadRole === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === PAUSE TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === RUN TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === PAUSE TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === CONT TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST === CONT TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET === RUN TestPlugin/TestStaticRoleLifecycle/DeleteRole --- FAIL: TestPlugin (22.00s) --- PASS: TestPlugin/TestCloudLifecycle (0.09s) --- PASS: TestPlugin/TestCloudLifecycle/WriteCloud (0.09s) --- PASS: TestPlugin/TestCloudLifecycle/ReadCloud (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds/method-GET (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/ListClouds/method-LIST (0.00s) --- PASS: TestPlugin/TestCloudLifecycle/DeleteCloud (0.00s) --- PASS: TestPlugin/TestCredsLifecycle (6.35s) --- PASS: TestPlugin/TestCredsLifecycle/root_token (2.06s) --- PASS: TestPlugin/TestCredsLifecycle/user_token (2.14s) --- PASS: TestPlugin/TestCredsLifecycle/user_password (1.09s) --- FAIL: TestPlugin/TestInfo (0.00s) --- PASS: TestPlugin/TestRoleLifecycle (0.02s) --- PASS: TestPlugin/TestRoleLifecycle/WriteRole (0.01s) --- PASS: TestPlugin/TestRoleLifecycle/ReadRole (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles/method-LIST (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/ListRoles/method-GET (0.00s) --- PASS: TestPlugin/TestRoleLifecycle/DeleteRole (0.00s) --- PASS: TestPlugin/TestRootRotate (5.56s) --- PASS: TestPlugin/TestStaticCredsLifecycle (6.65s) --- PASS: TestPlugin/TestStaticCredsLifecycle/user_password (2.53s) --- PASS: TestPlugin/TestStaticCredsLifecycle/user_token (2.96s) --- PASS: TestPlugin/TestStaticRoleLifecycle (3.17s) --- PASS: TestPlugin/TestStaticRoleLifecycle/WriteRole (1.13s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ReadRole (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles/method-GET (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/ListRoles/method-LIST (0.00s) --- PASS: TestPlugin/TestStaticRoleLifecycle/DeleteRole (0.00s) FAIL FAIL github.com/opentelekomcloud/vault-plugin-secrets-openstack/acceptance 22.629s FAIL make: *** [functional] Error 1

outcatcher commented 2 years ago

UNIT TESTS:

Aren't they run by CI?

artem-lifshits commented 2 years ago

@outcatcher I'm not sure, Rodion pasted at least Unit results on PR requests...

otc-zuul[bot] commented 2 years ago

Build succeeded. https://zuul.otc-service.com/t/eco/buildset/c422d96d37bd49fca073df33b05a5ff1

:heavy_check_mark: build-sphinx-docs SUCCESS in 3m 32s :heavy_check_mark: otc-golangci-lint SUCCESS in 1m 58s :heavy_check_mark: golang-make-vet SUCCESS in 2m 12s :heavy_check_mark: golang-make-test SUCCESS in 2m 04s :heavy_check_mark: goreleaser-build SUCCESS in 4m 24s

outcatcher commented 2 years ago

@outcatcher I'm not sure, Rodion pasted at least Unit results on PR requests...

@artem-lifshits it's not required if test you run is already in CI :slightly_smiling_face: