-
Notifications
You must be signed in to change notification settings - Fork 155
commands/permissions and commands/permissions_role: add some e2e tests (batch 3) #339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good! Only one question about test isolation
commands/system_e2e_test.go
Outdated
func (s *MmctlE2ETestSuite) TestClearBusyCmd() { | ||
s.SetupEnterpriseTestHelper().InitBasic() | ||
|
||
s.th.App.Srv().Busy.Set(time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum... here I'm leaning more towards enabling this and making sure that it gets disabled with a defer
at the beginning of each test case, to avoid the state to pollute from a test case to the next (as it happens here, as the second TC expects the server to be busy and leaves it busy for a minute).
What do you think about refactoring this so each test case is completely isolated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, makes sense! Will update accordingly 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @isacikgoz - these commands will be tested after merge 👍
Please help add Zephyr (TM4J) test codes to s.Run lines:
* enable ee build for e2e tests * update server dependency * commands/permissions and commands/permissions_role: add some e2e tests (batch 3) (#339) * commands/permissions: add some e2e tests * clear busy status * add test codes * commands/license and commands/ststem: add some e2e tests (batch 4) (#340) * commands/license and commands/ststem: add some e2e tests * remove system_e2e_test.go * add test codes * add system * commands/group, commands/ldap: add e2e tests batch 1 (#337) * commands/group, commands/ldap: add e2e tests batch 1 * reflect revivew comments * commands/group: add e2e tests batch 2 (#338) * commands/group: add e2e tests batch 2 * reflect review comments * add TM4J test codes * add test codes * update v6 * mod vendor * update server dependencies * add ci files (similar to server) * renanme step * fix cp path * fix db driver constant * Enable ee tests (#395) * Fix GitLab side * Update .gitlab-ci.yml Co-authored-by: Elisabeth Kulzer <elikul@elikul.de> Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
* enable ee build for e2e tests * update server dependency * commands/permissions and commands/permissions_role: add some e2e tests (batch 3) (#339) * commands/permissions: add some e2e tests * clear busy status * add test codes * commands/license and commands/ststem: add some e2e tests (batch 4) (#340) * commands/license and commands/ststem: add some e2e tests * remove system_e2e_test.go * add test codes * add system * commands/group, commands/ldap: add e2e tests batch 1 (#337) * commands/group, commands/ldap: add e2e tests batch 1 * reflect revivew comments * commands/group: add e2e tests batch 2 (#338) * commands/group: add e2e tests batch 2 * reflect review comments * add TM4J test codes * add test codes * update v6 * mod vendor * update server dependencies * add ci files (similar to server) * renanme step * fix cp path * fix db driver constant * Enable ee tests (#395) * Fix GitLab side * Update .gitlab-ci.yml Co-authored-by: Elisabeth Kulzer <elikul@elikul.de> Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
* [MM-38097] Update client (#385) * update deps * add human package * fix typo * unskip log tests * mmctl plugin add: introduce optional 'force' flag to allow existing plugins to be replaced (#390) * mmctl plugin add: introduce default-replace 'force' flag This allows users to add a plugin with add-and-replace-if-exists semantics when using the `mmctl plugin add`, by specifying the `--force` flag. This is implemented by calling the `client.UploadPluginForced` function. * Update documentation * Add end-to-end test (test-e2e) coverage for plugin addition in the presence of an existing copy of the plugin * lint fixup: remove unnecessary use of fmt.Sprintf * Remove redundant error string assertion * Clear contents of output printer between repeated 'plugin add' actions * Add output message check for successful forced plugin replacement via 'plugin add' * printer: add pager option (#377) * printer: add pager option * add pager flag * Apply suggestions from code review Co-authored-by: Miguel de la Cruz <miguel@mcrx.me> * add print warning function * Apply suggestions from code review Co-authored-by: Claudio Costa <cstcld91@gmail.com> * reflect review comments * remove progress indicator Co-authored-by: Miguel de la Cruz <miguel@mcrx.me> Co-authored-by: Claudio Costa <cstcld91@gmail.com> * fix a merge error (#396) * Enable ee build for e2e tests (#310) * enable ee build for e2e tests * update server dependency * commands/permissions and commands/permissions_role: add some e2e tests (batch 3) (#339) * commands/permissions: add some e2e tests * clear busy status * add test codes * commands/license and commands/ststem: add some e2e tests (batch 4) (#340) * commands/license and commands/ststem: add some e2e tests * remove system_e2e_test.go * add test codes * add system * commands/group, commands/ldap: add e2e tests batch 1 (#337) * commands/group, commands/ldap: add e2e tests batch 1 * reflect revivew comments * commands/group: add e2e tests batch 2 (#338) * commands/group: add e2e tests batch 2 * reflect review comments * add TM4J test codes * add test codes * update v6 * mod vendor * update server dependencies * add ci files (similar to server) * renanme step * fix cp path * fix db driver constant * Enable ee tests (#395) * Fix GitLab side * Update .gitlab-ci.yml Co-authored-by: Elisabeth Kulzer <elikul@elikul.de> Co-authored-by: Elisabeth Kulzer <elikul@elikul.de> * commands/user: add migrate auth e2e tests (#341) * add arm64 targets and update mm deps to 6.0.2 (#402) * add arm64 targets and update mm deps to 6.0.2 * add vendor * refactor lint job * update deprecated lint * fix lints Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> Co-authored-by: James Addison <james.addison@collabora.com> Co-authored-by: Miguel de la Cruz <miguel@mcrx.me> Co-authored-by: Claudio Costa <cstcld91@gmail.com> Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
Summary
Adds e2e tests for:
showRoleCmdF
addPermissionsCmdF
removePermissionsCmdF
unassignUsersCmdF
Ticket Link