Commit 2f169d6a authored by Antoine Catton's avatar Antoine Catton

Merge branch 'master' into rename_instance

Conflicts:
	master/bt5/vifib_open_trade/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
	master/bt5/vifib_open_trade/bt/template_portal_type_property_sheet_list
parents 22e68568 ba5c3484
......@@ -3,5 +3,6 @@
<item>HostingSubscription</item>
<item>SoftwareInstance</item>
<item>TextDocument</item>
<item>VariationRange</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
Hosting Subscription | HostingSubscription
Hosting Subscription | SoftwareInstance
Hosting Subscription | TextDocument
\ No newline at end of file
Hosting Subscription | TextDocument
Hosting Subscription | VariationRange
\ No newline at end of file
......@@ -2,9 +2,6 @@
<portal_type id="Computer Partition">
<item>ComputerPartition</item>
</portal_type>
<portal_type id="Hosting Subscription">
<item>VariationRange</item>
</portal_type>
<portal_type id="System Preference">
<item>VifibSystemPreference</item>
</portal_type>
......
portal_alarms/confirm_ordered_sale_order
portal_alarms/stop_planned_sale_invoice_transaction
portal_alarms/vifib_check_consistency
portal_alarms/vifib_trigger_build
portal_alarms/vifib_trigger_build
\ No newline at end of file
Computer Partition | ComputerPartition
Hosting Subscription | VariationRange
System Preference | VifibSystemPreference
Virtio Partition | ComputerPartition
\ No newline at end of file
......@@ -38,7 +38,7 @@
<!-- Tested with chromium 12 and --ignore-certificate-errors --disable-translate --disable-web-security options -->\n
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test KVM</title>\n
......@@ -50,9 +50,9 @@
</thead><tbody>\n
<tal:block metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/init_environment" />\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest1.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest1.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
......@@ -65,9 +65,9 @@
<td></td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest2.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest2.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
......@@ -120,9 +120,9 @@
<td>${kvm}</td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest3.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest3.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......@@ -149,14 +149,15 @@
<td>id=dialog_submit_button</td>\n
<td></td>\n
</tr>\n
<!-- XXX : vifib UI should automatically propose the latest version of KVM.-->\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[contains(.,"KVM")][last()]/td[contains(.,"KVM")]/input</td>\n
<td>//tr[contains(.,"001")][last()]/td[contains(.,"KVM")]/input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//tr[contains(.,"KVM")][last()]/td[contains(.,"KVM")]/input@value</td>\n
<td>//tr[contains(.,"001")][last()]/td[contains(.,"KVM")]/input@value</td>\n
<td>value</td>\n
</tr>\n
<tr>\n
......@@ -165,9 +166,9 @@
<td></td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest4.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest4.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......@@ -222,7 +223,7 @@
<tr>\n
<td>type</td>\n
<td>name=field_your_default_email_text</td>\n
<td>mail@domain.com</td>\n
<td>email@domain.com</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
......@@ -240,44 +241,41 @@
<td>Address</td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest5.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest5.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>id=dialog_submit_button</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest6.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest6.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//img[@alt="My Services"]</td>\n
<td></td>\n
</tr>\n
<!-- Here we wait 15 minutes too see if vifib has calculated everything and\n
instance is "instantiation in progress" or better. -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//img[@alt="My Services"]</td>\n
<td>pause</td>\n
<td>900000</td>\n
<td></td>\n
</tr>\n
<!--tr>\n
<td>assertTextPresent</td>\n
<td>Unimplemented: Can\'t fetch the reference of the software instance</td>\n
<td></td>\n
</tr>-->\n
<span metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/finished_processing_activities" />\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest7.png</td>\n
<td></td>\n
<td>clickAndWait</td>\n
<td>//img[@alt="My Services"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>30000</td>\n
<td>phantomRender</td>\n
<td>webrequest7.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
......@@ -290,7 +288,6 @@
<td>link=${kvm}</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/finished_processing_activities" />\n
<tr>\n
<td>assertElementPresent</td>\n
<td>link=${kvm}</td>\n
......@@ -302,13 +299,12 @@
<td></td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest8.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest8.png</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/check_for_started_instance" />\n
<!-- This part only work with chromium for now -->\n
<!----><tr>\n
<tr>\n
<td>pause</td>\n
<td>90000</td>\n
<td></td>\n
......@@ -320,14 +316,12 @@
</tr>\n
<tr>\n
<td>store</td>\n
<td>javascript{storedVars[\'xml\'].split(\'&lt;parameter\n
id=&quot;url&quot;&gt;\')[1].split(\'&lt;/parameter&gt;\')[0];}</td>\n
<td>javascript{storedVars[\'xml\'].split(\'&lt;parameter id=&quot;url&quot;&gt;\')[1].split(\'&lt;/parameter&gt;\')[0];}</td>\n
<td>ip</td>\n
</tr>\n
<tr>\n
<td>store</td>\n
<td>javascript{storedVars[\'xml\'].split(\'&lt;parameter\n
id=&quot;password&quot;&gt;\')[1].split(\'&lt;/parameter&gt;\')[0];}</td>\n
<td>javascript{storedVars[\'xml\'].split(\'&lt;parameter id=&quot;password&quot;&gt;\')[1].split(\'&lt;/parameter&gt;\')[0];}</td>\n
<td>password</td>\n
</tr>\n
<tr>\n
......@@ -355,16 +349,17 @@
<td>id=password_input</td>\n
<td>13</td>\n
</tr>\n
<!--Check if it works without it in chrome AND firefox before removing.\n
<tr>\n
\t<td>pause</td>\n
\t<td>1000</td>\n
\t<td></td>\n
<td>pause</td>\n
<td>1000</td>\n
<td></td>\n
</tr>\n
<tr>\n
\t<td>submit</td>\n
\t<td>//input[@id=&quot;password_input&quot;]/..</td>\n
\t<td>\\13</td>\n
</tr>\n
<td>submit</td>\n
<td>//input[@id=&quot;password_input&quot;]/..</td>\n
<td>\\13</td>\n
</tr>-->\n
<tr>\n
<td>pause</td>\n
<td>10000</td>\n
......@@ -376,15 +371,15 @@
<td></td>\n
</tr>\n
<tr>\n
<td>phantomRender</td>\n
<td>/home/darthabel/screen/webrequest9.png</td>\n
<td></td>\n
<td>phantomRender</td>\n
<td>webrequest9.png</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${address}</td>\n
<td></td>\n
</tr><!---->\n
</tr>\n
<span metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/destroy_instance" />\n
</tbody>\n
</table>\n
......
......@@ -6,12 +6,33 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>60.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_web_ui_test</string> </value>
......
......@@ -138,9 +138,10 @@
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<!-- XXX-Cedric : should be "Destroyed". -->\n
<td>new\n
Ajax.Request(\'ERP5Site_getInstanceStatus?instance_reference=${instance_reference}\',\n
{asynchronous: false}).transport.responseText === "Destroyed"; var\n
{asynchronous: false}).transport.responseText === "Destruction in progress"; var\n
i; for (i = 0; i < 10000000; i++){};</td>\n
<td>600000</td>\n
</tr>\n
......
......@@ -55,8 +55,18 @@ class TestVifibSkinSelection(testVifibMixin):
portal = self.getPortal()
self.assertSameSet(
[x[0] for x in portal.portal_skins.getSkinPaths()],
['Cash', 'Download', 'Fiber', 'Hosting', 'KM', 'Multiflex', 'ODS', 'ODT',
'View']
[
'Cash',
'Download',
'Fiber',
'Hosting',
'KM',
'Multiflex',
'ODS',
'ODT',
'RSS',
'View',
]
)
def assertSameSkinSelection(self, skin_name, selection_string_list):
......@@ -115,6 +125,7 @@ vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_km_theme
erp5_knowledge_pad
erp5_simulation
......@@ -159,6 +170,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -207,6 +219,7 @@ vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_free_fiber_request
erp5_km_theme
erp5_knowledge_pad
......@@ -252,6 +265,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -301,6 +315,7 @@ vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_km_theme
erp5_knowledge_pad
erp5_simulation
......@@ -345,6 +360,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -432,6 +448,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -518,6 +535,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -562,6 +580,7 @@ vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_free_fiber_request
erp5_knowledge_pad
erp5_simulation
......@@ -607,6 +626,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -697,6 +717,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -784,6 +805,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -870,6 +892,7 @@ erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
......@@ -890,6 +913,91 @@ activity
zpt_content
zpt_control
zpt_generic
"""
self.assertSameSkinSelection(skin_name, selection_string_list)
def test_13_RSS_selection(self):
"""
Check the skin folder order
"""
skin_name = 'RSS'
selection_string_list = \
"""
custom
vifib_upgrader
vifib_base
vifib_core
vifib_crm
vifib_forge_release
vifib_open_trade
vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
erp5_rss_style
erp5_knowledge_pad
erp5_simulation
erp5_dms_base
erp5_dms_web
erp5_legacy_tax_system
erp5_accounting_l10n_fr
erp5_upgrader
erp5_access_tab
erp5_accounting
erp5_accounting_bbb
erp5_administration
erp5_base
erp5_commerce
erp5_commerce_widget_library
erp5_computer_immobilisation
erp5_content_translation
erp5_core
erp5_core_proxy_field_legacy
erp5_credential
erp5_crm
erp5_dhtml_style
erp5_discount_resource
erp5_dms
erp5_fckeditor
erp5_forge
erp5_forge_release
erp5_gadget
erp5_glossary
erp5_ingestion
erp5_ingestion_test
erp5_integration
erp5_invoicing
erp5_item
erp5_item_trade
erp5_ods_core
erp5_odt_core
erp5_ooo_import
erp5_open_trade
erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_vcs
erp5_web
erp5_web_crm
erp5_web_minimal_theme
erp5_web_widget_library
erp5_xhtml_jquery_style
external_method
Images
activity
zpt_content
zpt_control
zpt_generic
"""
self.assertSameSkinSelection(skin_name, selection_string_list)
......
......@@ -49,6 +49,7 @@ from utils import setFinished
from utils import getSoftwareUrlHash
from slapos import slap
from slapos.slap import NotFoundError
from slapos.slap.slap import ServerError
from utils import dropPrivileges
from utils import SlapPopen
from svcbackend import launchSupervisord
......@@ -866,6 +867,10 @@ class Slapgrid(object):
logger.debug('Ignored slap error while trying to inform about '
'destroying not fully configured Computer Partition %r' %
computer_partition.getId())
except ServerError as server_error:
logger.debug('Ignored server error while trying to inform about '
'destroying Computer Partition %r. Error is :\n%r' %
(computer_partition.getId(), server_error.args[0]))
logger.info("Finished usage reports...")
return clean_run
......@@ -178,9 +178,8 @@ def dropPrivileges(uid, gid):
return
# drop privileges
user_name = pwd.getpwuid(uid)[0]
group_list = [x.gr_gid for x in grp.getgrall() if user_name in x.gr_mem]
if gid not in group_list:
group_list.append(gid)
group_list = set([x.gr_gid for x in grp.getgrall() if user_name in x.gr_mem])
group_list.add(gid)
os.initgroups(pwd.getpwuid(uid)[0], gid)
os.setgid(gid)
os.setuid(uid)
......@@ -190,7 +189,7 @@ def dropPrivileges(uid, gid):
'and group_list = %s' % (
uid, gid, group_list)
new_uid, new_gid, new_group_list = os.getuid(), os.getgid(), os.getgroups()
if not (new_uid == uid and new_gid == gid and new_group_list == group_list):
if not (new_uid == uid and new_gid == gid and set(new_group_list) == group_list):
raise OSError('%s new_uid = %r and new_gid = %r and ' \
'new_group_list = %r which is fatal.'
% (message_pre,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment