| Index: test/test_env_python.js |
| === modified file 'test/test_env_python.js' |
| --- test/test_env_python.js 2013-05-17 14:51:05 +0000 |
| +++ test/test_env_python.js 2013-08-27 16:24:00 +0000 |
| @@ -37,7 +37,7 @@ |
| testUtils = Y.namespace('juju-tests.utils'); |
| conn = new testUtils.SocketStub(); |
| juju = Y.namespace('juju'); |
| - env = juju.newEnvironment({conn: conn}); |
| + env = juju.newEnvironment({conn: conn}, 'python'); |
| env.connect(); |
| conn.open(); |
| done(); |
| @@ -70,6 +70,17 @@ |
| msg.config_raw.should.equal(config_raw); |
| }); |
| + it('successfully deploys a service with constraints', function() { |
| + var constraints = { |
| + 'cpu': 1, |
| + 'mem': '512M', |
| + 'arch': 'i386' |
| + }; |
| + env.deploy('precise/mysql', null, null, null, 1, constraints); |
| + msg = conn.last_message(); |
| + assert.deepEqual(msg.constraints, constraints); |
| + }); |
| + |
| it('can add a unit', function() { |
| env.add_unit('mysql', 3); |
| msg = conn.last_message(); |
| @@ -442,7 +453,7 @@ |
| it('denies deploying a charm if the GUI is read-only', function() { |
| assertOperationDenied( |
| - 'deploy', ['cs:precise/haproxy', 'haproxy', {}, null, 3]); |
| + 'deploy', ['cs:precise/haproxy', 'haproxy', {}, null, 3, null]); |
| }); |
| it('denies exposing a service if the GUI is read-only', function() { |