Don't require type for children of subtyped resources. (#285)
This commit is contained in:
1 parent
a11ca2e3a8
commit
eaae887bbe
18 files changed
+278
-246
No files matched your search
@@ -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)
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user