Check spec/integration/network/authconfig_spec.rb, it has some higher level
tests that I think use deny and ordering. It's only testing sorting within
the domain type, and we'd welcome a bigger test suite that exposes bugs in
the ordering. We don't test against the :deny type explicitly, but we test
whether type of a declaration is :allow (or :allow_ip) so we do need to
have an alternative to those that will get denied.


On Mon, Jun 3, 2013 at 10:48 PM, <[email protected]> wrote:

> Can we remove the <=> operator and :deny type from AuthStore::Declaration?
>
> Some details:
>
> * In lib/puppet/network/authstore.rb there is logic to provide a custom
> sort order. I believe it provides a total ordering, but almost by accident.
> If we were to allow :domain declarations without periods there would only
> be partial ordering between :domain and :opaque declarations.
>
> * There is a corresponding, but incomplete, test in authstore_spec.rb. The
> test implies that :domain should sort before :opaque, but that is not
> always the case. For example "www.example.com" (:domain) sorts after
> "a_name" (:opaque) because "a_name" sorts before "com".
>
> * The documentation claims that :deny has no effect, I haven't verified
> that, but it would make sense looking at the code. To support deny I would
> expect manually ordered allow and deny directives instead of an order
> defined by a compare operator.
>
> Given all of this can we simply remove sort order support (or at least
> tests for it)? Removing <=> would also seem to remove the only call site of
> deny?, and if I'm correct any use of the :deny type.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to