You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bd...@apache.org on 2011/03/04 18:02:32 UTC
svn commit: r1078054 -
/incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java
Author: bdelacretaz
Date: Fri Mar 4 17:02:32 2011
New Revision: 1078054
URL: http://svn.apache.org/viewvc?rev=1078054&view=rev
Log:
STANBOL-110 - add integration test
Added:
incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java (with props)
Added: incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java?rev=1078054&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java (added)
+++ incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java Fri Mar 4 17:02:32 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. 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.
+ */
+package org.apache.stanbol.enhancer.it;
+
+import org.junit.Test;
+
+/** Verify that the example config of STANBOL-110 is present */
+public class DefaultConfigTest extends EnhancerTestBase {
+
+ @Test
+ public void testDefaultConfig() throws Exception {
+ // AFAIK there's no way to get the config in machine
+ // format from the webconsole, so we just grep the
+ // text config output
+ final String path = "/system/console/config/configuration-status-20110304-1743+0100.txt";
+ executor.execute(
+ builder.buildGetRequest(path)
+ .withCredentials("admin", "admin")
+ )
+ .assertStatus(200)
+ .assertContentRegexp(
+ "PID.*org.apache.stanbol.examples.ExampleBootstrapConfig",
+ "anotherValue.*This is AnotherValue.",
+ "message.*This test config should be loaded at startup",
+ "org.apache.sling.installer.osgi.path.*launchpad:resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg"
+ );
+ }
+}
+
Propchange: incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stanbol/trunk/enhancer/integration-tests/src/test/java/org/apache/stanbol/enhancer/it/DefaultConfigTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL