137 names refactor part ix

* state.annotator now takes a tag
* parseTag now takes a Tag, rejects nil tags.
Because parseTag now does not accept a string, so it is not possible to
give it a syntactically invalid tag anymore. In short, there is no way to
express this test in the new form of the function.


On Wed, Jul 16, 2014 at 7:40 PM, Matt Williams <notifications@github.com>
wrote:

> In state/state_test.go:
>
> > -		"-foo",
> > -		"foo-",
> > -		"---",
> > -		"foo-bar",
> > -		"unit-foo",
> > -		"network",
> > -		"network-",
> > -		"action-wordpress",
> > -	}
> > -	for _, name := range bad {
> > -		c.Logf(name)
> > -		coll, id, err := state.ParseTag(s.State, name)
> > -		c.Assert(err, gc.ErrorMatches, `".*" is not a valid( [a-z]+)? tag`)
> > -		c.Check(coll, gc.Equals, "")
> > -		c.Check(id, gc.Equals, "")
> > -	}
>
> Why has this test been removed?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/316/files#r14988003>.
>