Skip to content

Commit

Permalink
Fix context_output tests
Browse files Browse the repository at this point in the history
  • Loading branch information
telyn committed Aug 4, 2017
1 parent a7265a5 commit dfcd1b5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/bytemark/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestOutput(t *testing.T) {
Name: "my-cool-group",
ID: 11323,
},
Expected: "+---------------------------------------------+---------------+-----------+-------+-----------------+\n| String | Name | AccountID | ID | VirtualMachines |\n+---------------------------------------------+---------------+-----------+-------+-----------------+\n| group 11323 \"my-cool-group\" - has 0 servers | my-cool-group | 0 | 11323 | |\n+---------------------------------------------+---------------+-----------+-------+-----------------+\n",
Expected: "+----------------------+---------------------------------------------+---------------+-----------+-------+-----------------+\n| CountVirtualMachines | String | Name | AccountID | ID | VirtualMachines |\n+----------------------+---------------------------------------------+---------------+-----------+-------+-----------------+\n| 0 | group 11323 \"my-cool-group\" - has 0 servers | my-cool-group | 0 | 11323 | |\n+----------------------+---------------------------------------------+---------------+-----------+-------+-----------------+\n",
// also, --table-fields being non-empty should imply --table and be case insensitive
}, { // 6
ConfigFormat: util.ConfigVar{"output-format", "json", "FILE"},
Expand Down
2 changes: 1 addition & 1 deletion lib/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (a Account) PrettyPrint(wr io.Writer, detail prettyprint.DetailLevel) error
Your default account ({{ template "account_name" . }})
{{- else -}}
{{- template "account_name" . -}}
{{- end }}
{{- end -}}
{{ end }}
{{ define "account_full" -}}
Expand Down
2 changes: 1 addition & 1 deletion lib/billing/person.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (p Person) DefaultFields(f output.Format) string {
return "ID, Username, Email, FirstName, LastName, Phone, MobilePhone, Address, City, Postcode, Country, Organization, OrganizationDivision, VATNumber"
}

func (p Person) PrettyPrint(wr io.Writer, detail prettypreint.DetailLevel) error {
func (p Person) PrettyPrint(wr io.Writer, detail prettyprint.DetailLevel) error {
personTpl := `
{{ define "person_sgl" }}{{ .FirstName }} {{ .LastName }} ({{ .Username }}) - {{ .Email }}{{ end }}
{{ define "person_medium" }}{{ template "person_sgl" . }}
Expand Down
2 changes: 1 addition & 1 deletion lib/brain/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ func (a Account) PrettyPrint(wr io.Writer, detail prettyprint.DetailLevel) error
{{- end -}}
{{- end }}
{{ end -}}
`
`
return prettyprint.Run(wr, accountTpl, "account"+string(detail), a)
}

0 comments on commit dfcd1b5

Please sign in to comment.