~juju-gui/juju-gui/trunk

« back to all changes in this revision

Viewing changes to test/test_env_go.js

  • Committer: Jeff Pihach
  • Date: 2013-09-03 16:09:24 UTC
  • mfrom: (992.3.15 save-changed-1214087)
  • Revision ID: jeff.pihach@canonical.com-20130903160924-mjy240b4rx67dzn1
Only sends the changed config options.

1) There was a bug with the ghost constraints code which
   caused it to fail when deploying services on rapi.

2) The GUI now only sends configuration values to juju when
   those values differ from the defaults.

R=frankban, rharding
CC=
https://codereview.appspot.com/13252045

Show diffs side-by-side

added added

removed removed

Lines of Context:
805
805
    });
806
806
 
807
807
    it('can set a service config', function() {
808
 
      env.set_config('mysql', {'cfg-key': 'cfg-val'});
 
808
      // This also tests that it only sends the changed values
 
809
      env.set_config('mysql', {
 
810
        'cfg-key': 'cfg-val',
 
811
        'unchanged': 'bar'
 
812
      }, null, {
 
813
        'cfg-key': 'foo',
 
814
        'unchanged': 'bar'
 
815
      });
809
816
      msg = conn.last_message();
810
817
      var expected = {
811
818
        Type: 'Client',
841
848
 
842
849
    it('handles failed set config', function() {
843
850
      var err, service_name;
844
 
      env.set_config('yoursql', {}, null, function(evt) {
 
851
      env.set_config('yoursql', {}, null, {}, function(evt) {
845
852
        err = evt.err;
846
853
        service_name = evt.service_name;
847
854
      });