add test environment
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Mar 2013 12:26:43 +0000 (13:26 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Mar 2013 12:26:43 +0000 (13:26 +0100)
23 files changed:
.gitignore
doc/build.html
doc/test.html [new file with mode: 0644]
tests/README [new file with mode: 0644]
tests/apache/etc/apache2.conf.tmpl [new file with mode: 0644]
tests/apache/etc/config.php [new file with mode: 0644]
tests/apache/etc/mods.conf [new file with mode: 0644]
tests/apache/etc/ssl.conf.tmpl [new file with mode: 0644]
tests/config.tmpl [new file with mode: 0644]
tests/db/etc/environment.tmpl [new file with mode: 0644]
tests/db/etc/pg_ctl.conf.tmpl [new file with mode: 0644]
tests/db/etc/pg_hba.conf.tmpl [new file with mode: 0644]
tests/db/etc/pg_ident.conf.tmpl [new file with mode: 0644]
tests/db/etc/postgresql.conf.tmpl [new file with mode: 0644]
tests/db/etc/start.conf.tmpl [new file with mode: 0644]
tests/setup-clean.sh [new file with mode: 0755]
tests/setup-create.sh [new file with mode: 0755]
tests/setup-start.sh [new file with mode: 0755]
tests/setup-stop.sh [new file with mode: 0755]
tests/ssl/gensslcert.sh [new file with mode: 0755]
tests/ssl/server.crt [new file with mode: 0644]
tests/ssl/server.key [new file with mode: 0644]
tests/testhost.mshk [new file with mode: 0644]

index 02b5ead..b7bdbaf 100644 (file)
@@ -43,3 +43,16 @@ dist-*
 debian/*log
 debian/*substvars
 debian/magicsmoke2-*
+
+#Unit Test Environment
+tests/apache/*pid
+tests/apache/log
+tests/apache/www
+tests/apache/etc/apache2.conf
+tests/apache/etc/ssl.conf
+tests/apache/etc/server.*
+tests/config
+tests/db/data
+tests/db/etc/environment
+tests/db/etc/*.conf
+tests/db/run
\ No newline at end of file
index 984f036..76cf987 100644 (file)
@@ -7,22 +7,22 @@
 
 <h2>Supported Platforms</h2>
 
-<b>Linux</b> is supported for both client and server. It is originally developed on Debian and Ubuntu, but should work out of the box on any other distribution that provides the necessary tools.<p>
+<b>Linux</b> is supported for both client and server. It is originally developed on Debian and Ubuntu, but should work out of the box on any other distribution that provides the necessary tools and is recent enough. <a href="test.html">Tests</a> are designed for this platform only.<p>
 
 <b>Windows</b> is only supported for building the client. While I'm convinced that the server would be able to work on Windows, there is no automatic support for it and I never tested it - you're on your own here.<p>
 
-<b>MacOS/X</b> might be supported for building the client. As soon as C++11 is supported by it or someone figures out how to build a decent GCC on it (one that is both full GCC and has the special MacOS options).<p>
+<b>MacOS/X</b> might work for building the client if you have an absolutely cutting edge brand new Mac with the newest Xcode on it. I do not support it directly, since Apple does not support my barely 3-year-old Mac any more.<p>
 
 <b>Other Unixoid systems</b> are untested, but should work just like Linux if you install the proper tools.<p>
 
 <h2>Prerequisites</h2>
 
-You need <a href="http://qt.nokia.com/downloads">Trolltech/Nokias Qt</a> Open Source edition
-version 4.8 or any newer. Qt is also needed to generate some code that the server relies upon - even though the server itself is written in PHP and does not need Qt at runtime.<p/>
+You need <a href="http://qt-project.org/downloads">the Qt Framework</a> Open Source edition
+version 5.0 or any newer. Qt is also needed to generate some code that the server relies upon - even though the server itself is written in PHP and does not need Qt at runtime.<p/>
 
 You also need <a href="http://www.openssl.org/">OpenSSL</a> installed and Qt needs to be built with SSL-support. While the pure web-UI can run without SSL, it is highly recommended that you enable SSL for the complete server for security reasons. The client insists on using SSL - it is not possible to connect the client to the server without it.<p/>
 
-You need a C++ compiler that works with Qt and supports at least some features of C++11. I usually recommend GCC 4.6 or newer for Linux and other Unixoid systems and using the newest stable version of <a href="http://www.mingw.org/">MinGW</a> for Windows.<p/>
+You need a C++ compiler that works with Qt and supports at least some features of C++11. I usually recommend the latest stable GCC (as of early 2013 that is 4.7, soon 4.8) for Linux and other Unixoid systems and using the newest stable version of <a href="http://www.mingw.org/">MinGW</a> for Windows.<p/>
 
 To make this point absolutely clear: I will not accept patches and ports that remove C++11 features, but I will accept patches that replace older constructs by cleaner ones that rely on C++11. My target compiler is the current stable version GCC. I do not test with LLVM, MSVC or any other compiler - so if your favorite compiler lacks C++11 features that GCC already implements: please let your compiler vendor know that you are disappointed. If I happen to use a feature that is not in the C++11 standard, let me know - I'll fix those.<p/>
 
@@ -71,7 +71,9 @@ For the install targets the makefile assumes per default that everything belongs
 <tt>make -f Makefile PREFIX=$HOME/magicsmoke install</tt><br>
 this will instead install into the magicsmoke subdirectory of the calling users home directory.<p>
 
-This part of the installation will place the client into its final place, and prepare the server scripts for actual installation (see below).
+This part of the installation will place the client into its final place, and prepare the server scripts for actual installation (see below).<p>
+
+Optionally you can run unit-tests, see the <a href="test.html">tests page</a> for details.
 
 <h2>Manual Installation on Linux and Unix Systems</h2>
 
diff --git a/doc/test.html b/doc/test.html
new file mode 100644 (file)
index 0000000..7f3ae5c
--- /dev/null
@@ -0,0 +1,106 @@
+<html>
+<head>
+<title>Testing Magic Smoke</title>
+</head>
+<body>
+<h1>Testing Magic Smoke</h1>
+
+This page describes how to run the self-tests of MagicSmoke. You do not need those tests if you merely want to compile, install and use a release version of the software. This should come as a relief to you, since due to the complex nature of MagicSmoke these tests are quite complex to set up.<p>
+
+It is however recommended that you set up and run them if you make any modifications to MagicSmoke.<p>
+
+<b>Important Note:</b> the MagicSmoke tests are designed to be run on a Linux system (Debian if you want to make sure). Windows is not supported because it is not supported for the server component. MacOS is also not supported (at the moment for any component - I do not have the kind of spare money to keep up with Apple's rather short product life-cycles).<p>
+
+There are two sets of tests for MagicSmoke: Unit tests and GUI tests. The Unit tests check interfaces and internal functions of MagicSmoke, while the GUI tests check the integration from the client perspective. Both sets can be run separately.<p>
+
+The MagicSmoke test suites create their own test environment with their own database, web server and configuration location - so normally it should not disturb a normal installation of MagicSmoke. It is still recommended that you create a separate user for those tests.<p>
+
+The tests described here assume that components used by MagicSmoke already work correctly - so they only test actual MagicSmoke functionality. External code (like Elam, TZone, ...) comes with its own tests which are not triggered from the MagicSmoke tests.<p>
+
+<h2>Prerequisites</h2>
+
+You have to <a href="build.html">build</a> MagicSmoke first. All components mentioned as prerequisites on the build page are also needed for tests. <p>
+
+In addition you'll need:<p>
+
+<b>Debian Linux</b> - the test setup was originally created for Debian Wheezy. Newer (or slightly older) versions of Debian and Ubuntu should also work. Other distributions may be similar enough to work or too different to find important components - good luck - patches are welcome.<p>
+
+<b>PostgreSQL 9.x</b> - the test server backend expects PostgreSQL as a database, since it is the more strict of all available options, it is not possible to run the tests with MySQL without a lot of patching in the test environment.<p>
+
+<b>Apache 2.2 with the php5 module and mod_ssl</b> - the test server is set up for Apache 2.2 (other 2.x versions might work, but I did not test them), I also only tested this setup on Debian - if Apache components are found in a different directory for your distribution you may need to change the test setup.<p>
+
+<b>GNU Wget</b> is used for creating the database structure (calling admin.php).<p>
+
+<b>GNU Bash</b> is used for all helper scripts, it is expected to reside in <tt>/bin/bash</tt>. The standard Dash shell of many modern Linux systems does not understand a few of the parameters used in those scripts.<p>
+
+<i>GUI tests only:</i><br/>
+<b><a href="http://www.froglogic.com">Froglogic Squish</a> 4.3 (or newer) for Qt5</b> - although this is a commercial toolkit, MagicSmoke GUI tests rely on it since there is no Open Source alternative that is up to this job yet.<p>
+
+
+
+<h2>Test Setup and Scripts</h2>
+
+Tests are distributed over the following directories:<p>
+<ul>
+<li><tt>tests</tt> - the main test directory, contains the test environment and Unit tests<ul>
+  <li><tt>apache</tt> - the Apache Web server setup for the test environment<ul>
+    <li><tt>etc</tt> - Apache and MagicSmoke server configuration files, change config.php here if you need to alter parameters for the test instance of the MagicSmoke server
+    <li><tt>log</tt> - Apache log files, in case something fails, you can inspect them there, the cleanup script deletes this directory!
+    <li><tt>www</tt> - dynamically generated MagicSmoke server installation
+    </ul>
+  <li><tt>db</tt> - Postgres database setup and storage directory<ul>
+    <li><tt>etc</tt> - DB server configuration
+    <li><tt>data</tt> - dynamically created Database storage directory, this holds the actual data
+    <li><tt>run</tt> - dynamically created directory that hold server logs, sockets and other housekeeping
+    </ul>
+  <li><tt>ssl</tt> - contains the SSL certificates used for the tests, normally you should not need to alter them
+  </ul>
+<li><tt>guitest</tt> - GUI test scripts for Squish</li>
+</ul>
+
+Make sure ports 20987-20989 are free on your system - the test backend will use them:<br/>
+<table frame="1" border="1">
+<tr><td><b>Port</b><td><b>Used by...</b></tr>
+<tr><td>20987<td>used by the PostgreSQL server</tr>
+<tr><td>20988<td>used for the Apache Web Server for unencrypted HTTP</tr>
+<tr><td>20989<td>used for the Apache Web Server for encrypted HTTPS</tr>
+</table><p>
+
+Those ports can be changed in the configuration. But it is recommended to leave them as is. The servers will always bind to localhost to prevent connections from outside the test box.<p>
+
+Copy the <tt>config.tmpl</tt> file to <tt>config</tt>, otherwise the helper scripts will not work. If you run Debian/Wheezy you are done, otherwise you may have to modify the file. See the comments inside the file for help on options that you can set.<p>
+
+You normally should not need to change the configuration templates for Postgres and Apache. However, if you do: configurations are in apache/etc/* (Apache) and db/etc/* (Postgres). Files with the extension <tt>.tmpl</tt> are templates that can contain patterns that are exchanged when the real configuration files are created from them before the servers are started:<br/>
+<table frame="1" border="1">
+<tr><td><b>Pattern</b><td><b>Used by...</b></tr>
+<tr><td>@@<td>Postgres: absolute path to Postgres (the main tests/db directory)<br/>
+        Apache: absolute path to the Apache directory (main tests/apache directory)</tr>
+<tr><td>@PGPORT@<td>Postgres TCP port</tr>
+<tr><td>@HTTPPORT@<td>Apache HTTP port</tr>
+<tr><td>@HTTPSPORT@<td>Apache HTTPS port</tr>
+</table><p>
+
+There are a few helper scripts that are normally called from the test programs to initialize the test environment. To ensure the environment works you may also call them manually. The following helper scripts exist:<p>
+
+<b>setup-start.sh</b> starts the Postgres and Apache servers. It always regenerates configuration files. If it has not happened yet it will also generate the database data directory and the local MagicSmoke server installation. It will not overwrite either of those.<p>
+
+<b>setup-stop.sh</b> shuts down the Postgres and Apache servers. Leaves the data intact. Call this if one of the tests crashes and you have to clean up.<p>
+
+<b>setup-create.sh</b> creates the MagicSmoke database. It relies on both servers already running and then makes the necessary calls to completely re-initialize the test database (all data currently stored is lost).<p>
+
+<b>setup-clean.sh</b> deletes the test environment. You must shutdown the servers first. It deletes the test database and test server installation. Call this to completely re-initialize the environment or after you made changes to the server installation process.<p>
+
+
+<h2>Running Unit Tests</h2>
+
+
+
+<h2>Running GUI Tests</h2>
+
+
+
+
+<h2>Integration with Jenkins</h2>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/tests/README b/tests/README
new file mode 100644 (file)
index 0000000..9a7d0a9
--- /dev/null
@@ -0,0 +1,5 @@
+README for Unit Tests
+======================
+
+
+see doc/test.html for details
diff --git a/tests/apache/etc/apache2.conf.tmpl b/tests/apache/etc/apache2.conf.tmpl
new file mode 100644 (file)
index 0000000..19f0f58
--- /dev/null
@@ -0,0 +1,217 @@
+# This is the main Apache server configuration file.  It contains the
+# configuration directives that give the server its instructions.
+# See http://httpd.apache.org/docs/2.2/ for detailed information about
+# the directives and /usr/share/doc/apache2-common/README.Debian.gz about
+# Debian specific hints.
+
+
+#
+# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
+#
+LockFile @@/accept.lock
+
+#
+# PidFile: The file in which the server should record its process
+# identification number when it starts.
+# This needs to be set in /etc/apache2/envvars
+#
+PidFile @@/apache.pid
+
+#
+# Timeout: The number of seconds before receives and sends time out.
+#
+Timeout 300
+
+#
+# KeepAlive: Whether or not to allow persistent connections (more than
+# one request per connection). Set to "Off" to deactivate.
+#
+KeepAlive On
+
+#
+# MaxKeepAliveRequests: The maximum number of requests to allow
+# during a persistent connection. Set to 0 to allow an unlimited amount.
+# We recommend you leave this number high, for maximum performance.
+#
+MaxKeepAliveRequests 100
+
+#
+# KeepAliveTimeout: Number of seconds to wait for the next request from the
+# same client on the same connection.
+#
+KeepAliveTimeout 5
+
+##
+## Server-Pool Size Regulation (MPM specific)
+## 
+
+# prefork MPM
+# StartServers: number of server processes to start
+# MinSpareServers: minimum number of server processes which are kept spare
+# MaxSpareServers: maximum number of server processes which are kept spare
+# MaxClients: maximum number of server processes allowed to start
+# MaxRequestsPerChild: maximum number of requests a server process serves
+<IfModule mpm_prefork_module>
+    StartServers          2
+    MinSpareServers       2
+    MaxSpareServers       5
+    MaxClients           10
+    MaxRequestsPerChild   0
+</IfModule>
+
+# worker MPM
+# StartServers: initial number of server processes to start
+# MinSpareThreads: minimum number of worker threads which are kept spare
+# MaxSpareThreads: maximum number of worker threads which are kept spare
+# ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
+#              graceful restart. ThreadLimit can only be changed by stopping
+#              and starting Apache.
+# ThreadsPerChild: constant number of worker threads in each server process
+# MaxClients: maximum number of simultaneous client connections
+# MaxRequestsPerChild: maximum number of requests a server process serves
+<IfModule mpm_worker_module>
+    StartServers          2
+    MinSpareThreads       2
+    MaxSpareThreads      10 
+    ThreadLimit          64
+    ThreadsPerChild       5
+    MaxClients           15
+    MaxRequestsPerChild   0
+</IfModule>
+
+# event MPM
+# StartServers: initial number of server processes to start
+# MinSpareThreads: minimum number of worker threads which are kept spare
+# MaxSpareThreads: maximum number of worker threads which are kept spare
+# ThreadsPerChild: constant number of worker threads in each server process
+# MaxClients: maximum number of simultaneous client connections
+# MaxRequestsPerChild: maximum number of requests a server process serves
+<IfModule mpm_event_module>
+    StartServers          2
+    MinSpareThreads       2
+    MaxSpareThreads       5 
+    ThreadLimit          64
+    ThreadsPerChild       5
+    MaxClients           15
+    MaxRequestsPerChild   0
+</IfModule>
+
+#
+# AccessFileName: The name of the file to look for in each directory
+# for additional configuration directives.  See also the AllowOverride
+# directive.
+#
+
+AccessFileName .htaccess
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being 
+# viewed by Web clients. 
+#
+<Files ~ "^\.ht">
+    Order allow,deny
+    Deny from all
+    Satisfy all
+</Files>
+
+#
+# DefaultType is the default MIME type the server will use for a document
+# if it cannot otherwise determine one, such as from filename extensions.
+# If your server contains mostly text or HTML documents, "text/plain" is
+# a good value.  If most of your content is binary, such as applications
+# or images, you may want to use "application/octet-stream" instead to
+# keep browsers from trying to display binary files as though they are
+# text.
+#
+# It is also possible to omit any default MIME type and let the
+# client's browser guess an appropriate action instead. Typically the
+# browser will decide based on the file's extension then. In cases
+# where no good assumption can be made, letting the default MIME type
+# unset is suggested  instead of forcing the browser to accept
+# incorrect  metadata.
+#
+DefaultType None
+
+
+#
+# HostnameLookups: Log the names of clients or just their IP addresses
+# e.g., www.apache.org (on) or 204.62.129.132 (off).
+# The default is off because it'd be overall better for the net if people
+# had to knowingly turn this feature on, since enabling it means that
+# each client request will result in AT LEAST one lookup request to the
+# nameserver.
+#
+HostnameLookups Off
+
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a <VirtualHost>
+# container, error messages relating to that virtual host will be
+# logged here.  If you *do* define an error logfile for a <VirtualHost>
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog @@/log/error.log
+CustomLog @@/log/access.log combined
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+# Include module configuration:
+Include @@/etc/mods.conf
+Include @@/etc/ssl.conf
+
+#PHP
+<FilesMatch ".+\.ph(p[345]?|t|tml)$">
+    SetHandler application/x-httpd-php
+</FilesMatch>
+DirectoryIndex index.php
+
+# Include list of ports to listen on and which to use for name based vhosts
+Listen localhost:@HTTPPORT@
+Listen localhost:@HTTPSPORT@
+#
+# The following directives define some format nicknames for use with
+# a CustomLog directive (see below).
+# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
+#
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+
+# Include of directories ignores editors' and dpkg's backup files,
+# see the comments above for details.
+
+# Include the virtual host configurations:
+ServerAdmin webmaster@localhost
+
+<Directory @@/www>
+        Options Indexes FollowSymLinks MultiViews
+        AllowOverride None
+        Order allow,deny
+        allow from all
+</Directory>
+
+<VirtualHost *:@HTTPPORT@>
+        DocumentRoot @@/www
+        ServerName localhost:@HTTPPORT@
+</VirtualHost>
+
+<VirtualHost *:@HTTPSPORT@>
+        DocumentRoot @@/www
+        ServerName localhost:@HTTPSPORT@
+
+        SSLEngine on
+
+        SSLCertificateFile    @@/etc/server.crt
+        SSLCertificateKeyFile @@/etc/server.key
+
+        #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
+        <FilesMatch "\.(cgi|shtml|phtml|php)$">
+                SSLOptions +StdEnvVars
+        </FilesMatch>
+</VirtualHost>
\ No newline at end of file
diff --git a/tests/apache/etc/config.php b/tests/apache/etc/config.php
new file mode 100644 (file)
index 0000000..66ddce2
--- /dev/null
@@ -0,0 +1,121 @@
+<?
+///////////////////////////////////////////////////
+// MAGIC-SMOKE CONFIGURATION FILE
+//
+// template for the test environment
+
+////
+//PostgreSQL
+
+//create engine: connection string, the sub-parameters are:
+// dbname - name of the database
+// user - DB user that is used to log in to the DB server
+// password - DB user password to use (leave out if the user is identified via ident or trust method)
+// host, hostaddr - host on which the DB server runs
+// port - port on that host (leave out for default port)
+// for more see:
+//  http://www.php.net/manual/en/function.pg-connect.php
+//  http://www.postgresql.org/docs/8.4/interactive/libpq-connect.html
+$db = new PGsqlEngine("dbname='smoke' user='smoke' host='localhost' port='20987'");
+//set table-prefix (must be non-empty, leave the default if in doubt)
+$db->setPrefix("smoke2_");
+//set this only if you want debug messages on error (developers only):
+//$db->setDebugMode();
+
+
+////////////
+// DB Administration
+
+//use this for DB creation and upgrading, comment it out otherwise
+//change the passcode before using this on a production system!!!
+$db->setAdminPassCode("Admin","Test");
+
+
+////////////
+//Dedicated Client Configuration
+
+//Authenticated session timeout - how long an authenticated session lasts
+// this should usually be a few hours (3600s per hour)
+$ClientSessionTimeout=2*3600;
+
+
+///////////
+//Web-Client Configuration
+
+//Template directory
+$template="./template/";
+
+//Renderer options
+$twigoptions = array(
+  //cache points to:
+  // a (relative) path to store cached pages in, or
+  // false to switch caching off
+  //'cache' => './tcache',
+  'cache' => false,
+
+  //character set, default is utf-8
+  'charset' => 'utf-8',
+
+  //enable this while you are actively changing code/templates and use a cache:
+  //'auto_reload' => true,
+
+  //enable this to throw an exception if an undefined variable is used,
+  //disable in final deployment:
+  'strict_variables' => true,
+);
+$twigextensions = array(
+  //HTML code auto-escaper:
+  'Escaper',
+  //Sandbox - cannot be loaded like this: it needs extensive configuration
+  //I18n - you also have to configure PHPs gettext extension to actually use this
+);
+
+//how long the stuff in a shopping cart is stored
+// this is the time that can go by while the user is looking around without touching
+// the cart
+$CartTimeout=30*60;
+
+//Authenticated web session timeout -
+// how long a web session lasts without a refresh;
+// this should usually be on the order of 10-30 minutes (the value is in seconds)
+$WebSessionTimeout=15*60;
+
+//whether to show errors in the web client - usually turned off in production mode
+$WebShowErrors=true;
+
+//default shipping for the web UI
+// true if shipping is enforced, false if the user may opt out of chosing a shipping option
+$WebForceShipping=true;
+// the default shipping type as DB ID, you see the ID in the "Edit shipping Options" dialog,
+// the option must be available to users with the flag _web,
+// set this to -1 if you do not want a default option
+$WebDefaultShipping=1;
+
+//customer flags
+// list of flags that customers can have, separated by spaces
+$WebCustomerFlags="newsletter reminder";
+
+//order flags
+// you can add arbitrary input fields to the checkout page, this array defines
+// what values they must have, this can be used for acknowledging standard
+// form contract (German: AGB) clauses or other formalities that you need to
+// present at EVERY check out
+$WebOrderFields=array();
+//example: standard form contract
+$WebOrderFields['sfc_ack']='on';
+
+//customer password reset
+// this is the time in seconds that the customer has to click on the reset link
+$CustomerResetTime=1 * 60 * 60;
+
+//base URL for the customer subsystem
+// leave commented out or empty if MagicSmoke should figure it out automatically
+// $BaseUrl = "https://localhost/smoke/index.php";
+
+//make sure files are interpreted as UTF-8
+// mb_language('uni');
+
+//done
+return;
+
+?>
\ No newline at end of file
diff --git a/tests/apache/etc/mods.conf b/tests/apache/etc/mods.conf
new file mode 100644 (file)
index 0000000..9b5a03e
--- /dev/null
@@ -0,0 +1,6 @@
+
+LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
+LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
+LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
+LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
+
diff --git a/tests/apache/etc/ssl.conf.tmpl b/tests/apache/etc/ssl.conf.tmpl
new file mode 100644 (file)
index 0000000..d9ee75c
--- /dev/null
@@ -0,0 +1,82 @@
+<IfModule mod_ssl.c>
+#
+# Pseudo Random Number Generator (PRNG):
+# Configure one or more sources to seed the PRNG of the SSL library.
+# The seed data should be of good random quality.
+# WARNING! On some platforms /dev/random blocks if not enough entropy
+# is available. This means you then cannot use the /dev/random device
+# because it would lead to very long connection times (as long as
+# it requires to make more entropy available). But usually those
+# platforms additionally provide a /dev/urandom device which doesn't
+# block. So, if available, use this one instead. Read the mod_ssl User
+# Manual for more details.
+#
+SSLRandomSeed startup builtin
+SSLRandomSeed startup file:/dev/urandom 512
+SSLRandomSeed connect builtin
+SSLRandomSeed connect file:/dev/urandom 512
+
+##
+##  SSL Global Context
+##
+##  All SSL configuration in this context applies both to
+##  the main server and all SSL-enabled virtual hosts.
+##
+
+#
+#   Some MIME-types for downloading Certificates and CRLs
+#
+#AddType application/x-x509-ca-cert .crt
+#AddType application/x-pkcs7-crl    .crl
+
+#   Pass Phrase Dialog:
+#   Configure the pass phrase gathering process.
+#   The filtering dialog program (`builtin' is a internal
+#   terminal dialog) has to provide the pass phrase on stdout.
+SSLPassPhraseDialog  builtin
+
+#   Inter-Process Session Cache:
+#   Configure the SSL Session Cache: First the mechanism 
+#   to use and second the expiring timeout (in seconds).
+#   (The mechanism dbm has known memory leaks and should not be used).
+#SSLSessionCache         dbm:@@/ssl_scache
+SSLSessionCache        shmcb:@@/ssl_scache(512000)
+SSLSessionCacheTimeout  300
+
+#   Semaphore:
+#   Configure the path to the mutual exclusion semaphore the
+#   SSL engine uses internally for inter-process synchronization. 
+SSLMutex  file:@@/ssl_mutex
+
+#   SSL Cipher Suite:
+#   List the ciphers that the client is permitted to negotiate. See the
+#   ciphers(1) man page from the openssl package for list of all available
+#   options.
+#   Enable only secure ciphers:
+SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
+
+#   Speed-optimized SSL Cipher configuration:
+#   If speed is your main concern (on busy HTTPS servers e.g.),
+#   you might want to force clients to specific, performance
+#   optimized ciphers. In this case, prepend those ciphers
+#   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
+#   Caveat: by giving precedence to RC4-SHA and AES128-SHA
+#   (as in the example below), most connections will no longer
+#   have perfect forward secrecy - if the server's key is
+#   compromised, captures of past or future traffic must be
+#   considered compromised, too.
+#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
+#SSLHonorCipherOrder on
+
+# enable only secure protocols: SSLv3 and TLSv1, but not SSLv2
+SSLProtocol all -SSLv2
+
+# Allow insecure renegotiation with clients which do not yet support the
+# secure renegotiation protocol. Default: Off
+#SSLInsecureRenegotiation on
+
+# Whether to forbid non-SNI clients to access name based virtual hosts.
+# Default: Off
+#SSLStrictSNIVHostCheck On
+
+</IfModule>
diff --git a/tests/config.tmpl b/tests/config.tmpl
new file mode 100644 (file)
index 0000000..8977728
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/false
+##########################################################################
+#Configuration for MagicSmoke Test Environment
+##########################################################################
+#
+#config.tmpl: template file for Debian Wheezy
+#config: actual configuration
+#
+#If you are using the same system as me (Debian Wheezy) simply
+#copy the template to "config". Otherwise you may need to modify
+#it before you start any tests.
+#
+#if you do anything fancy: use Bash-Syntax
+##########################################################################
+
+
+###################
+#TCP ports
+
+#it is recommended that you leave those as is, unless those ports are blocked
+#by some other service
+
+#the port to be used by postgres
+PG_PORT=20987
+
+#Apache ports
+HTTP_PORT=20988
+HTTPS_PORT=20989
+
+
+###################
+#Postgres Database
+
+##some magic to discover Postgres automatically, 
+##feel free to  alter/remove this
+
+#Location of Postgres in general
+PG_DIR=/usr/lib/postgresql
+#discover newest version
+PG_VER=`(cd $PG_DIR ; ls -d [0-9]*) | sort | tail -1`
+
+
+#PG_BINDIR must contain the path containing postgres binaries and helpers,
+#  the following are used: initdb, dropdb, createdb, createuser
+#PG_SERVER must contain the path to the postgres database server binary
+#  this should point to the postgres or postmaster binary
+#the other variables above can be removed if you set those two directly
+
+#Location of the Postgres Binary
+PG_BINDIR=$PG_DIR/$PG_VER/bin
+PG_SERVER=$PG_BINDIR/postgres
+
+
+###################
+#Apache Web Server
+
+#start/stop script for Apache
+#sometimes it resides in /usr/sbin, sometimes /usr/local/sbin, ...
+APACHE_CTL=/usr/sbin/apachectl
+
+#load lines of SSL/PHP5/... modules
+#these are inserted into the apache configuration - you need to include
+#everything that is needed by that configuration, at the very least these are:
+# PHP5 for the actual scripts
+# SSL for encryption (the client insists on it)
+# Authz-Host for the Order/Allow/Deny statements in the config
+# Mod-Dir for setting index.php as a default page
+APACHE_MODS="
+LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
+LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
+LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
+LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
+"
+
+#shut Apache up about the ulimit "error":
+export APACHE_ULIMIT_MAX_FILES=true
diff --git a/tests/db/etc/environment.tmpl b/tests/db/etc/environment.tmpl
new file mode 100644 (file)
index 0000000..11e978b
--- /dev/null
@@ -0,0 +1,7 @@
+# environment variables for postmaster process
+# This file has the same syntax as postgresql.conf: 
+#  VARIABLE = simple_value
+#  VARIABLE2 = 'any value!'
+# I. e. you need to enclose any value which does not only consist of letters,
+# numbers, and '-', '_', '.' in single quotes. Shell commands are not
+# evaluated.
diff --git a/tests/db/etc/pg_ctl.conf.tmpl b/tests/db/etc/pg_ctl.conf.tmpl
new file mode 100644 (file)
index 0000000..d33e363
--- /dev/null
@@ -0,0 +1,5 @@
+# Automatic pg_ctl configuration
+# This configuration file contains cluster specific options to be passed to
+# pg_ctl(1).
+
+pg_ctl_options = ''
diff --git a/tests/db/etc/pg_hba.conf.tmpl b/tests/db/etc/pg_hba.conf.tmpl
new file mode 100644 (file)
index 0000000..b0ece74
--- /dev/null
@@ -0,0 +1,93 @@
+# PostgreSQL Client Authentication Configuration File
+# ===================================================
+#
+# Refer to the "Client Authentication" section in the PostgreSQL
+# documentation for a complete description of this file.  A short
+# synopsis follows.
+#
+# This file controls: which hosts are allowed to connect, how clients
+# are authenticated, which PostgreSQL user names they can use, which
+# databases they can access.  Records take one of these forms:
+#
+# local      DATABASE  USER  METHOD  [OPTIONS]
+# host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
+# hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
+# hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
+#
+# (The uppercase items must be replaced by actual values.)
+#
+# The first field is the connection type: "local" is a Unix-domain
+# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
+# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
+# plain TCP/IP socket.
+#
+# DATABASE can be "all", "sameuser", "samerole", "replication", a
+# database name, or a comma-separated list thereof. The "all"
+# keyword does not match "replication". Access to replication
+# must be enabled in a separate record (see example below).
+#
+# USER can be "all", a user name, a group name prefixed with "+", or a
+# comma-separated list thereof.  In both the DATABASE and USER fields
+# you can also write a file name prefixed with "@" to include names
+# from a separate file.
+#
+# ADDRESS specifies the set of hosts the record matches.  It can be a
+# host name, or it is made up of an IP address and a CIDR mask that is
+# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
+# specifies the number of significant bits in the mask.  A host name
+# that starts with a dot (.) matches a suffix of the actual host name.
+# Alternatively, you can write an IP address and netmask in separate
+# columns to specify the set of hosts.  Instead of a CIDR-address, you
+# can write "samehost" to match any of the server's own IP addresses,
+# or "samenet" to match any address in any subnet that the server is
+# directly connected to.
+#
+# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
+# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert".  Note that
+# "password" sends passwords in clear text; "md5" is preferred since
+# it sends encrypted passwords.
+#
+# OPTIONS are a set of options for the authentication in the format
+# NAME=VALUE.  The available options depend on the different
+# authentication methods -- refer to the "Client Authentication"
+# section in the documentation for a list of which options are
+# available for which authentication methods.
+#
+# Database and user names containing spaces, commas, quotes and other
+# special characters must be quoted.  Quoting one of the keywords
+# "all", "sameuser", "samerole" or "replication" makes the name lose
+# its special character, and just match a database or username with
+# that name.
+#
+# This file is read on server startup and when the postmaster receives
+# a SIGHUP signal.  If you edit the file on a running system, you have
+# to SIGHUP the postmaster for the changes to take effect.  You can
+# use "pg_ctl reload" to do that.
+
+# Put your actual configuration here
+# ----------------------------------
+#
+# If you want to allow non-local connections, you need to add more
+# "host" records.  In that case you will also need to make PostgreSQL
+# listen on a non-local interface via the listen_addresses
+# configuration parameter, or via the -i or -h command line switches.
+
+
+
+
+# DO NOT DISABLE!
+# If you change this first entry you will need to make sure that the
+# database superuser can access the database using some other method.
+# Noninteractive access to all databases is required during automatic
+# maintenance (custom daily cronjobs, replication, and similar tasks).
+#
+# Database administrative login by Unix domain socket
+local   all             postgres                                peer
+
+# TYPE  DATABASE        USER            ADDRESS                 METHOD
+# "local" is for Unix domain socket connections only
+local   all             all                                     trust
+# IPv4 local connections:
+host    all             all             127.0.0.1/32            trust
+# IPv6 local connections:
+host    all             all             ::1/128                 trust
diff --git a/tests/db/etc/pg_ident.conf.tmpl b/tests/db/etc/pg_ident.conf.tmpl
new file mode 100644 (file)
index 0000000..a5870e6
--- /dev/null
@@ -0,0 +1,42 @@
+# PostgreSQL User Name Maps
+# =========================
+#
+# Refer to the PostgreSQL documentation, chapter "Client
+# Authentication" for a complete description.  A short synopsis
+# follows.
+#
+# This file controls PostgreSQL user name mapping.  It maps external
+# user names to their corresponding PostgreSQL user names.  Records
+# are of the form:
+#
+# MAPNAME  SYSTEM-USERNAME  PG-USERNAME
+#
+# (The uppercase quantities must be replaced by actual values.)
+#
+# MAPNAME is the (otherwise freely chosen) map name that was used in
+# pg_hba.conf.  SYSTEM-USERNAME is the detected user name of the
+# client.  PG-USERNAME is the requested PostgreSQL user name.  The
+# existence of a record specifies that SYSTEM-USERNAME may connect as
+# PG-USERNAME.
+#
+# If SYSTEM-USERNAME starts with a slash (/), it will be treated as a
+# regular expression.  Optionally this can contain a capture (a
+# parenthesized subexpression).  The substring matching the capture
+# will be substituted for \1 (backslash-one) if present in
+# PG-USERNAME.
+#
+# Multiple maps may be specified in this file and used by pg_hba.conf.
+#
+# No map names are defined in the default configuration.  If all
+# system user names and PostgreSQL user names are the same, you don't
+# need anything in this file.
+#
+# This file is read on server startup and when the postmaster receives
+# a SIGHUP signal.  If you edit the file on a running system, you have
+# to SIGHUP the postmaster for the changes to take effect.  You can
+# use "pg_ctl reload" to do that.
+
+# Put your actual configuration here
+# ----------------------------------
+
+# MAPNAME       SYSTEM-USERNAME         PG-USERNAME
diff --git a/tests/db/etc/postgresql.conf.tmpl b/tests/db/etc/postgresql.conf.tmpl
new file mode 100644 (file)
index 0000000..742354f
--- /dev/null
@@ -0,0 +1,556 @@
+# -----------------------------
+# PostgreSQL configuration file
+# -----------------------------
+#
+# This file consists of lines of the form:
+#
+#   name = value
+#
+# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
+# "#" anywhere on a line.  The complete list of parameter names and allowed
+# values can be found in the PostgreSQL documentation.
+#
+# The commented-out settings shown in this file represent the default values.
+# Re-commenting a setting is NOT sufficient to revert it to the default value;
+# you need to reload the server.
+#
+# This file is read on server startup and when the server receives a SIGHUP
+# signal.  If you edit the file on a running system, you have to SIGHUP the
+# server for the changes to take effect, or use "pg_ctl reload".  Some
+# parameters, which are marked below, require a server shutdown and restart to
+# take effect.
+#
+# Any parameter can also be given as a command-line option to the server, e.g.,
+# "postgres -c log_connections=on".  Some parameters can be changed at run time
+# with the "SET" SQL command.
+#
+# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
+#                MB = megabytes                     s   = seconds
+#                GB = gigabytes                     min = minutes
+#                                                   h   = hours
+#                                                   d   = days
+
+
+#------------------------------------------------------------------------------
+# FILE LOCATIONS
+#------------------------------------------------------------------------------
+
+# The default values of these variables are driven from the -D command-line
+# option or PGDATA environment variable, represented here as ConfigDir.
+
+data_directory = '@@/data'             # use data in another directory
+                                       # (change requires restart)
+hba_file = '@@/etc/pg_hba.conf'        # host-based authentication file
+                                       # (change requires restart)
+ident_file = '@@/etc/pg_ident.conf'    # ident configuration file
+                                       # (change requires restart)
+
+# If external_pid_file is not explicitly set, no extra PID file is written.
+external_pid_file = '@@/run/pg_server.pid'             # write an extra PID file
+                                       # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# CONNECTIONS AND AUTHENTICATION
+#------------------------------------------------------------------------------
+
+# - Connection Settings -
+
+#listen_addresses = 'localhost'                # what IP address(es) to listen on;
+                                       # comma-separated list of addresses;
+                                       # defaults to 'localhost', '*' = all
+                                       # (change requires restart)
+port = @PGPORT@                                # (change requires restart)
+max_connections = 10                   # (change requires restart)
+# Note:  Increasing max_connections costs ~400 bytes of shared memory per
+# connection slot, plus lock space (see max_locks_per_transaction).
+#superuser_reserved_connections = 3    # (change requires restart)
+unix_socket_directory = '@@/run'               # (change requires restart)
+#unix_socket_group = ''                        # (change requires restart)
+#unix_socket_permissions = 0777                # begin with 0 to use octal notation
+                                       # (change requires restart)
+#bonjour = off                         # advertise server via Bonjour
+                                       # (change requires restart)
+#bonjour_name = ''                     # defaults to the computer name
+                                       # (change requires restart)
+
+# - Security and Authentication -
+
+#authentication_timeout = 1min         # 1s-600s
+ssl = true                             # (change requires restart)
+#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'     # allowed SSL ciphers
+                                       # (change requires restart)
+#ssl_renegotiation_limit = 512MB       # amount of data between renegotiations
+#password_encryption = on
+#db_user_namespace = off
+
+# Kerberos and GSSAPI
+#krb_server_keyfile = ''
+#krb_srvname = 'postgres'              # (Kerberos only)
+#krb_caseins_users = off
+
+# - TCP Keepalives -
+# see "man 7 tcp" for details
+
+#tcp_keepalives_idle = 0               # TCP_KEEPIDLE, in seconds;
+                                       # 0 selects the system default
+#tcp_keepalives_interval = 0           # TCP_KEEPINTVL, in seconds;
+                                       # 0 selects the system default
+#tcp_keepalives_count = 0              # TCP_KEEPCNT;
+                                       # 0 selects the system default
+
+
+#------------------------------------------------------------------------------
+# RESOURCE USAGE (except WAL)
+#------------------------------------------------------------------------------
+
+# - Memory -
+
+shared_buffers = 24MB                  # min 128kB
+                                       # (change requires restart)
+#temp_buffers = 8MB                    # min 800kB
+#max_prepared_transactions = 0         # zero disables the feature
+                                       # (change requires restart)
+# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
+# per transaction slot, plus lock space (see max_locks_per_transaction).
+# It is not advisable to set max_prepared_transactions nonzero unless you
+# actively intend to use prepared transactions.
+#work_mem = 1MB                                # min 64kB
+#maintenance_work_mem = 16MB           # min 1MB
+#max_stack_depth = 2MB                 # min 100kB
+
+# - Kernel Resource Usage -
+
+#max_files_per_process = 1000          # min 25
+                                       # (change requires restart)
+#shared_preload_libraries = ''         # (change requires restart)
+
+# - Cost-Based Vacuum Delay -
+
+#vacuum_cost_delay = 0ms               # 0-100 milliseconds
+#vacuum_cost_page_hit = 1              # 0-10000 credits
+#vacuum_cost_page_miss = 10            # 0-10000 credits
+#vacuum_cost_page_dirty = 20           # 0-10000 credits
+#vacuum_cost_limit = 200               # 1-10000 credits
+
+# - Background Writer -
+
+#bgwriter_delay = 200ms                        # 10-10000ms between rounds
+#bgwriter_lru_maxpages = 100           # 0-1000 max buffers written/round
+#bgwriter_lru_multiplier = 2.0         # 0-10.0 multipler on buffers scanned/round
+
+# - Asynchronous Behavior -
+
+#effective_io_concurrency = 1          # 1-1000. 0 disables prefetching
+
+
+#------------------------------------------------------------------------------
+# WRITE AHEAD LOG
+#------------------------------------------------------------------------------
+
+# - Settings -
+
+#wal_level = minimal                   # minimal, archive, or hot_standby
+                                       # (change requires restart)
+#fsync = on                            # turns forced synchronization on or off
+#synchronous_commit = on               # synchronization level; on, off, or local
+#wal_sync_method = fsync               # the default is the first option
+                                       # supported by the operating system:
+                                       #   open_datasync
+                                       #   fdatasync (default on Linux)
+                                       #   fsync
+                                       #   fsync_writethrough
+                                       #   open_sync
+#full_page_writes = on                 # recover from partial page writes
+#wal_buffers = -1                      # min 32kB, -1 sets based on shared_buffers
+                                       # (change requires restart)
+#wal_writer_delay = 200ms              # 1-10000 milliseconds
+
+#commit_delay = 0                      # range 0-100000, in microseconds
+#commit_siblings = 5                   # range 1-1000
+
+# - Checkpoints -
+
+#checkpoint_segments = 3               # in logfile segments, min 1, 16MB each
+#checkpoint_timeout = 5min             # range 30s-1h
+#checkpoint_completion_target = 0.5    # checkpoint target duration, 0.0 - 1.0
+#checkpoint_warning = 30s              # 0 disables
+
+# - Archiving -
+
+#archive_mode = off            # allows archiving to be done
+                               # (change requires restart)
+#archive_command = ''          # command to use to archive a logfile segment
+#archive_timeout = 0           # force a logfile segment switch after this
+                               # number of seconds; 0 disables
+
+
+#------------------------------------------------------------------------------
+# REPLICATION
+#------------------------------------------------------------------------------
+
+# - Master Server -
+
+# These settings are ignored on a standby server
+
+#max_wal_senders = 0           # max number of walsender processes
+                               # (change requires restart)
+#wal_sender_delay = 1s         # walsender cycle time, 1-10000 milliseconds
+#wal_keep_segments = 0         # in logfile segments, 16MB each; 0 disables
+#vacuum_defer_cleanup_age = 0  # number of xacts by which cleanup is delayed
+#replication_timeout = 60s     # in milliseconds; 0 disables
+#synchronous_standby_names = ''        # standby servers that provide sync rep
+                               # comma-separated list of application_name
+                               # from standby(s); '*' = all
+
+# - Standby Servers -
+
+# These settings are ignored on a master server
+
+#hot_standby = off                     # "on" allows queries during recovery
+                                       # (change requires restart)
+#max_standby_archive_delay = 30s       # max delay before canceling queries
+                                       # when reading WAL from archive;
+                                       # -1 allows indefinite delay
+#max_standby_streaming_delay = 30s     # max delay before canceling queries
+                                       # when reading streaming WAL;
+                                       # -1 allows indefinite delay
+#wal_receiver_status_interval = 10s    # send replies at least this often
+                                       # 0 disables
+#hot_standby_feedback = off            # send info from standby to prevent
+                                       # query conflicts
+
+
+#------------------------------------------------------------------------------
+# QUERY TUNING
+#------------------------------------------------------------------------------
+
+# - Planner Method Configuration -
+
+#enable_bitmapscan = on
+#enable_hashagg = on
+#enable_hashjoin = on
+#enable_indexscan = on
+#enable_material = on
+#enable_mergejoin = on
+#enable_nestloop = on
+#enable_seqscan = on
+#enable_sort = on
+#enable_tidscan = on
+
+# - Planner Cost Constants -
+
+#seq_page_cost = 1.0                   # measured on an arbitrary scale
+#random_page_cost = 4.0                        # same scale as above
+#cpu_tuple_cost = 0.01                 # same scale as above
+#cpu_index_tuple_cost = 0.005          # same scale as above
+#cpu_operator_cost = 0.0025            # same scale as above
+#effective_cache_size = 128MB
+
+# - Genetic Query Optimizer -
+
+#geqo = on
+#geqo_threshold = 12
+#geqo_effort = 5                       # range 1-10
+#geqo_pool_size = 0                    # selects default based on effort
+#geqo_generations = 0                  # selects default based on effort
+#geqo_selection_bias = 2.0             # range 1.5-2.0
+#geqo_seed = 0.0                       # range 0.0-1.0
+
+# - Other Planner Options -
+
+#default_statistics_target = 100       # range 1-10000
+#constraint_exclusion = partition      # on, off, or partition
+#cursor_tuple_fraction = 0.1           # range 0.0-1.0
+#from_collapse_limit = 8
+#join_collapse_limit = 8               # 1 disables collapsing of explicit
+                                       # JOIN clauses
+
+
+#------------------------------------------------------------------------------
+# ERROR REPORTING AND LOGGING
+#------------------------------------------------------------------------------
+
+# - Where to Log -
+
+#log_destination = 'stderr'            # Valid values are combinations of
+                                       # stderr, csvlog, syslog, and eventlog,
+                                       # depending on platform.  csvlog
+                                       # requires logging_collector to be on.
+
+# This is used when logging to stderr:
+#logging_collector = off               # Enable capturing of stderr and csvlog
+                                       # into log files. Required to be on for
+                                       # csvlogs.
+                                       # (change requires restart)
+
+# These are only used if logging_collector is on:
+#log_directory = 'pg_log'              # directory where log files are written,
+                                       # can be absolute or relative to PGDATA
+#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'       # log file name pattern,
+                                       # can include strftime() escapes
+#log_file_mode = 0600                  # creation mode for log files,
+                                       # begin with 0 to use octal notation
+#log_truncate_on_rotation = off                # If on, an existing log file with the
+                                       # same name as the new log file will be
+                                       # truncated rather than appended to.
+                                       # But such truncation only occurs on
+                                       # time-driven rotation, not on restarts
+                                       # or size-driven rotation.  Default is
+                                       # off, meaning append to existing files
+                                       # in all cases.
+#log_rotation_age = 1d                 # Automatic rotation of logfiles will
+                                       # happen after that time.  0 disables.
+#log_rotation_size = 10MB              # Automatic rotation of logfiles will
+                                       # happen after that much log output.
+                                       # 0 disables.
+
+# These are relevant when logging to syslog:
+#syslog_facility = 'LOCAL0'
+#syslog_ident = 'postgres'
+
+#silent_mode = off                     # Run server silently.
+                                       # DO NOT USE without syslog or
+                                       # logging_collector
+                                       # (change requires restart)
+
+
+# - When to Log -
+
+#client_min_messages = notice          # values in order of decreasing detail:
+                                       #   debug5
+                                       #   debug4
+                                       #   debug3
+                                       #   debug2
+                                       #   debug1
+                                       #   log
+                                       #   notice
+                                       #   warning
+                                       #   error
+
+#log_min_messages = warning            # values in order of decreasing detail:
+                                       #   debug5
+                                       #   debug4
+                                       #   debug3
+                                       #   debug2
+                                       #   debug1
+                                       #   info
+                                       #   notice
+                                       #   warning
+                                       #   error
+                                       #   log
+                                       #   fatal
+                                       #   panic
+
+#log_min_error_statement = error       # values in order of decreasing detail:
+                                       #   debug5
+                                       #   debug4
+                                       #   debug3
+                                       #   debug2
+                                       #   debug1
+                                       #   info
+                                       #   notice
+                                       #   warning
+                                       #   error
+                                       #   log
+                                       #   fatal
+                                       #   panic (effectively off)
+
+#log_min_duration_statement = -1       # -1 is disabled, 0 logs all statements
+                                       # and their durations, > 0 logs only
+                                       # statements running at least this number
+                                       # of milliseconds
+
+
+# - What to Log -
+
+#debug_print_parse = off
+#debug_print_rewritten = off
+#debug_print_plan = off
+#debug_pretty_print = on
+#log_checkpoints = off
+#log_connections = off
+#log_disconnections = off
+#log_duration = off
+#log_error_verbosity = default         # terse, default, or verbose messages
+#log_hostname = off
+log_line_prefix = '%t '                        # special values:
+                                       #   %a = application name
+                                       #   %u = user name
+                                       #   %d = database name
+                                       #   %r = remote host and port
+                                       #   %h = remote host
+                                       #   %p = process ID
+                                       #   %t = timestamp without milliseconds
+                                       #   %m = timestamp with milliseconds
+                                       #   %i = command tag
+                                       #   %e = SQL state
+                                       #   %c = session ID
+                                       #   %l = session line number
+                                       #   %s = session start timestamp
+                                       #   %v = virtual transaction ID
+                                       #   %x = transaction ID (0 if none)
+                                       #   %q = stop here in non-session
+                                       #        processes
+                                       #   %% = '%'
+                                       # e.g. '<%u%%%d> '
+#log_lock_waits = off                  # log lock waits >= deadlock_timeout
+#log_statement = 'none'                        # none, ddl, mod, all
+#log_temp_files = -1                   # log temporary files equal or larger
+                                       # than the specified size in kilobytes;
+                                       # -1 disables, 0 logs all temp files
+#log_timezone = '(defaults to server environment setting)'
+
+
+#------------------------------------------------------------------------------
+# RUNTIME STATISTICS
+#------------------------------------------------------------------------------
+
+# - Query/Index Statistics Collector -
+
+#track_activities = on
+#track_counts = on
+#track_functions = none                        # none, pl, all
+#track_activity_query_size = 1024      # (change requires restart)
+#update_process_title = on
+#stats_temp_directory = 'pg_stat_tmp'
+
+
+# - Statistics Monitoring -
+
+#log_parser_stats = off
+#log_planner_stats = off
+#log_executor_stats = off
+#log_statement_stats = off
+
+
+#------------------------------------------------------------------------------
+# AUTOVACUUM PARAMETERS
+#------------------------------------------------------------------------------
+
+#autovacuum = on                       # Enable autovacuum subprocess?  'on'
+                                       # requires track_counts to also be on.
+#log_autovacuum_min_duration = -1      # -1 disables, 0 logs all actions and
+                                       # their durations, > 0 logs only
+                                       # actions running at least this number
+                                       # of milliseconds.
+#autovacuum_max_workers = 3            # max number of autovacuum subprocesses
+                                       # (change requires restart)
+#autovacuum_naptime = 1min             # time between autovacuum runs
+#autovacuum_vacuum_threshold = 50      # min number of row updates before
+                                       # vacuum
+#autovacuum_analyze_threshold = 50     # min number of row updates before
+                                       # analyze
+#autovacuum_vacuum_scale_factor = 0.2  # fraction of table size before vacuum
+#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
+#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
+                                       # (change requires restart)
+#autovacuum_vacuum_cost_delay = 20ms   # default vacuum cost delay for
+                                       # autovacuum, in milliseconds;
+                                       # -1 means use vacuum_cost_delay
+#autovacuum_vacuum_cost_limit = -1     # default vacuum cost limit for
+                                       # autovacuum, -1 means use
+                                       # vacuum_cost_limit
+
+
+#------------------------------------------------------------------------------
+# CLIENT CONNECTION DEFAULTS
+#------------------------------------------------------------------------------
+
+# - Statement Behavior -
+
+#search_path = '"$user",public'                # schema names
+#default_tablespace = ''               # a tablespace name, '' uses the default
+#temp_tablespaces = ''                 # a list of tablespace names, '' uses
+                                       # only default tablespace
+#check_function_bodies = on
+#default_transaction_isolation = 'read committed'
+#default_transaction_read_only = off
+#default_transaction_deferrable = off
+#session_replication_role = 'origin'
+#statement_timeout = 0                 # in milliseconds, 0 is disabled
+#vacuum_freeze_min_age = 50000000
+#vacuum_freeze_table_age = 150000000
+#bytea_output = 'hex'                  # hex, escape
+#xmlbinary = 'base64'
+#xmloption = 'content'
+
+# - Locale and Formatting -
+
+datestyle = 'iso, mdy'
+#intervalstyle = 'postgres'
+#timezone = '(defaults to server environment setting)'
+#timezone_abbreviations = 'Default'     # Select the set of available time zone
+                                       # abbreviations.  Currently, there are
+                                       #   Default
+                                       #   Australia
+                                       #   India
+                                       # You can create your own file in
+                                       # share/timezonesets/.
+#extra_float_digits = 0                        # min -15, max 3
+#client_encoding = sql_ascii           # actually, defaults to database
+                                       # encoding
+
+# These settings are initialized by initdb, but they can be changed.
+lc_messages = 'C'                      # locale for system error message
+                                       # strings
+lc_monetary = 'C'                      # locale for monetary formatting
+lc_numeric = 'C'                       # locale for number formatting
+lc_time = 'C'                          # locale for time formatting
+
+# default configuration for text search
+default_text_search_config = 'pg_catalog.english'
+
+# - Other Defaults -
+
+#dynamic_library_path = '$libdir'
+#local_preload_libraries = ''
+
+
+#------------------------------------------------------------------------------
+# LOCK MANAGEMENT
+#------------------------------------------------------------------------------
+
+#deadlock_timeout = 1s
+#max_locks_per_transaction = 64                # min 10
+                                       # (change requires restart)
+# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
+# max_locks_per_transaction * (max_connections + max_prepared_transactions)
+# lock table slots.
+#max_pred_locks_per_transaction = 64   # min 10
+                                       # (change requires restart)
+
+#------------------------------------------------------------------------------
+# VERSION/PLATFORM COMPATIBILITY
+#------------------------------------------------------------------------------
+
+# - Previous PostgreSQL Versions -
+
+#array_nulls = on
+#backslash_quote = safe_encoding       # on, off, or safe_encoding
+#default_with_oids = off
+#escape_string_warning = on
+#lo_compat_privileges = off
+#quote_all_identifiers = off
+#sql_inheritance = on
+#standard_conforming_strings = on
+#synchronize_seqscans = on
+
+# - Other Platforms and Clients -
+
+#transform_null_equals = off
+
+
+#------------------------------------------------------------------------------
+# ERROR HANDLING
+#------------------------------------------------------------------------------
+
+#exit_on_error = off                           # terminate session on any error?
+#restart_after_crash = on                      # reinitialize after backend crash?
+
+
+#------------------------------------------------------------------------------
+# CUSTOMIZED OPTIONS
+#------------------------------------------------------------------------------
+
+#custom_variable_classes = ''          # list of custom variable class names
diff --git a/tests/db/etc/start.conf.tmpl b/tests/db/etc/start.conf.tmpl
new file mode 100644 (file)
index 0000000..9613e2b
--- /dev/null
@@ -0,0 +1,9 @@
+# Automatic startup configuration
+# auto: automatically start/stop the cluster in the init script
+# manual: do not start/stop in init scripts, but allow manual startup with
+#         pg_ctlcluster
+# disabled: do not allow manual startup with pg_ctlcluster (this can be easily
+#           circumvented and is only meant to be a small protection for
+#           accidents).
+
+auto
diff --git a/tests/setup-clean.sh b/tests/setup-clean.sh
new file mode 100755 (executable)
index 0000000..d6b80ae
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+########################################################################
+# MagicSmoke Test Setup: Clean-Up Script
+########################################################################
+#
+# This script deletes all remnants of previous setups.
+#
+########################################################################
+
+cd `dirname $0`
+
+####################################
+#Postgres
+
+rm -rf db/data db/run
+(
+ cd db/etc
+ for i in *.tmpl ; do rm -f ${i%.tmpl} ; done
+)
+
+####################################
+#Apache
+
+rm -rf apache/log apache/www
+(
+ cd apache/etc
+ for i in *.tmpl ; do rm -f ${i%.tmpl} ; done
+ rm -f server.*
+)
+
+exit 0
diff --git a/tests/setup-create.sh b/tests/setup-create.sh
new file mode 100755 (executable)
index 0000000..9fc7e1b
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/bash
+########################################################################
+# MagicSmoke Test Setup: Creation Script
+########################################################################
+#
+# This script (re-)creates the database.
+#
+########################################################################
+
+cd `dirname $0`
+
+#load defaults
+test -f config || {
+        echo "No configuration found! Please copy config.tmpl to config and adapt it!" >&2
+        exit 1
+}
+. ./config
+
+####################################
+#Postgres
+
+sleep 1 
+echo Dropping/Creating Postgres DB and User.
+$PG_BINDIR/createuser -h localhost -p $PG_PORT -d -R -S smoke 2>/dev/null || true
+$PG_BINDIR/dropdb -h localhost -p $PG_PORT -U smoke -w smoke 2>/dev/null || true
+$PG_BINDIR/createdb -h localhost -p $PG_PORT -U smoke -w smoke
+
+        
+####################################
+#Apache
+
+#base settings
+PARAM="--user=Admin --password=Test -O /dev/null"
+URL=http://localhost:$HTTP_PORT/admin.php
+
+#create tables
+echo Creating DB Structure.
+wget $URL?CreateDB=now $PARAM
+
+#add admin user (uname=admin passwd=admin)
+echo Creating first MagicSmoke User.
+wget $URL --post-data='adminuser=admin&adminpwd1=admin&adminpwd2=admin' $PARAM
+
+#add host key
+echo Submitting Test Host Key.
+
+cat >key.web <<EOF
+------bb
+Content-Disposition: form-data; name="host"; filename="testhost.mshk"
+Content-Type: application/octet-stream
+EOF
+echo >>key.web
+cat testhost.mshk >>key.web
+cat >>key.web <<EOF
+------bb
+Content-Disposition: form-data; name="updatehost"
+
+Upload
+------bb--
+EOF
+
+wget $URL --post-file=key.web --header="Content-Type: multipart/form-data; boundary=----bb" $PARAM
+rm -f key.web
+
+
+##############
+#done
+exit 0
diff --git a/tests/setup-start.sh b/tests/setup-start.sh
new file mode 100755 (executable)
index 0000000..cb51d33
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/bash
+########################################################################
+# MagicSmoke Test Setup: Start Script
+########################################################################
+#
+# This script starts the server components for MagicSmoke Tests.
+#
+########################################################################
+
+cd `dirname $0`
+
+#load defaults
+test -f config || {
+        echo "No configuration found! Please copy config.tmpl to config and adapt it!" >&2
+        exit 1
+}
+. ./config
+
+####################################
+#Postgres
+
+#create Postgres environment
+( 
+        PG_DD="`pwd`/db"
+        cd db/etc
+        for i in *.tmpl ; do
+                sed "s,@@,$PG_DD," <$i | \
+                sed "s,@PGPORT@,$PG_PORT," \
+                >${i%.tmpl}
+        done
+)
+test -d db/data || {
+        mkdir -p db/data
+        chmod 700 db/data
+        $PG_BINDIR/initdb -D db/data
+        ( cd db/data ; ln -s ../../ssl/server.* . )
+}
+test -d db/run || mkdir -p db/run
+
+#start Postgres
+echo Starting Postgres.
+$PG_SERVER -D `pwd`/db/data -c config_file=`pwd`/db/etc/postgresql.conf >>db/run/server.log 2>&1 &
+
+        
+####################################
+#Apache
+
+#create environment
+mkdir -p apache/log
+(
+        ADIR="`pwd`/apache"
+        cd apache/etc
+        for i in *.tmpl ; do
+                sed "s,@@,$ADIR," <$i | \
+                sed "s,@HTTPPORT@,$HTTP_PORT," | \
+                sed "s,@HTTPSPORT@,$HTTPS_PORT,"  \
+                >${i%.tmpl}
+        done
+        ln -sf ../../ssl/server.* . || true
+        echo "$APACHE_MODS" >mods.conf
+)
+
+test -d apache/www || (
+        mkdir apache/www
+        ../www/install.sh apache/www
+        ( cd apache/www ; rm -f config.php ; ln -s ../etc/config.php config.php )
+)
+
+#start Apache
+echo Starting Apache.
+$APACHE_CTL -k start -f `pwd`/apache/etc/apache2.conf
+
+exit 0
diff --git a/tests/setup-stop.sh b/tests/setup-stop.sh
new file mode 100755 (executable)
index 0000000..8f68c45
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/bash
+########################################################################
+# MagicSmoke Test Setup: Stop Script
+########################################################################
+#
+# This script stops the server components for MagicSmoke Tests.
+#
+########################################################################
+
+cd `dirname $0`
+
+#load defaults
+test -f config || {
+        echo "No configuration found! Please copy config.tmpl to config and adapt it!" >&2
+        exit 1
+}
+. ./config
+
+####################################
+#Postgres
+
+#stop Postgres
+test -f db/run/pg_server.pid && {
+        echo Shutting down Postgres.
+        kill `cat db/run/pg_server.pid`
+        rm -f db/run/pg_server.pid
+} || {
+        echo Postgres does not seem to be running.
+        test $(ps x|egrep '[p]ostgres|[p]ostmaster' | wc -l) -gt 0 && {
+          echo "However, a Postgres process seems to be running under your UID."
+          echo "It may be a left-over and you may want to kill it."
+        }
+}
+
+
+####################################
+#Apache
+
+#stop Apache
+echo Shutting down Apache.
+$APACHE_CTL -k stop -f `pwd`/apache/etc/apache2.conf
+
+
+echo Done.
+exit 0
diff --git a/tests/ssl/gensslcert.sh b/tests/ssl/gensslcert.sh
new file mode 100755 (executable)
index 0000000..ee56265
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Call this script to regenerate the SSL key.
+#Normally you won't need to do this, unless you feel paranoid about
+#anybody disturbing your tests, but then there are bigger holes...
+
+export RANDFILE=/dev/urandom
+SER=`date +%Y%m%d%H%M`
+
+openssl req -new -x509 -nodes -out server.crt \
+  -keyout server.key -days 4000 -set_serial $SER \
+  -subj "/C=OZ/ST=Greenwitchcounty/L=EmeraldCity/O=Localhosters/CN=localhost/emailAddress=root@localhost"
+
+chmod 600 server.key
\ No newline at end of file
diff --git a/tests/ssl/server.crt b/tests/ssl/server.crt
new file mode 100644 (file)
index 0000000..c3c500b
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID4TCCAsmgAwIBAgIFLt6Za/MwDQYJKoZIhvcNAQEFBQAwgYgxCzAJBgNVBAYT
+Ak9aMRkwFwYDVQQIDBBHcmVlbndpdGNoY291bnR5MRQwEgYDVQQHDAtFbWVyYWxk
+Q2l0eTEVMBMGA1UECgwMTG9jYWxob3N0ZXJzMRIwEAYDVQQDDAlsb2NhbGhvc3Qx
+HTAbBgkqhkiG9w0BCQEWDnJvb3RAbG9jYWxob3N0MB4XDTEzMDMwOTIxMTE0MFoX
+DTI0MDIyMDIxMTE0MFowgYgxCzAJBgNVBAYTAk9aMRkwFwYDVQQIDBBHcmVlbndp
+dGNoY291bnR5MRQwEgYDVQQHDAtFbWVyYWxkQ2l0eTEVMBMGA1UECgwMTG9jYWxo
+b3N0ZXJzMRIwEAYDVQQDDAlsb2NhbGhvc3QxHTAbBgkqhkiG9w0BCQEWDnJvb3RA
+bG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5dLUzxir
+iGZXJ6J+ALGJ0OVma6PGYFzT9NfpZqBZGxURu7TsoM8UhLeNSuWDCvglmeaEAWQX
+IPPEJx3OXUnCmdslrt8wSMW91xYAAdezFM5GBIEA5u74KcCJUJ3VIhpr9dvrT2sf
+AGEKp8F8/F6nqf6MTV5RVwa2baO/EBdbSfEHUQ7SUOKPtv30rEwJKVzmCglEI2hg
+WyZQv8FztCP3Zn36oZX+kwCYflV8JmhPLqs8jLjQgLB5lvN0PpBk37njrd55WyNJ
+kgR4TSahUPQWroEoss8y6BYYjMj6QudYw44TqrCjFJ/zlaz7h3yOeDV8TrMUckHa
+1vBYzj6gxzSzGQIDAQABo1AwTjAdBgNVHQ4EFgQUMCaNea3RXbGRPDtE6v/Ko4i6
+WpUwHwYDVR0jBBgwFoAUMCaNea3RXbGRPDtE6v/Ko4i6WpUwDAYDVR0TBAUwAwEB
+/zANBgkqhkiG9w0BAQUFAAOCAQEAk8Xhd380cyTk/NP5FeCkgSfmlxtT/6BwWNzb
+fyhSjFZ/XExLGXBjBeMtQfuMd6tu6O1IavaI5F6mmlW20JSa9e962j1PHOeUbKdZ
+IRk5Hp112uAG5W/AXF3TMR09bXJYNspFId/NonwxT1U8uJeglOhDdCHEkir7cuGS
+WYENS4g3zyJcyyMvmJieBgnz99072gk4kT7+m5SOY3iU5Iik0Udzxx7bQi7/u2QD
+B5+8Qa4GdKnTb6/saRaYrbL3a/GkvINzJ46Nn9PsKKsC0NiZKXvzDJV0KeRGtxXx
+F3qsOEELtXrsG7+lQQs1SR8SikNuBUHUu56lOU/8uPaixyxiYA==
+-----END CERTIFICATE-----
diff --git a/tests/ssl/server.key b/tests/ssl/server.key
new file mode 100644 (file)
index 0000000..e34da2b
--- /dev/null
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDl0tTPGKuIZlcn
+on4AsYnQ5WZro8ZgXNP01+lmoFkbFRG7tOygzxSEt41K5YMK+CWZ5oQBZBcg88Qn
+Hc5dScKZ2yWu3zBIxb3XFgAB17MUzkYEgQDm7vgpwIlQndUiGmv12+tPax8AYQqn
+wXz8Xqep/oxNXlFXBrZto78QF1tJ8QdRDtJQ4o+2/fSsTAkpXOYKCUQjaGBbJlC/
+wXO0I/dmffqhlf6TAJh+VXwmaE8uqzyMuNCAsHmW83Q+kGTfueOt3nlbI0mSBHhN
+JqFQ9BaugSiyzzLoFhiMyPpC51jDjhOqsKMUn/OVrPuHfI54NXxOsxRyQdrW8FjO
+PqDHNLMZAgMBAAECggEBAN9gy407CkZ6Sk3wxw2/ghdzUNhgh8lTkIRTc71XLyR+
+lwzd7nziqavRiFh6uaLozAtJHZcIhN53cHkgpFrR/X5zna3ZquGgqUMsU/d2gs4/
+K5jnFkxfiv9x70VXEzihe7us9IrtsGU67RNeoi/dhJNbIV11xhOTJ69rT6LBQO6c
+qhd7cPM+gWBM+ltClObnWSUTdZDvfWtXv28HBFj1GK1SH56VXgeHw1Loar3kjFwG
+d90rH7BbO75v7zG66D/dZSSLZ1YsT30DtCmj6Aor2TsIhdx4hyNFxNHu+OEczkK8
+fCN1ylcXOxU09B3JRH06VmqUCVbAXCBf88hKat00XW0CgYEA/kaUC6XzzM9TPdjd
+qjN7bmOTQ2ok8jiqVt0dBjJGkDli8qNgrtoey+ZealpQ1UmJcogR25H1nAQc2LHQ
+BInomguOACc3sDkg6SJIygzps/Ne0jVlShl6uqj/2yftRcW8KaNtKBJ6VHWVPldm
+jD+2GU76aV5SzKfuwjz7nH+khOMCgYEA52HN3XbUbVCv9tePDU9+Qa/OddU3+ZRG
+WEMYGCE9mt2ZuCN7zfPIrHGX+9UrUxH1okfeTDBiDjEKJcHVLJjIKimKRxzo1NNe
+QGdUpiBZYjNy7/WvkQsIDbW619V2kwDdAcCOKh/cRJTvIXfwOMueQ+7iZZiPC1ny
+pjZH9ZeL5NMCgYEAjM4CfyzHg7uvCcmEfhKCIE/NpYAqs2MDmJRa1SqT/pt4moo0
+KL8qXJjV4ajfqCxPi3ekA+Wgj2OLocddPJYtktghKx6MbO5FtjPBAPoDlB2JfXgJ
+/e18E88v12kVsBReLOSNtqn8ybZPDbWSWMmTChK9Ago0aZX41eC1KCVasicCgYEA
+zNis7oW2mbUWpD3A+zLGf5cK/Q0wyjf4c0mrOimrpcDMx9Y6VGKg5fKHcMAP5DKB
+OhPQfblUBmZqKnVJqnr0s0clkcHJbCpZRkF1EsKO/7624jSsI4gVsDWU3mKw4IKi
+J1v3QNoGI32LnCDYPyAd1NzX+MQw2AbhKT/jQ03Q31sCgYBYZT6joEc+cw38FBzI
+VIdf4gJUgQ5FUjLr0ftYPCZWaycyznsmlf7cLC3MolqwZHikgujX9a9KqosRBEFN
+CN2h8Ek4SU24GjW9K6wTZWoA5c5AHvJSjFCzL5HgykK8X2HiNDj3pnDF4luQ6FF2
+MlwT2FZu2hJsUv/4tHEEkSRvRQ==
+-----END PRIVATE KEY-----
diff --git a/tests/testhost.mshk b/tests/testhost.mshk
new file mode 100644 (file)
index 0000000..ba7a02e
--- /dev/null
@@ -0,0 +1,4 @@
+MagicSmokeHostKey
+testhost
+558fe572747ec293297814cb72fe1097e93281c2b288a08b881963bffc6d2041712831b3026b0cee
+616338d88d686c93987d94740f630126