Skip to content

Commit

Permalink
Add newline after error messages in import
Browse files Browse the repository at this point in the history
[#148954495] Error messages should end with a line break to make import more readable

Signed-off-by: Phil Goodwin <pgoodwin@pivotal.io>
  • Loading branch information
Kelly Gerritz committed Jul 17, 2017
1 parent 2cd885f commit c941482
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func setCredentials(bulkImport models.CredentialBulkImport) {
return
}
failure := fmt.Sprintf("Credential '%s' at index %d could not be set: %v", name, i, err)
fmt.Println(failure)
errors = append(errors, " - " + failure)
fmt.Println(failure + "\n")
errors = append(errors, " - "+failure)
failed++
continue
} else {
Expand Down
2 changes: 2 additions & 0 deletions commands/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ Failed to set: 0

session := runCommand("import", "-f", "../test/test_import_partial_fail_set.yml")
successfulSetMessage := `Credential '/test/invalid_type' at index 0 could not be set: The request does not include a valid type. Valid values include 'value', 'json', 'password', 'user', 'certificate', 'ssh' and 'rsa'.
Credential '/test/invalid_type1' at index 1 could not be set: The request does not include a valid type. Valid values include 'value', 'json', 'password', 'user', 'certificate', 'ssh' and 'rsa'.
id: 5a2edd4f-1686-4c8d-80eb-5daa866f9f86
name: /test/user
type: user
Expand Down

0 comments on commit c941482

Please sign in to comment.