Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yongxuanzhang committed Jul 28, 2022
1 parent 0423e24 commit d17a1ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/apis/pipeline/v1beta1/result_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ func TestResultsValidateError(t *testing.T) {
Message: "The value type specified for these keys [hello] is invalid",
Paths: []string{"MY-RESULT.properties"},
},
}, {
name: "invalid object properties empty",
Result: v1beta1.TaskResult{
Name: "MY-RESULT",
Type: v1beta1.ResultsTypeObject,
Description: "my great result",
},
apiFields: "alpha",
expectedError: apis.FieldError{
Message: "missing field(s)",
Paths: []string{"MY-RESULT.properties"},
},
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit d17a1ea

Please sign in to comment.