[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.1.0-9-g00fb61c
X2Go dev team
git-admin at x2go.org
Sun May 19 13:03:28 CEST 2013
The branch, build-main has been updated
via 00fb61c3429809f7511f7bda5667a77facd96918 (commit)
from e341bd86111730b2919697a74ac18d759d2a9e74 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
etc/broker/x2gobroker-sessionprofiles.conf | 1 +
x2gobroker/tests/test_broker_inifile.py | 47 +++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/etc/broker/x2gobroker-sessionprofiles.conf b/etc/broker/x2gobroker-sessionprofiles.conf
index 2f0caea..0d79e7c 100644
--- a/etc/broker/x2gobroker-sessionprofiles.conf
+++ b/etc/broker/x2gobroker-sessionprofiles.conf
@@ -29,6 +29,7 @@
[DEFAULT]
+cmd=TERMINAL
defsndport=true
useiconv=false
iconvfrom=UTF-8
diff --git a/x2gobroker/tests/test_broker_inifile.py b/x2gobroker/tests/test_broker_inifile.py
index 35b4289..f2c32a3 100644
--- a/x2gobroker/tests/test_broker_inifile.py
+++ b/x2gobroker/tests/test_broker_inifile.py
@@ -47,6 +47,51 @@ class TestX2GoBrokerBackendInifile(unittest.TestCase):
for _profile_id in _profile_ids:
self.assertTrue( ( 'default' not in inifile_backend.get_profile(_profile_id).keys() ) )
+ # TEST COMPLETION OF DEFAULTS FROM CODE IN defaults.py
+
+ def test_getprofilecompletion(self):
+ _session_profiles = """
+[DEFAULT]
+exports =
+fullscreen = false
+width = 800
+height = 600
+applications = TERMINAL, WWWBROWSER
+
+[testprofile]
+user = foo
+cmd = GNOME
+
+"""
+ tf = tempfile.NamedTemporaryFile()
+ print >> tf, _session_profiles
+ tf.seek(0)
+ inifile_backend = inifile.X2GoBroker(profile_config_file=tf.name)
+ _expected_defaults = copy.deepcopy(x2gobroker.defaults.X2GOBROKER_SESSIONPROFILE_DEFAULTS['DEFAULT'])
+ for key in copy.deepcopy(_expected_defaults).keys():
+ if key.startswith('acl-'):
+ del _expected_defaults[key]
+ _expected_defaults.update( {
+ u'exports': '',
+ u'fullscreen': False,
+ u'width': 800,
+ u'height': 600,
+ u'applications': ['TERMINAL','WWWBROWSER',],
+ u'user': 'foo',
+ u'cmd': 'GNOME',
+ } )
+ # just testing the directrdp hard-coded defaults
+ _expected_defaults.update( {
+ u'directrdp': False,
+ } )
+ _expected_profile = copy.deepcopy(_expected_defaults)
+ _profile = inifile_backend.get_profile('testprofile')
+ print _expected_defaults
+ for key in _expected_profile.keys():
+ self.assertTrue( ( key in _profile.keys() ) )
+ for key in _profile.keys():
+ self.assertTrue( ( key in _expected_profile.keys() and _profile[key] == _expected_profile[key] ) )
+
### TEST SESSION PROFILES: get_profile_defaults()
def test_getprofiledefaults(self):
@@ -102,7 +147,7 @@ acl-users-order = deny-allow
u'fullscreen': False,
u'width': 800,
u'height': 600,
- u'applications': ['TERMINAL','WWWBROWSER',]
+ u'applications': ['TERMINAL','WWWBROWSER',],
} )
_expected_profile1 = copy.deepcopy(_expected_defaults)
_expected_profile1.update({
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list