Skip to content

Commit 44b4503

Browse files
committed
chore(workflow-cli): remove uuid display
1 parent 3bbd940 commit 44b4503

16 files changed

Lines changed: 36 additions & 43 deletions

cmd/apps.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ func (d *DryccCmd) AppsList(results int) error {
7878
return err
7979
}
8080
if count > 0 {
81-
table := d.getDefaultFormatTable([]string{"ID", "UUID", "OWNER", "CREATED", "UPDATED"})
81+
table := d.getDefaultFormatTable([]string{"ID", "OWNER", "CREATED", "UPDATED"})
8282
for _, app := range apps {
8383
table.Append([]string{
8484
app.ID,
85-
app.UUID,
8685
app.Owner,
8786
d.formatTime(app.Created),
8887
d.formatTime(app.Updated),

cmd/apps_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ func TestAppsList(t *testing.T) {
6262

6363
err = cmdr.AppsList(-1)
6464
assert.NoError(t, err)
65-
assert.Equal(t, b.String(), `ID UUID OWNER CREATED UPDATED
66-
lorem-ipsum c4aed81c-d1ca-4ff1-ab89-d2151264e1a3 dolar-sit-amet 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
67-
consectetur c4aed81c-d1ca-4ff1-ab89-d2151264e1a3 adipiscing 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
65+
assert.Equal(t, b.String(), `ID OWNER CREATED UPDATED
66+
lorem-ipsum dolar-sit-amet 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
67+
consectetur adipiscing 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
6868
`, "output")
6969
}
7070

@@ -101,8 +101,8 @@ func TestAppsListLimit(t *testing.T) {
101101

102102
err = cmdr.AppsList(1)
103103
assert.NoError(t, err)
104-
assert.Equal(t, b.String(), `ID UUID OWNER CREATED UPDATED
105-
lorem-ipsum c4aed81c-d1ca-4ff1-ab89-d2151264e1a3 dolar-sit-amet 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
104+
assert.Equal(t, b.String(), `ID OWNER CREATED UPDATED
105+
lorem-ipsum dolar-sit-amet 2016-08-22T17:40:16Z 2016-08-22T17:40:16Z
106106
`, "output")
107107
}
108108

cmd/autoscale.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ func (d *DryccCmd) AutoscaleList(appID string) error {
2222
if appSettings.Autoscale == nil {
2323
d.Println("No autoscale rules found.")
2424
} else {
25-
table := d.getDefaultFormatTable([]string{"UUID", "PTYPE", "PERCENT", "MIN", "MAX"})
25+
table := d.getDefaultFormatTable([]string{"PTYPE", "PERCENT", "MIN", "MAX"})
2626
for process, kv := range appSettings.Autoscale {
2727
table.Append([]string{
28-
appSettings.UUID,
2928
process,
3029
fmt.Sprintf("%d", (*kv).CPUPercent),
3130
fmt.Sprintf("%d", (*kv).Min),

cmd/autoscale_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func TestAutoscaleList(t *testing.T) {
3535

3636
err = cmdr.AutoscaleList("rivendell")
3737
assert.NoError(t, err)
38-
assert.Equal(t, b.String(), `UUID PTYPE PERCENT MIN MAX
39-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 cmd 40 3 8
38+
assert.Equal(t, b.String(), `PTYPE PERCENT MIN MAX
39+
cmd 40 3 8
4040
`, "output")
4141

4242
server.Mux.HandleFunc("/v2/apps/mordor/settings/", func(w http.ResponseWriter, _ *http.Request) {

cmd/builds.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ func (d *DryccCmd) BuildsList(appID string, results int) error {
2626
return err
2727
}
2828
if count > 0 {
29-
table := d.getDefaultFormatTable([]string{"UUID", "OWNER", "SHA", "CREATED"})
29+
table := d.getDefaultFormatTable([]string{"OWNER", "SHA", "CREATED"})
3030
for _, build := range builds {
3131
table.Append([]string{
32-
build.UUID,
3332
safeGetString(build.Owner),
3433
safeGetString(build.Sha),
3534
d.formatTime(build.Created),

cmd/builds_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func TestBuildsList(t *testing.T) {
7272

7373
err = cmdr.BuildsList("foo", -1)
7474
assert.NoError(t, err)
75-
assert.Equal(t, b.String(), `UUID OWNER SHA CREATED
76-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 <none> <none> 2014-01-01T00:00:00UTC
77-
c4aed81c-d1ca-4ff1-ab89-d2151264e1a3 <none> <none> 2014-01-05T00:00:00UTC
75+
assert.Equal(t, b.String(), `OWNER SHA CREATED
76+
<none> <none> 2014-01-01T00:00:00UTC
77+
<none> <none> 2014-01-05T00:00:00UTC
7878
`, "output")
7979
}
8080

@@ -112,8 +112,8 @@ func TestBuildsListLimit(t *testing.T) {
112112

113113
err = cmdr.BuildsList("foo", 1)
114114
assert.NoError(t, err)
115-
assert.Equal(t, b.String(), `UUID OWNER SHA CREATED
116-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 <none> <none> 2014-01-01T00:00:00UTC
115+
assert.Equal(t, b.String(), `OWNER SHA CREATED
116+
<none> <none> 2014-01-01T00:00:00UTC
117117
`, "output")
118118
}
119119

cmd/canary.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ func (d *DryccCmd) CanaryInfo(appID string) error {
2121
return err
2222
}
2323
if len(appSettings.Canaries) > 0 {
24-
table := d.getDefaultFormatTable([]string{"UUID", "OWNER", "PTYPE", "CREATED", "UPDATED"})
24+
table := d.getDefaultFormatTable([]string{"OWNER", "PTYPE", "CREATED", "UPDATED"})
2525
for _, procType := range appSettings.Canaries {
2626
table.Append([]string{
27-
appSettings.UUID,
2827
appSettings.Owner,
2928
procType,
3029
d.formatTime(appSettings.Created),

cmd/canary_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func TestCanaryInfo(t *testing.T) {
3535

3636
err = cmdr.CanaryInfo("rivendell")
3737
assert.NoError(t, err)
38-
assert.Equal(t, b.String(), `UUID OWNER PTYPE CREATED UPDATED
39-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 elrond cmd 2014-01-01T00:00:00UTC 2014-01-01T00:00:00UTC
38+
assert.Equal(t, b.String(), `OWNER PTYPE CREATED UPDATED
39+
elrond cmd 2014-01-01T00:00:00UTC 2014-01-01T00:00:00UTC
4040
`, "output")
4141

4242
server.Mux.HandleFunc("/v2/apps/mordor/settings/", func(w http.ResponseWriter, _ *http.Request) {

cmd/labels.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ func (d *DryccCmd) LabelsList(appID string) error {
2424
if len(appSettings.Label) == 0 {
2525
d.Println(fmt.Sprintf("No labels found in %s app.", appID))
2626
} else {
27-
table := d.getDefaultFormatTable([]string{"UUID", "OWNER", "KEY", "VALUE"})
27+
table := d.getDefaultFormatTable([]string{"OWNER", "KEY", "VALUE"})
2828
for _, key := range *sortKeys(appSettings.Label) {
2929
table.Append([]string{
30-
appSettings.UUID,
3130
appSettings.Owner,
3231
key,
3332
fmt.Sprintf("%v", appSettings.Label[key]),

cmd/labels_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ func TestLabelsList(t *testing.T) {
3535

3636
err = cmdr.LabelsList("rivendell")
3737
assert.NoError(t, err)
38-
assert.Equal(t, b.String(), `UUID OWNER KEY VALUE
39-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 jim git_repo https://github.com/drycc/controller-sdk-go
40-
de1bf5b5-4a72-4f94-a10c-d2a3741cdf75 jim team drycc
38+
assert.Equal(t, b.String(), `OWNER KEY VALUE
39+
jim git_repo https://github.com/drycc/controller-sdk-go
40+
jim team drycc
4141
`, "output")
4242

4343
server.Mux.HandleFunc("/v2/apps/mordor/settings/", func(w http.ResponseWriter, _ *http.Request) {

0 commit comments

Comments
 (0)