~ubuntu-branches/ubuntu/saucy/juju-core/saucy-proposed

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/environs/maas/config_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-07-11 17:18:27 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130711171827-vjqkg40r0dlf7ys2
Tags: 1.11.2-0ubuntu1
* New upstream release.
* Make juju-core the default juju (LP: #1190634):
  - d/control: Add virtual package juju -> juju-core.
  - d/juju-core.postinst.in: Bump priority of alternatives over that of
    python juju packages.
* Enable for all architectures (LP: #1172505):
  - d/control: Version BD on golang-go to >= 2:1.1.1 to ensure CGO
    support for non-x86 archs, make juju-core Arch: any.
  - d/README.source: Dropped - no longer required.
* d/watch: Updated for new upstream tarball naming.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
1
4
package maas
2
5
 
3
6
import (
46
49
func (ConfigSuite) TestParsesMAASSettings(c *C) {
47
50
        server := "http://maas.example.com/maas/"
48
51
        oauth := "consumer-key:resource-token:resource-secret"
 
52
        future := "futurama"
49
53
        ecfg, err := newConfig(map[string]interface{}{
50
54
                "maas-server": server,
51
55
                "maas-oauth":  oauth,
 
56
                "future-key":  future,
52
57
        })
53
58
        c.Assert(err, IsNil)
54
59
        c.Check(ecfg.MAASServer(), Equals, server)
55
60
        c.Check(ecfg.MAASOAuth(), DeepEquals, oauth)
 
61
        c.Check(ecfg.UnknownAttrs()["future-key"], DeepEquals, future)
56
62
}
57
63
 
58
64
func (ConfigSuite) TestChecksWellFormedMaasServer(c *C) {