Skip to content

Commit

Permalink
Merge pull request #216 from Interhyp/issue-214-allow-operation-type-…
Browse files Browse the repository at this point in the history
…library

fix(#214): fix error message
  • Loading branch information
StephanHCB authored Oct 17, 2023
2 parents 29bf1be + 5c8edf7 commit 1af8477
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/service/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func (s *Impl) validateAlertTarget(messages []string, alertTarget string) []stri

func validateOperationType(messages []string, operationType *string) []string {
if !validOperationType(operationType) {
messages = append(messages, "optional field operationType must be WORKLOAD (default if unset), PLATFORM or APPLICATION")
messages = append(messages, "optional field operationType must be WORKLOAD (default if unset), PLATFORM, LIBRARY, or APPLICATION")
}
return messages
}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/services/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func TestValidate_OperationType(t *testing.T) {
OperationType: p("YET ANOTHER"),
}

expectedMessage := "validation error: optional field operationType must be WORKLOAD (default if unset), PLATFORM or APPLICATION"
expectedMessage := "validation error: optional field operationType must be WORKLOAD (default if unset), PLATFORM, LIBRARY, or APPLICATION"

tstValidationTestcaseAllOps(t, expectedMessage, data, create, patch)
}

0 comments on commit 1af8477

Please sign in to comment.