Author: ghuber
Date: Wed Jul 31 14:02:51 2013
New Revision: 1508862

URL: http://svn.apache.org/r1508862
Log:
relocate to sql/test. Just sql does not work.

Added:
    roller/trunk/app/src/test/resources/sql/
    roller/trunk/app/src/test/resources/sql/test/
    roller/trunk/app/src/test/resources/sql/test/junit-cleartables-mysql.sql
Removed:
    roller/trunk/app/src/main/resources/sql/junit-cleartables-mysql.sql
Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java

Modified: 
roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java
URL: 
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java?rev=1508862&r1=1508861&r2=1508862&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java 
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java 
Wed Jul 31 14:02:51 2013
@@ -150,7 +150,7 @@ public final class TestUtils {
         ClasspathDatabaseScriptProvider scriptProvider = new 
ClasspathDatabaseScriptProvider();
 
         InputStream script = scriptProvider
-                .getAbsoluteDatabaseScript("sql/junit-cleartables-" + dbname
+                .getAbsoluteDatabaseScript("sql/test/junit-cleartables-" + 
dbname
                         + ".sql");
 
         try {

Added: roller/trunk/app/src/test/resources/sql/test/junit-cleartables-mysql.sql
URL: 
http://svn.apache.org/viewvc/roller/trunk/app/src/test/resources/sql/test/junit-cleartables-mysql.sql?rev=1508862&view=auto
==============================================================================
--- roller/trunk/app/src/test/resources/sql/test/junit-cleartables-mysql.sql 
(added)
+++ roller/trunk/app/src/test/resources/sql/test/junit-cleartables-mysql.sql 
Wed Jul 31 14:02:51 2013
@@ -0,0 +1,36 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+--  contributor license agreements.  The ASF licenses this file to You
+-- 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.  For additional information regarding
+-- copyright in this work, please see the NOTICE file in the top level
+-- directory of this distribution.
+
+-- Script is used to clear old data prior to running local tests
+
+delete mt from website w, roller_mediafile mf, roller_mediafiletag mt where 
w.id = mf.weblogid and mt.mediafile_id = mf.id and w.creator like 'junit_%';
+delete mf from website w, roller_mediafile mf where w.id = mf.weblogid and 
w.creator like 'junit_%';
+delete md from website w, roller_mediafiledir md where w.id = md.websiteid and 
w.creator like 'junit_%';
+
+delete r from website w, referer r WHERE w.id = r.websiteid and w.creator like 
'junit_%';
+
+delete from website WHERE creator like 'junit_%';
+
+delete b from website w, folder f, bookmark b where f.id = b.folderid and w.id 
= f.websiteid and w.creator like 'junit_%';
+delete from folder WHERE websiteid like 'junit_%';
+
+delete from userrole WHERE username like 'junit_%';
+delete from roller_permission WHERE username like 'junit_%';
+delete from rolleruser WHERE username like 'junit_%';
+delete from roller_userattribute WHERE username like 'junit_%';
+delete from roller_oauthconsumer WHERE username like 'junit_%';
+delete from roller_oauthaccessor WHERE username like 'junit_%';
+


Reply via email to