From 0ddfe88beed6355a8b82c45f476324e23e471759 Mon Sep 17 00:00:00 2001 From: Mikko Karjalainen Date: Thu, 10 Oct 2019 15:08:29 +0100 Subject: [PATCH 1/2] Rename docker-toxiproxy to docker-test-env. --- system-tests/{docker-toxiproxy => docker-test-env}/README.md | 4 ++-- .../apache-config/info.txt | 0 .../{docker-toxiproxy => docker-test-env}/docker-compose.yml | 0 .../styx-config/origins.yml | 0 .../styx-config/styxconf.yml | 0 .../toxiproxy/config.json | 0 .../toxiproxy/origin-latency.json | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename system-tests/{docker-toxiproxy => docker-test-env}/README.md (91%) rename system-tests/{docker-toxiproxy => docker-test-env}/apache-config/info.txt (100%) rename system-tests/{docker-toxiproxy => docker-test-env}/docker-compose.yml (100%) rename system-tests/{docker-toxiproxy => docker-test-env}/styx-config/origins.yml (100%) rename system-tests/{docker-toxiproxy => docker-test-env}/styx-config/styxconf.yml (100%) rename system-tests/{docker-toxiproxy => docker-test-env}/toxiproxy/config.json (100%) rename system-tests/{docker-toxiproxy => docker-test-env}/toxiproxy/origin-latency.json (100%) diff --git a/system-tests/docker-toxiproxy/README.md b/system-tests/docker-test-env/README.md similarity index 91% rename from system-tests/docker-toxiproxy/README.md rename to system-tests/docker-test-env/README.md index b5a7190d4f..f20d6e5ab0 100644 --- a/system-tests/docker-toxiproxy/README.md +++ b/system-tests/docker-test-env/README.md @@ -36,7 +36,7 @@ styxcore latest 9b65640de45b 31 minutes ago 343MB Bootstrap the network: ```bash -$ docker-compose -f system-tests/docker-toxiproxy/docker-compose.yml up +$ docker-compose -f system-tests/docker-test-env/docker-compose.yml up ``` @@ -53,7 +53,7 @@ $ curl http://localhost:8474/proxies | jq Applying toxics: ```bash -$ curl -v -X POST -H "Content-Type: application/json" -d @system-tests/docker-toxiproxy/toxiproxy/origin-latency.json http://localhost:8474/proxies/httpd-01/toxics +$ curl -v -X POST -H "Content-Type: application/json" -d @system-tests/docker-test-env/toxiproxy/origin-latency.json http://localhost:8474/proxies/httpd-01/toxics ``` Removing toxics: diff --git a/system-tests/docker-toxiproxy/apache-config/info.txt b/system-tests/docker-test-env/apache-config/info.txt similarity index 100% rename from system-tests/docker-toxiproxy/apache-config/info.txt rename to system-tests/docker-test-env/apache-config/info.txt diff --git a/system-tests/docker-toxiproxy/docker-compose.yml b/system-tests/docker-test-env/docker-compose.yml similarity index 100% rename from system-tests/docker-toxiproxy/docker-compose.yml rename to system-tests/docker-test-env/docker-compose.yml diff --git a/system-tests/docker-toxiproxy/styx-config/origins.yml b/system-tests/docker-test-env/styx-config/origins.yml similarity index 100% rename from system-tests/docker-toxiproxy/styx-config/origins.yml rename to system-tests/docker-test-env/styx-config/origins.yml diff --git a/system-tests/docker-toxiproxy/styx-config/styxconf.yml b/system-tests/docker-test-env/styx-config/styxconf.yml similarity index 100% rename from system-tests/docker-toxiproxy/styx-config/styxconf.yml rename to system-tests/docker-test-env/styx-config/styxconf.yml diff --git a/system-tests/docker-toxiproxy/toxiproxy/config.json b/system-tests/docker-test-env/toxiproxy/config.json similarity index 100% rename from system-tests/docker-toxiproxy/toxiproxy/config.json rename to system-tests/docker-test-env/toxiproxy/config.json diff --git a/system-tests/docker-toxiproxy/toxiproxy/origin-latency.json b/system-tests/docker-test-env/toxiproxy/origin-latency.json similarity index 100% rename from system-tests/docker-toxiproxy/toxiproxy/origin-latency.json rename to system-tests/docker-test-env/toxiproxy/origin-latency.json From c666e13908bff94dc5f504106d2dddc401df2cc2 Mon Sep 17 00:00:00 2001 From: Mikko Karjalainen Date: Thu, 10 Oct 2019 15:38:21 +0100 Subject: [PATCH 2/2] Rename example-styx-plugin to styx-test-plugin. --- docs/developer-guide/plugins.md | 2 +- .../test/java/com/hotels/styx/ExamplePluginJarLocation.java | 6 +++--- .../kotlin/com/hotels/styx/routing/PluginsPipelineSpec.kt | 4 ++-- system-tests/pom.xml | 4 ++-- .../pom.xml | 0 .../src/main/java/depend/ExampleDependency.java | 2 +- .../{example-styx-plugin => styx-test-plugin}/pom.xml | 0 .../src/main/java/loadtest/plugins/AbstractTestPlugin.java | 2 +- .../src/main/java/loadtest/plugins/AdminHandlers.java | 2 +- .../src/main/java/loadtest/plugins/AsyncPluginConfig.java | 2 +- .../plugins/AsyncRequestContentDecoderPluginFactory.java | 2 +- .../plugins/AsyncResponseContentDecoderPluginFactory.java | 2 +- .../java/loadtest/plugins/AsyncResponsePluginFactory.java | 2 +- .../src/main/java/testgrp/TestPlugin.java | 0 .../src/main/java/testgrp/TestPluginConfig.java | 0 .../src/main/java/testgrp/TestPluginModule.java | 0 16 files changed, 15 insertions(+), 15 deletions(-) rename system-tests/{example-styx-plugin-dependencies => styx-test-plugin-dependencies}/pom.xml (100%) rename system-tests/{example-styx-plugin-dependencies => styx-test-plugin-dependencies}/src/main/java/depend/ExampleDependency.java (95%) rename system-tests/{example-styx-plugin => styx-test-plugin}/pom.xml (100%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AbstractTestPlugin.java (96%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AdminHandlers.java (96%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AsyncPluginConfig.java (96%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java (98%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java (98%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java (98%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/testgrp/TestPlugin.java (100%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/testgrp/TestPluginConfig.java (100%) rename system-tests/{example-styx-plugin => styx-test-plugin}/src/main/java/testgrp/TestPluginModule.java (100%) diff --git a/docs/developer-guide/plugins.md b/docs/developer-guide/plugins.md index 9baecb16f4..7375d7cbe5 100644 --- a/docs/developer-guide/plugins.md +++ b/docs/developer-guide/plugins.md @@ -56,7 +56,7 @@ A plugin project can be started by using one of examples in `examples` submodule * main/java/com/hotels/styx/ExamplePluginFactory.java - A class that implements PluginFactory interface, responsible for instantiating the plugin. -Some additional examples can be found in `system-tests/example-styx-plugin` directory in a project repository. +Some additional examples can be found in `system-tests/styx-test-plugin` directory in a project repository. There are examples of plugins providing simple examples of how to: * perform a before action on a request - `loadtest.plugins.AsyncRequestContentDecoderPluginFactory`, * perform an action response object - `loadtest.plugins.AsyncResponseContentDecoderPluginFactory` diff --git a/system-tests/e2e-suite/src/test/java/com/hotels/styx/ExamplePluginJarLocation.java b/system-tests/e2e-suite/src/test/java/com/hotels/styx/ExamplePluginJarLocation.java index 470e3fc5cd..f320cf2c7c 100644 --- a/system-tests/e2e-suite/src/test/java/com/hotels/styx/ExamplePluginJarLocation.java +++ b/system-tests/e2e-suite/src/test/java/com/hotels/styx/ExamplePluginJarLocation.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ public static Path createTemporarySharedDirectoryForJars() throws IOException { } static Path examplePluginJarLocation() throws IOException { - return jarLocation("example-styx-plugin"); + return jarLocation("styx-test-plugin"); } static Path exampleDependencyJarLocation() throws IOException { - return jarLocation("example-styx-plugin-dependencies"); + return jarLocation("styx-test-plugin-dependencies"); } // module must be adjacent to e2e-suite diff --git a/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/PluginsPipelineSpec.kt b/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/PluginsPipelineSpec.kt index 72d746d216..446f96ba77 100644 --- a/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/PluginsPipelineSpec.kt +++ b/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/PluginsPipelineSpec.kt @@ -35,8 +35,8 @@ class PluginsPipelineSpec : FeatureSpec() { val tempPluginsDir = createTempDir(suffix = "-${this.javaClass.simpleName}") tempPluginsDir.deleteOnExit() - val plugin = jarLocation("example-styx-plugin") - val dependency = jarLocation("example-styx-plugin-dependencies") + val plugin = jarLocation("styx-test-plugin") + val dependency = jarLocation("styx-test-plugin-dependencies") Files.copy(plugin, tempPluginsDir.resolve(plugin.fileName.toString()).toPath()) Files.copy(dependency, tempPluginsDir.resolve(dependency.fileName.toString()).toPath()) diff --git a/system-tests/pom.xml b/system-tests/pom.xml index bf83da245a..66c00ba29e 100644 --- a/system-tests/pom.xml +++ b/system-tests/pom.xml @@ -26,8 +26,8 @@ Styx - System Tests - example-styx-plugin-dependencies - example-styx-plugin + styx-test-plugin-dependencies + styx-test-plugin e2e-testsupport e2e-suite example-backend-provider diff --git a/system-tests/example-styx-plugin-dependencies/pom.xml b/system-tests/styx-test-plugin-dependencies/pom.xml similarity index 100% rename from system-tests/example-styx-plugin-dependencies/pom.xml rename to system-tests/styx-test-plugin-dependencies/pom.xml diff --git a/system-tests/example-styx-plugin-dependencies/src/main/java/depend/ExampleDependency.java b/system-tests/styx-test-plugin-dependencies/src/main/java/depend/ExampleDependency.java similarity index 95% rename from system-tests/example-styx-plugin-dependencies/src/main/java/depend/ExampleDependency.java rename to system-tests/styx-test-plugin-dependencies/src/main/java/depend/ExampleDependency.java index b5ea7116d2..e3d2e8017b 100644 --- a/system-tests/example-styx-plugin-dependencies/src/main/java/depend/ExampleDependency.java +++ b/system-tests/styx-test-plugin-dependencies/src/main/java/depend/ExampleDependency.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/pom.xml b/system-tests/styx-test-plugin/pom.xml similarity index 100% rename from system-tests/example-styx-plugin/pom.xml rename to system-tests/styx-test-plugin/pom.xml diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java similarity index 96% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java index ef008f1fad..f3ae28ff96 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AbstractTestPlugin.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AdminHandlers.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AdminHandlers.java similarity index 96% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AdminHandlers.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AdminHandlers.java index 2e70ae3d3f..1e21c81cc9 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AdminHandlers.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AdminHandlers.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java similarity index 96% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java index 5c4a272331..f1e487c857 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncPluginConfig.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java similarity index 98% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java index 91040d2492..8e10e69ebb 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncRequestContentDecoderPluginFactory.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java similarity index 98% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java index 0e7557f5c5..c8d56b7d91 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponseContentDecoderPluginFactory.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java similarity index 98% rename from system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java rename to system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java index 2a0c699c5f..9f93e100b8 100644 --- a/system-tests/example-styx-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java +++ b/system-tests/styx-test-plugin/src/main/java/loadtest/plugins/AsyncResponsePluginFactory.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Expedia Inc. + Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/system-tests/example-styx-plugin/src/main/java/testgrp/TestPlugin.java b/system-tests/styx-test-plugin/src/main/java/testgrp/TestPlugin.java similarity index 100% rename from system-tests/example-styx-plugin/src/main/java/testgrp/TestPlugin.java rename to system-tests/styx-test-plugin/src/main/java/testgrp/TestPlugin.java diff --git a/system-tests/example-styx-plugin/src/main/java/testgrp/TestPluginConfig.java b/system-tests/styx-test-plugin/src/main/java/testgrp/TestPluginConfig.java similarity index 100% rename from system-tests/example-styx-plugin/src/main/java/testgrp/TestPluginConfig.java rename to system-tests/styx-test-plugin/src/main/java/testgrp/TestPluginConfig.java diff --git a/system-tests/example-styx-plugin/src/main/java/testgrp/TestPluginModule.java b/system-tests/styx-test-plugin/src/main/java/testgrp/TestPluginModule.java similarity index 100% rename from system-tests/example-styx-plugin/src/main/java/testgrp/TestPluginModule.java rename to system-tests/styx-test-plugin/src/main/java/testgrp/TestPluginModule.java