Run the Autobahn Testsuite as part of our testsuite. This ensures there are no regressions.

This commit is contained in:
Norman Maurer 2013-10-28 21:07:46 +01:00
parent 542efdc7c7
commit ff9e368401
5 changed files with 32 additions and 9 deletions

View File

@ -59,6 +59,29 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>me.normanmaurer.maven.autobahntestsuite</groupId>
<artifactId>autobahntestsuite-maven-plugin</artifactId>
<version>0.1.0</version>
<configuration>
<host>127.0.0.1</host>
<port>9001</port>
<mainClass>io.netty.testsuite.websockets.autobahn.AutobahnServer</mainClass>
<cases>
<case>*</case>
</cases>
<excludeCases></excludeCases>
<failOnNonStrict>false</failOnNonStrict>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>fuzzingclient</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.example.http.websocketx.autobahn;
package io.netty.testsuite.websockets.autobahn;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.example.http.websocketx.autobahn;
package io.netty.testsuite.websockets.autobahn;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
@ -24,7 +24,6 @@ import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.ContinuationWebSocketFrame;
@ -40,9 +39,10 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import static io.netty.handler.codec.http.HttpHeaders.*;
import static io.netty.handler.codec.http.HttpMethod.*;
import static io.netty.handler.codec.http.HttpResponseStatus.*;
import static io.netty.handler.codec.http.HttpVersion.*;
import static io.netty.handler.codec.http.HttpMethod.GET;
import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST;
import static io.netty.handler.codec.http.HttpResponseStatus.FORBIDDEN;
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
/**
* Handles handshakes and messages
@ -143,6 +143,6 @@ public class AutobahnServerHandler extends ChannelInboundHandlerAdapter {
}
private static String getWebSocketLocation(FullHttpRequest req) {
return "ws://" + req.headers().get(HttpHeaders.Names.HOST);
return "ws://" + req.headers().get(Names.HOST);
}
}

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.example.http.websocketx.autobahn;
package io.netty.testsuite.websockets.autobahn;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;

View File

@ -60,5 +60,5 @@
*
* <p>10. See the results in <tt>./reports/servers/index.html</tt>
*/
package io.netty.example.http.websocketx.autobahn;
package io.netty.testsuite.websockets.autobahn;