~themue/pyjuju/go-state-remove-relation

« back to all changes in this revision

Viewing changes to state/internal_test.go

  • Committer: Frank Mueller
  • Date: 2012-06-01 14:23:32 UTC
  • Revision ID: themue@gmail.com-20120601142332-eeessgk9kgwzrhll
state: Change of RemoveRelation() in topology and State.

Show diffs side-by-side

added added

removed removed

Lines of Context:
453
453
        // Check that the retrieving of relations works correctly.
454
454
        relation, err := s.t.Relation("r-1")
455
455
        c.Assert(relation, IsNil)
456
 
        c.Assert(err, ErrorMatches, `relation "r-1" does not exist`)
 
456
        c.Assert(err, ErrorMatches, `relation does not exist`)
457
457
        s.t.AddService("s-p", "riak")
458
458
        s.t.AddRelation("r-1", &topoRelation{
459
459
                Interface: "ifce",
471
471
        // valid services.
472
472
        relation, err := s.t.Relation("r-1")
473
473
        c.Assert(relation, IsNil)
474
 
        c.Assert(err, ErrorMatches, `relation "r-1" does not exist`)
 
474
        c.Assert(err, ErrorMatches, `relation does not exist`)
475
475
        s.t.AddService("s-p", "mysql")
476
476
        s.t.AddService("s-r", "wordpress")
477
477
        err = s.t.AddRelation("r-1", &topoRelation{
643
643
 
644
644
        relation, err = s.t.Relation("r-1")
645
645
        c.Assert(relation, IsNil)
646
 
        c.Assert(err, ErrorMatches, `relation "r-1" does not exist`)
 
646
        c.Assert(err, ErrorMatches, `relation does not exist`)
647
647
}
648
648
 
649
649
func (s *TopologySuite) TestRemoveServiceWithRelations(c *C) {