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

DXCDT-600: Show active tenant in auth0 tenants list #910

Merged
merged 9 commits into from
Nov 14, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Nov 13, 2023

🔧 Changes

Adds a tabular structure to the auth0 tenants list command including an indicator for the currently active tenant.

Screenshot 2023-11-13 at 11 54 52 AM

🔬 Testing

Added slightly stronger assertions to the existing test case.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner November 13, 2023 16:45
@@ -86,6 +86,7 @@ func buildRootCmd(cli *cli) *cobra.Command {
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
ansi.Initialize(cli.noColor)
prepareInteractivity(cmd)
cli.configureRenderer()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method mostly serves to attach the active tenant to the renderer struct so that we can make the comparison below. Otherwise, the tenant commands' renderers do not have knowledge of the currently active tenant.

@Widcket
Copy link
Contributor

Widcket commented Nov 13, 2023

Given that there can only be a single active tenant at a time (so only a single among N ), would it make sense to simply append a green, bold current (or (current)) to the domain of the current tenant?

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad469a7) 72.59% compared to head (54c1f1f) 72.58%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #910      +/-   ##
==========================================
- Coverage   72.59%   72.58%   -0.02%     
==========================================
  Files          93       93              
  Lines       12393    12399       +6     
==========================================
+ Hits         8997     9000       +3     
- Misses       2874     2876       +2     
- Partials      522      523       +1     
Files Coverage Δ
internal/cli/root.go 90.90% <100.00%> (ø)
internal/display/tenants.go 77.77% <100.00%> (+6.34%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willvedd willvedd enabled auto-merge (squash) November 14, 2023 15:48
@willvedd willvedd merged commit 2314fe8 into main Nov 14, 2023
8 checks passed
@willvedd willvedd deleted the DXCDT-600-show-active-tenant branch November 14, 2023 17:32
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.

4 participants