Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
janelletavares committed Feb 8, 2022
1 parent ef6a1fe commit b2d535f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
3 changes: 1 addition & 2 deletions cmd/meroxa/root/environments/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ import (
"errors"
"fmt"

"github.com/meroxa/cli/utils"

"github.com/meroxa/cli/cmd/meroxa/builder"
"github.com/meroxa/cli/log"
"github.com/meroxa/cli/utils"
"github.com/meroxa/meroxa-go/pkg/meroxa"
)

Expand Down
2 changes: 1 addition & 1 deletion utils/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ func EnvironmentTable(environment *meroxa.Environment) string {
{Text: ""},
},
{
{Align: simpletable.AlignRight, Text: " AWS EC2 Permissions Status:"},
{Align: simpletable.AlignRight, Text: "AWS EC2 Permissions Status:"},
{Text: strings.Join(environment.Status.PreflightDetails.PreflightPermissions.EC2, " ; ")},
},
{
Expand Down
23 changes: 2 additions & 21 deletions utils/display_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,29 +599,10 @@ func TestEnvironmentsTable(t *testing.T) {
}

func TestEnvironmentsTablePreflightFailed(t *testing.T) {
e := &meroxa.Environment{
Type: meroxa.EnvironmentTypePrivate,
Name: "environment-preflight-failed",
Provider: meroxa.EnvironmentProviderAws,
Region: meroxa.EnvironmentRegionUsEast1,
Status: meroxa.EnvironmentViewStatus{
State: meroxa.EnvironmentStatePreflightError,
Details: "",
PreflightDetails: &meroxa.PreflightDetails{
PreflightPermissions: &meroxa.PreflightPermissions{
S3: []string{"missing read permission for S3", "missing write permissions for S3"},
EC2: []string{"missing read permission for S3", "missing write permissions for S3"},
},
PreflightLimits: &meroxa.PreflightLimits{
EIP: "",
},
},
},
UUID: "531428f7-4e86-4094-8514-d397d49026f7",
}
e := GenerateEnvironmentFailed("environment-preflight-failed")

tests := map[string][]*meroxa.Environment{
"Base": {e},
"Base": {&e},
}

tableHeaders := []string{"ID", "NAME", "TYPE", "PROVIDER", "REGION", "STATE"}
Expand Down

0 comments on commit b2d535f

Please sign in to comment.