~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/featuretests/cmdjuju_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        c.Assert(err, jc.ErrorIsNil)
48
48
 
49
49
        context, err := testing.RunCommand(c, application.NewServiceGetConstraintsCommand(), "svc")
50
 
        c.Assert(testing.Stdout(context), gc.Equals, "cpu-cores=64\n")
 
50
        c.Assert(testing.Stdout(context), gc.Equals, "cores=64\n")
51
51
        c.Assert(testing.Stderr(context), gc.Equals, "")
52
52
}
53
53
 
55
55
        ch := s.AddTestingCharm(c, "dummy")
56
56
        svc := s.AddTestingService(c, "dummy-service", ch)
57
57
 
58
 
        _, err := testing.RunCommand(c, application.NewSetCommand(), "dummy-service",
 
58
        _, err := testing.RunCommand(c, application.NewConfigCommand(), "dummy-service",
59
59
                "username=hello", "outlook=hello@world.tld")
60
60
        c.Assert(err, jc.ErrorIsNil)
61
61
 
81
81
        err := svc.UpdateConfigSettings(settings)
82
82
        c.Assert(err, jc.ErrorIsNil)
83
83
 
84
 
        _, err = testing.RunCommand(c, application.NewSetCommand(), "--to-default", "dummy-service", "username")
 
84
        _, err = testing.RunCommand(c, application.NewConfigCommand(), "--reset", "dummy-service", "username")
85
85
        c.Assert(err, jc.ErrorIsNil)
86
86
 
87
87
        expect := charm.Settings{
118
118
        ch := s.AddTestingCharm(c, "dummy")
119
119
        s.AddTestingService(c, "dummy-service", ch)
120
120
 
121
 
        context, err := testing.RunCommand(c, application.NewGetCommand(), "dummy-service")
 
121
        context, err := testing.RunCommand(c, application.NewConfigCommand(), "dummy-service")
122
122
        c.Assert(err, jc.ErrorIsNil)
123
123
        c.Assert(testing.Stdout(context), jc.DeepEquals, expected)
124
124
}