Don't require type for children of subtyped resources. (#285)

This commit is contained in:
Todd Knight authored and GitHub committed 2020-08-19 10:51:15 -07:00
1 parent a11ca2e3a8
commit eaae887bbe
18 files changed
+278 -246

No files matched your search

-5
View File
@@ -103,9 +103,4 @@ func TestCatalogs_Errors(t *testing.T) {
require.NoError(err)
assert.NotNil(apiErr)
assert.EqualValues(http.StatusForbidden, apiErr.Status)
_, apiErr, err = pc.Update(tc.Context(), hc.Id, hc.Version, hosts.WithType("Cant Update"))
require.NoError(err)
assert.NotNil(apiErr)
assert.EqualValues(http.StatusBadRequest, apiErr.Status)
}
-12
View File
@@ -100,15 +100,3 @@ func DefaultName() Option {
o.valueMap["name"] = nil
}
}
func WithType(inType string) Option {
return func(o *options) {
o.valueMap["type"] = inType
}
}
func DefaultType() Option {
return func(o *options) {
o.valueMap["type"] = nil
}
}