|
| 1 | +# |
| 2 | +# The _open_SmashBox Project. |
| 3 | +# |
| 4 | +# Author: Jakub T. Moscicki, CERN, 2013 |
| 5 | +# License: AGPL |
| 6 | +# |
| 7 | +# this is the main config file template: copy to smashbox.conf and adjust the settings |
| 8 | +# |
| 9 | +# this template should work without changes if you are running your tests directly on the owncloud application server |
| 10 | +# |
| 11 | + |
| 12 | +# this is the top directory where all local working files are kept (test working direcotires, test logs, test data, temporary filesets, ..) |
| 13 | +smashdir = "~/smashdir" |
| 14 | + |
| 15 | +# name of the account used for testing |
| 16 | +# if None then account name is chosen automatically (based on the test name) |
| 17 | +oc_account_name=None |
| 18 | + |
| 19 | +# default number of users for tests involving multiple users (user number is appended to the oc_account_name) |
| 20 | +# this only applies to the tests involving multiple users |
| 21 | +oc_number_test_users=3 |
| 22 | + |
| 23 | +# name of the group used for testing |
| 24 | +oc_group_name=None |
| 25 | + |
| 26 | +# default number of groups for tests involving multiple groups (group number is appended to the oc_group_name) |
| 27 | +# this only applies to the tests involving multiple groups |
| 28 | +oc_number_test_groups=1 |
| 29 | + |
| 30 | +# password for test accounts: all test account will have the same password |
| 31 | +# if not set then it's an error |
| 32 | +oc_account_password="demo" |
| 33 | + |
| 34 | +# owncloud test server |
| 35 | +# if left blank or "localhost" then the real hostname of the localhost will be set |
| 36 | +oc_server = '' |
| 37 | + |
| 38 | + |
| 39 | +# root of the owncloud installation as visible in the URL |
| 40 | +oc_root = 'owncloud' |
| 41 | + |
| 42 | +# webdav endpoint URI within the oc_server |
| 43 | +import os.path |
| 44 | +oc_webdav_endpoint = os.path.join(oc_root,'remote.php/webdav') # standard owncloud server |
| 45 | + |
| 46 | +# target folder on the server (this may not be compatible with all tests) |
| 47 | +oc_server_folder = '' |
| 48 | + |
| 49 | +# should we use protocols with SSL (https, ownclouds) |
| 50 | +oc_ssl_enabled = True |
| 51 | + |
| 52 | +# how to invoke shell commands on the server |
| 53 | +# for localhost there is no problem - leave it blank |
| 54 | +# for remote host it may be set like this: "ssh -t -l root $oc_server" |
| 55 | +# note: configure ssh for passwordless login |
| 56 | +# note: -t option is to make it possible to run sudo |
| 57 | +oc_server_shell_cmd = "" |
| 58 | + |
| 59 | +# Data directory on the owncloud server. |
| 60 | +# |
| 61 | +oc_server_datadirectory = os.path.join('/var/www/html',oc_root, 'data') |
| 62 | + |
| 63 | +# a path to server side tools (create_user.php, ...) |
| 64 | +# |
| 65 | +# it may be specified as relative path "dir" and then resolves to |
| 66 | +# <smashbox>/dir where <smashbox> is the top-level of of the tree |
| 67 | +# containing THIS configuration file |
| 68 | +# |
| 69 | + |
| 70 | +oc_server_tools_path = "server-tools" |
| 71 | + |
| 72 | +# a path to ocsync command with options |
| 73 | +# this path should work for all client hosts |
| 74 | +# |
| 75 | +# it may be specified as relative path "dir" and then resolves to |
| 76 | +# <smashbox>/dir where <smashbox> is the top-level of of the tree |
| 77 | +# containing THIS configuration file |
| 78 | +# |
| 79 | +oc_sync_cmd = "client/build/mirall/bin/owncloudcmd --trust" |
| 80 | + |
| 81 | +# number of times to repeat ocsync run every time |
| 82 | +oc_sync_repeat = 1 |
| 83 | + |
| 84 | +#################################### |
| 85 | + |
| 86 | +# unique identifier of your test run |
| 87 | +# if None then the runid is chosen automatically (and stored in this variable) |
| 88 | +runid = None |
| 89 | + |
| 90 | +# if True then the local working directory path will have the runid added to it automatically |
| 91 | +workdir_runid_enabled=False |
| 92 | + |
| 93 | +# if True then the runid will be part of the oc_account_name automatically |
| 94 | +oc_account_runid_enabled=False |
| 95 | + |
| 96 | +#################################### |
| 97 | + |
| 98 | +# this defines the default account cleanup procedure |
| 99 | +# - "delete": delete account if exists and then create a new account with the same name |
| 100 | +# - "keep": don't delete existing account but create one if needed |
| 101 | +# |
| 102 | +# these are not implemeted yet: |
| 103 | +# - "sync_delete": delete all files via a sync run |
| 104 | +# - "webdav_delete": delete all files via webdav DELETE request |
| 105 | +# - "filesystem_delete": delete all files directly on the server's filesystem |
| 106 | +oc_account_reset_procedure = "delete" |
| 107 | + |
| 108 | +# this defined the default local run directory reset procedure |
| 109 | +# - "delete": delete everything in the local run directory prior to running the test |
| 110 | +# - "keep": keep all files (from the previous run) |
| 111 | +rundir_reset_procedure = "delete" |
| 112 | + |
| 113 | +web_user = "www-data" |
| 114 | + |
| 115 | +oc_admin_user = "at_admin" |
| 116 | +oc_admin_password = "admin" |
| 117 | + |
| 118 | +# cleanup imported namespaces |
| 119 | +del os |
| 120 | + |
| 121 | +# Verbosity of curl client. |
| 122 | +# If none then verbosity is on when smashbox run in --debug mode. |
| 123 | +# set it to True or False to override |
| 124 | +# |
| 125 | +pycurl_verbose = None |
| 126 | + |
| 127 | +# scp port to be used in scp commands, used primarily when copying over the server log file |
| 128 | +scp_port = 22 |
| 129 | + |
| 130 | +# user that can r+w the owncloud.log file (needs to be configured for passwordless login) |
| 131 | +oc_server_log_user = "www-data" |
| 132 | + |
| 133 | +# |
| 134 | +# Reset the server log file and verify that no exceptions and other known errors have been logged |
| 135 | +# |
| 136 | +oc_check_server_log = False |
| 137 | + |
| 138 | +from collections import OrderedDict |
| 139 | +_configgen = OrderedDict([('KeyRemoverProcessor', |
| 140 | + {'keylist': ('_configgen', 'oc_server', 'oc_ssl_enabled', |
| 141 | + 'oc_admin_user', 'oc_admin_password', |
| 142 | + 'oc_root', 'oc_webdav_endpoint', 'oc_server_shell_cmd', |
| 143 | + 'oc_sync_cmd', 'scp_port')}), |
| 144 | + ('OverwritterProcessor', |
| 145 | + {'dict_to_merge': {}}), |
| 146 | + ('RequiredKeysProcessor', |
| 147 | + {'keylist': [ |
| 148 | + {'name': 'oc_server', 'help_text': 'ip or hostname of the server where owncloud is located, including the port, such as "10.20.30.40:8080"'}, |
| 149 | + {'name': 'oc_ssl_enabled', 'type': 'bool', 'default': False, 'help_text': 'if you access to the server through https, set this to True'}, |
| 150 | + {'name': 'oc_root', 'help_text': 'the path for the url to be added after the server. To access to "http://server.com/owncloud" use "owncloud", leave it empty if you want to access to "http://server.com/"'}, |
| 151 | + {'name': 'oc_webdav_endpoint', 'help_text': 'the path for the webdav endpoint. If the webdav endpoint is in "http://server.com/owncloud/remote.php/webdav" use "owncloud/remote.php/webdav"', 'default': 'remote.php/webdav'}, |
| 152 | + {'name': 'oc_admin_user', 'default':'admin'}, |
| 153 | + {'name': 'oc_admin_password', 'default': 'Password'}, |
| 154 | + {'name': 'oc_server_shell_cmd', 'help_text': 'ssh command to connect to the server such as "ssh -t -l root <server_url>" (include the server). Leave it empty if the server is localhost'}, |
| 155 | + {'name': 'scp_port', 'type': 'int', 'default': 22, 'help_text': 'port for scp commands accessing the owncloud server'}, |
| 156 | + {'name': 'oc_sync_cmd', 'default': '/usr/bin/owncloudcmd --trust', 'help_text': 'owncloudcmd command. Use the absolute path to the app and any required option'}, |
| 157 | + ], |
| 158 | + 'ask': True}), |
| 159 | + ('SortProcessor', None)]) |
| 160 | +del OrderedDict |
0 commit comments