jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1484184 - in /incubator/jspwiki/trunk: ./ etc/db/ src/main/config/ src/main/config/db/ src/main/java/org/apache/wiki/ src/main/java/org/apache/wiki/auth/authorize/ src/main/java/org/apache/wiki/auth/user/ src/test/config/ src/test/java/org...
Date Sat, 18 May 2013 21:04:52 GMT
Author: gmazza
Date: Sat May 18 21:04:51 2013
New Revision: 1484184

URL: http://svn.apache.org/r1484184
Log:
Removed filtering from DB creation and DB test scripts, retained it as an option for external
users.

Added:
    incubator/jspwiki/trunk/src/main/config/
    incubator/jspwiki/trunk/src/main/config/db/
    incubator/jspwiki/trunk/src/main/config/db/hsql.ddl
    incubator/jspwiki/trunk/src/main/config/db/postgresql.ddl
    incubator/jspwiki/trunk/src/test/config/
    incubator/jspwiki/trunk/src/test/config/hsql-userdb-setup.ddl
    incubator/jspwiki/trunk/src/test/config/hsql-userdb-teardown.ddl
Removed:
    incubator/jspwiki/trunk/etc/db/
Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml
    incubator/jspwiki/trunk/pom.xml
    incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
    incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
    incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java
    incubator/jspwiki/trunk/src/test/resources/jdbc.properties
    incubator/jspwiki/trunk/src/test/resources/jspwiki.properties

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat May 18 21:04:51 2013
@@ -1,4 +1,12 @@
-2013-05-16  Glen Mazza (glenmazza AT apache DOT org)
+2013-05-18  Glen Mazza (gmazza AT apache DOT org)
+
+       * 2.9.2-incubating-1
+       
+       * Removed filtering within DB and DB test creation scripts although 
+         retained it within JDBC[User|Group]Database.java for users
+         wishing to use different table/column names.
+
+2013-05-16  Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.2-incubating-0
        
@@ -6,7 +14,7 @@
          from tests/etc/db to target/etc/db, removed unused Ant API-difference
          detector & switched to Maven Clirr plugin equivalent.
 
-2013-05-06  Glen Mazza (glenmazza AT apache DOT org)
+2013-05-06  Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-10
        
@@ -19,7 +27,7 @@
        * Refactored TemplateManager#listLanguages(PageContext pageContext) so it doesn't
search for 
          i18n files under a specific jar filename
        
-2013-05-03 Glen Mazza (glenmazza AT apache DOT org)
+2013-05-03 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-8
 
@@ -27,7 +35,7 @@
          location; activated Maven filtering for those files and updated build.xml and
          pom.xml to point to new location for these files. 
 
-2013-05-02 Glen Mazza (glenmazza AT apache DOT org)
+2013-05-02 Glen Mazza (gmazza AT apache DOT org)
 
        * Removed install.sh, build.sh/build.bat/build.properties.win, moved latter's
          info into build.properties.
@@ -36,7 +44,7 @@
 
        * Added Maven-only filters.properties to src/main/filters (not yet used)
         
-2013-04-30 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-30 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-7
 
@@ -44,7 +52,7 @@
          to stop duplicating those resources in both webapps and webapps/WEB-INF
          
 
-2013-04-30 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-30 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-6
 
@@ -52,7 +60,7 @@
          
        * removed unused etc/dtd folder
 
-2013-04-29 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-29 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-5
 
@@ -60,7 +68,7 @@
          
        * Updated build.xml and pom.xml for new i18n source locations
 
-2013-04-25 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-25 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-4
 
@@ -69,7 +77,7 @@
          
        * Updated build.xml and pom.xml for new ini source locations
 
-2013-04-24 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-24 Glen Mazza (gmazza AT apache DOT org)
 
        * 2.9.1-incubating-3
 
@@ -89,7 +97,7 @@
 
        * fixed JSPWIKI-396): UTF-8 characters in wiki pages incorrectly rendered if served
by Tomcat
 
-2013-04-14 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-14 Glen Mazza (gmazza AT apache DOT org)
 
        * Start of Selenium plugin (just testing prior to it moving into its own module)
          
@@ -101,25 +109,25 @@
 
        * 2.9.1-incubating-0
        
-2013-04-04 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-04 Glen Mazza (gmazza AT apache DOT org)
 
        * Updated pom.xml by removing Jaxen transitive dependencies and providing
          comments on how to deploy via tomcat7:run-war and tomcat7:redeploy
 
-2013-04-02 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-02 Glen Mazza (gmazza AT apache DOT org)
 
        * Removed apparently unused stripes library from WAR created by build.xml
 
        * Updated Maven WAR plugin to bring in WEB-INF artifacts: classes, JARs, etc.
 
-2013-04-01 Glen Mazza (glenmazza AT apache DOT org)
+2013-04-01 Glen Mazza (gmazza AT apache DOT org)
 
        * Added YUICompressor Maven plugin into pom.xml to do the same compression
          done by the Ant build script to CSS and JS files in webdocs/scripts and /templates
 
        * Updated Maven WAR plugin to bring in the webdocs/scripts and /templates files.
 
-2013-03-24 Glen Mazza (glenmazza AT apache DOT org)
+2013-03-24 Glen Mazza (gmazza AT apache DOT org)
 
        * Removed empty src/applets folder
 
@@ -142,7 +150,7 @@
 
        * fixed JSPWIKI-765): lucene search returns 3 results at max, discovered by Dave Koelmeyer
 
-2013-03-06 Glen Mazza (glenmazza AT apache DOT org)
+2013-03-06 Glen Mazza (gmazza AT apache DOT org)
 
        * Upgraded Maven's tomcat plugin to latest version 2.1
 

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Sat May 18 21:04:51 2013
@@ -1277,24 +1277,8 @@ To automate the JAR signing processs, yo
   <target name="db-properties" depends="init" if="jdbc.driver.id">
 
     <!-- Check for the presence of the database driver & script dir -->
-    <check-file file="etc/db/${jdbc.driver.id}"      prop="db.scripts" />
     <check-file file="${jdbc.driver.jar}"            prop="jdbc.jar.present" />
 
-    <!-- Bulk-copy the table setup/teardown scripts -->
-    <property name="tests.db.scripts" value="target/etc/db/${jdbc.driver.id}" />
-    <mkdir dir="${tests.db.scripts}" />
-    <copy toDir="${tests.db.scripts}" overwrite="true">
-      <fileset dir="${db.scripts}" />
-      <filterset>
-        <filtersfile file="target/test-classes/jspwiki.properties" />
-        <filtersfile file="build.properties" />
-      </filterset>
-    </copy>
-
-    <!-- Check if the customized database scripts exist -->
-    <check-file file="${tests.db.scripts}/userdb-setup.ddl"    prop="userdb.setup" />
-    <check-file file="${tests.db.scripts}/userdb-teardown.ddl" prop="userdb.teardown"
/>
-
     <!-- If it's the Hypersonic database, set a special flag -->
     <condition property="hsql">
       <equals arg1="${jdbc.driver.id}" arg2="hsql" />

Modified: incubator/jspwiki/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/pom.xml?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/pom.xml (original)
+++ incubator/jspwiki/trunk/pom.xml Sat May 18 21:04:51 2013
@@ -305,27 +305,6 @@
                            <goal>run</goal>
                        </goals>
                    </execution>
-                    <execution>
-                        <phase>process-test-resources</phase>
-                        <id>compile</id>
-                        <configuration>
-                            <target>
-                                <!-- Copy the database configuration information -->
-                                <mkdir dir="target/etc/db/hsql" />
-                                <!-- Bulk-copy the table setup/teardown scripts -->
-                                <copy toDir="target/etc/db/hsql" overwrite="true">
-                                    <fileset dir="etc/db/hsql" />
-                                    <filterset>
-                                        <filtersfile file="target/test-classes/jspwiki.properties"
/>
-                                        <filtersfile file="build.properties" />
-                                    </filterset>
-                                </copy>
-                           </target>
-                       </configuration>
-                       <goals>
-                           <goal>run</goal>
-                       </goals>
-                   </execution>
                </executions>
             </plugin>
             <!-- Surefire plugin (running unit tests):

Added: incubator/jspwiki/trunk/src/main/config/db/hsql.ddl
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/config/db/hsql.ddl?rev=1484184&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/main/config/db/hsql.ddl (added)
+++ incubator/jspwiki/trunk/src/main/config/db/hsql.ddl Sat May 18 21:04:51 2013
@@ -0,0 +1,117 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+drop table users if exists;
+drop table roles if exists;
+drop table groups if exists;
+drop table group_members if exists;
+drop user jspwiki;
+
+create table users (
+  uid varchar(100),
+  email varchar(100),
+  full_name varchar(100),
+  login_name varchar(100) not null,
+  password varchar(100),
+  wiki_name varchar(100),
+  created timestamp,
+  modified timestamp,
+  lock_expiry timestamp,
+  attributes longvarchar,
+  constraint users primary key (uid)
+);
+
+create table roles (
+  login_name varchar(100) not null,
+  role varchar(100) not null
+);
+
+create table groups (
+  name varchar(100) not null,
+  creator varchar(100),
+  created timestamp,
+  modifier varchar(100),
+  modified timestamp,
+  constraint groups primary key (name)
+);
+
+create table group_members (
+  name varchar(100) not null,
+  member varchar(100) not null,
+  constraint group_members primary key
+    (name,member)
+);
+
+create user jspwiki password "password";
+
+grant select, insert, update, delete on users to jspwiki;
+grant select, insert, update, delete on roles to jspwiki;
+grant select, insert, update, delete on groups to jspwiki;
+grant select, insert, update, delete on group_members to jspwiki;
+
+insert into users (
+  uid,
+  email,
+  full_name,
+  login_name,
+  password,
+  wiki_name
+) values (
+  '-6852820166199419346',
+  'admin@locahost',
+  'Administrator',
+  'admin',
+  '{SSHA}6YNKYMwXICUf5pMvYUZumgbFCxZMT2njtUQtJw==',
+  'Administrator'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'admin',
+  'Authenticated'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'admin',
+  'Admin'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'Admin',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+
+insert into group_members (
+  name,
+  member
+) values (  
+  'Admin',
+  'Administrator'
+);
+
+#drop table users if exists;
+#drop table roles if exists;
+#drop table groups if exists;
+#drop table group_members if exists;
+#drop user jspwiki;

Added: incubator/jspwiki/trunk/src/main/config/db/postgresql.ddl
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/config/db/postgresql.ddl?rev=1484184&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/main/config/db/postgresql.ddl (added)
+++ incubator/jspwiki/trunk/src/main/config/db/postgresql.ddl Sat May 18 21:04:51 2013
@@ -0,0 +1,107 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+drop table users;
+drop table roles;
+drop table groups;
+drop table group_members;
+drop user jspwiki;
+
+create table users (
+  uid varchar(100),
+  email varchar(100),
+  full_name varchar(100),
+  login_name varchar(100) not null primary key,
+  password varchar(100),
+  wiki_name varchar(100),
+  created timestamp,
+  modified timestamp,
+  lock_expiry timestamp,
+  attributes longvarchar,
+);
+
+create table roles (
+  login_name varchar(100) not null,
+  role varchar(100) not null
+);
+
+create table groups (
+  name varchar(100) not null primary key,
+  creator varchar(100),
+  created timestamp,
+  modifier varchar(100),
+  modified timestamp
+);
+
+create table group_members (
+  name varchar(100) not null,
+  member varchar(100) not null,
+  constraint group_members_pk
+    primary key (name,member)
+);
+
+create user jspwiki with encrypted password 'password' nocreatedb nocreateuser;
+
+grant select, insert, update, delete on users to jspwiki;
+grant select, insert, update, delete on roles to jspwiki;
+grant select, insert, update, delete on groups to jspwiki;
+grant select, insert, update, delete on group_members to jspwiki;
+
+insert into users (
+  uid,
+  email,
+  full_name,
+  login_name,
+  password,
+  wiki_name
+) values (
+  '-6852820166199419346',
+  'admin@locahost',
+  'Administrator',
+  'admin',
+  '{SSHA}6YNKYMwXICUf5pMvYUZumgbFCxZMT2njtUQtJw==',
+  'Administrator'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'admin',
+  'Admin'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'Admin',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+
+insert into group_members (
+  name,
+  member
+) values (  
+  'Admin',
+  'Administrator'
+);
+
+#drop table users;
+#drop table roles;
+#drop table groups;
+#drop table group_members;
+#drop user jspwiki;

Modified: incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/main/java/org/apache/wiki/Release.java Sat May 18 21:04:51
2013
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "0";
+    public static final String     BUILD         = "1";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
(original)
+++ incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
Sat May 18 21:04:51 2013
@@ -41,8 +41,8 @@ import org.apache.wiki.auth.WikiSecurity
  * Implementation of GroupDatabase that persists {@link Group} objects to a JDBC
  * DataSource, as might typically be provided by a web container. This
  * implementation looks up the JDBC DataSource using JNDI. The JNDI name of the
- * datasource, backing table and mapped columns used by this class are
- * configured via settings in <code>jspwiki.properties</code>.
+ * datasource, backing table and mapped columns used by this class can be
+ * overridden by adding settings in <code>jspwiki.properties</code>.
  * </p>
  * <p>
  * Configurable properties are these:

Modified: incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
(original)
+++ incubator/jspwiki/trunk/src/main/java/org/apache/wiki/auth/user/JDBCUserDatabase.java
Sat May 18 21:04:51 2013
@@ -41,8 +41,8 @@ import org.apache.wiki.util.Serializer;
  * Implementation of UserDatabase that persists {@link DefaultUserProfile}
  * objects to a JDBC DataSource, as might typically be provided by a web
  * container. This implementation looks up the JDBC DataSource using JNDI. The
- * JNDI name of the datasource, backing table and mapped columns used by this
- * class are configured via settings in <code>jspwiki.properties</code>.
+ * JNDI name of the datasource, backing table and mapped columns used by this 
+ * class can be overridden by adding settings in <code>jspwiki.properties</code>.
  * </p>
  * <p>
  * Configurable properties are these:

Added: incubator/jspwiki/trunk/src/test/config/hsql-userdb-setup.ddl
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/config/hsql-userdb-setup.ddl?rev=1484184&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/test/config/hsql-userdb-setup.ddl (added)
+++ incubator/jspwiki/trunk/src/test/config/hsql-userdb-setup.ddl Sat May 18 21:04:51 2013
@@ -0,0 +1,204 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+drop table users if exists;
+drop table roles if exists;
+drop table groups if exists;
+drop table group_members if exists;
+drop user jspwiki;
+
+create table users (
+  uid varchar(100),
+  email varchar(100),
+  full_name varchar(100),
+  login_name varchar(100) not null,
+  password varchar(100),
+  wiki_name varchar(100),
+  created timestamp,
+  modified timestamp,
+  lock_expiry timestamp,
+  attributes longvarchar,
+  constraint users primary key (uid)
+);
+
+create table roles (
+  login_name varchar(100) not null,
+  role varchar(100) not null
+);
+
+create table groups (
+  name varchar(100) not null,
+  creator varchar(100),
+  created timestamp,
+  modifier varchar(100),
+  modified timestamp,
+  constraint groups primary key (name)
+);
+
+create table group_members (
+  name varchar(100) not null,
+  member varchar(100) not null,
+  constraint group_members primary key
+    (name,member)
+);
+
+create user jspwiki password "password";
+
+grant select, insert, update, delete on users to jspwiki;
+grant select, insert, update, delete on roles to jspwiki;
+grant select, insert, update, delete on groups to jspwiki;
+grant select, insert, update, delete on group_members to jspwiki;
+
+insert into users (
+  uid,
+  email,
+  full_name,
+  login_name,
+  password,
+  wiki_name,
+  attributes
+) values (
+  '-7739839977499061014',
+  'janne@ecyrd.com',
+  'Janne Jalkanen',
+  'janne',
+  '{SSHA}1WFv9OV11pD5IySgVH3sFa2VlCyYjbLrcVT/qw==',
+  'JanneJalkanen',
+  'attribute1=some random value\nattribute2=another value'
+);
+  
+insert into users (
+  uid,
+  email,
+  full_name,
+  login_name,
+  password,
+  wiki_name
+) values (
+  '-6852820166199419346',
+  'admin@locahost',
+  'Administrator',
+  'admin',
+  '{SSHA}6YNKYMwXICUf5pMvYUZumgbFCxZMT2njtUQtJw==',
+  'Administrator'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'janne',
+  'Authenticated'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'admin',
+  'Authenticated'
+);
+
+insert into roles (
+  login_name,
+  role
+) values (  
+  'admin',
+  'Admin'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'TV',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+insert into group_members (
+  name,
+  member
+) values (  
+  'TV',
+  'Archie Bunker'
+);
+insert into group_members (
+  name,
+  member
+) values (  
+  'TV',
+  'BullwinkleMoose'
+);
+insert into group_members (
+  name,
+  member
+) values (  
+  'TV',
+  'Fred Friendly'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'Literature',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+insert into group_members (
+  name,
+  member
+) values (  
+  'Literature',
+  'Charles Dickens'
+);
+
+insert into group_members (
+  name,
+  member
+) values (  
+  'Literature',
+  'Homer'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'Art',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+
+insert into groups (
+  name,
+  created,
+  modified
+) values (
+  'Admin',
+  '2006-06-20 14:50:54.00000000',
+  '2006-06-20 14:50:54.00000000'
+);
+
+insert into group_members (
+  name,
+  member
+) values (  
+  'Admin',
+  'Administrator'
+);
+

Added: incubator/jspwiki/trunk/src/test/config/hsql-userdb-teardown.ddl
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/config/hsql-userdb-teardown.ddl?rev=1484184&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/test/config/hsql-userdb-teardown.ddl (added)
+++ incubator/jspwiki/trunk/src/test/config/hsql-userdb-teardown.ddl Sat May 18 21:04:51 2013
@@ -0,0 +1,19 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+drop table users if exists;
+drop table roles if exists;
+drop table groups if exists;
+drop table group_members if exists;
+drop user jspwiki;

Modified: incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java (original)
+++ incubator/jspwiki/trunk/src/test/java/org/apache/wiki/HsqlDbUtils.java Sat May 18 21:04:51
2013
@@ -37,8 +37,8 @@ import org.hsqldb.util.SqlFile;
  * <ol>
  *   <li>HsqlDbUtils hsqldbu = new HsqlDbUtils()</li>
  *   <li>hsqldbu.start()</li>
- *   <li>hsqldbu.exec( "target/etc/db/hsql/userdb-setup.ddl" )</li>
- *   <li>hsqldbu.exec( "target/etc/db/hsql/userdb-teardown.ddl" )</li>
+ *   <li>hsqldbu.exec( "target/etc/db/hsql/hsql-userdb-setup.ddl" )</li>
+ *   <li>hsqldbu.exec( "target/etc/db/hsql/hsql-userdb-teardown.ddl" )</li>
  *   <li>hsqldbu.stop()</li>
  * </ol>
  * </code>
@@ -71,7 +71,7 @@ public class HsqlDbUtils
         {
             LOG.error( e.getMessage(), e );
         }
-        exec( "target/etc/db/hsql/userdb-setup.ddl" );
+        exec( "src/test/config/hsql-userdb-setup.ddl" );
     }
     
     /**
@@ -79,7 +79,7 @@ public class HsqlDbUtils
      */
     public void tearDown() 
     {
-        exec( "target/etc/db/hsql/userdb-teardown.ddl" );
+        exec( "src/test/config/hsql-userdb-teardown.ddl" );
         stop();
     }
     
@@ -90,7 +90,7 @@ public class HsqlDbUtils
     {
         
         // start Hypersonic server
-        Properties hProps = loadPropertiesFrom( "target/etc/db/hsql/server.properties" );
+        Properties hProps = loadPropertiesFrom( "target/test-classes/jdbc.properties" );
         
         hsqlServer = new Server();
         // pre-checks

Modified: incubator/jspwiki/trunk/src/test/resources/jdbc.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/resources/jdbc.properties?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/resources/jdbc.properties (original)
+++ incubator/jspwiki/trunk/src/test/resources/jdbc.properties Sat May 18 21:04:51 2013
@@ -17,6 +17,11 @@
 
 #Ant properties
 #Used only in testing
+
+server.port=9001
+server.database.0=file:jspwiki.hsqldb
+server.dbname.0=jspwiki
+
 jdbc.admin.id=SA
 jdbc.admin.password=
 jdbc.driver.class=org.hsqldb.jdbcDriver

Modified: incubator/jspwiki/trunk/src/test/resources/jspwiki.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/test/resources/jspwiki.properties?rev=1484184&r1=1484183&r2=1484184&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/test/resources/jspwiki.properties (original)
+++ incubator/jspwiki/trunk/src/test/resources/jspwiki.properties Sat May 18 21:04:51 2013
@@ -97,28 +97,7 @@ jspwiki.xmlUserDatabaseFile = target/tes
 jspwiki.admin.user = admin
 
 jspwiki.userdatabase.datasource=jdbc/UserDatabase
-jspwiki.userdatabase.table=users
-jspwiki.userdatabase.uid=uid
-jspwiki.userdatabase.email=email
-jspwiki.userdatabase.fullName=full_name
-jspwiki.userdatabase.loginName=login_name
-jspwiki.userdatabase.password=password
-jspwiki.userdatabase.wikiName=wiki_name
-jspwiki.userdatabase.created=created
-jspwiki.userdatabase.modified=modified
-jspwiki.userdatabase.lockExpiry=lock_expiry
-jspwiki.userdatabase.attributes=attributes
-jspwiki.userdatabase.roleTable=roles
-jspwiki.userdatabase.role=role
 jspwiki.groupdatabase.datasource=jdbc/GroupDatabase
-jspwiki.groupdatabase.table=groups
-jspwiki.groupdatabase.membertable=group_members
-jspwiki.groupdatabase.created=created
-jspwiki.groupdatabase.creator=creator
-jspwiki.groupdatabase.name=name
-jspwiki.groupdatabase.member=member
-jspwiki.groupdatabase.modified=modified
-jspwiki.groupdatabase.modifier=modifier
 
 #
 #  Configure logs.



Mime
View raw message