Skip to content

Commit

Permalink
review: fix styles
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake committed Mar 5, 2021
1 parent b4e5d56 commit 3ed2309
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion source/extensions/common/wasm/wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <chrono>
#include <map>
#include <memory>
#include <unordered_map>

#include "envoy/common/exception.h"
#include "envoy/extensions/wasm/v3/wasm.pb.validate.h"
Expand Down
14 changes: 7 additions & 7 deletions test/extensions/common/wasm/plugin_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ namespace {

TEST(TestWasmConfig, Basic) {
envoy::extensions::wasm::v3::PluginConfig plugin_config;
auto name = "my-plugin";
plugin_config.set_name("my-plugin");
const std::string name = "my-plugin";
plugin_config.set_name(name);

auto function = "function";
const std::string function = "function";
plugin_config.mutable_capability_restriction_config()->mutable_allowed_capabilities()->insert(
{function, envoy::extensions::wasm::v3::SanitizationConfig()});

auto proto_envs = plugin_config.mutable_vm_config()->mutable_environment_variables();
std::string host_env_key = "HOST_KEY";
std::string host_env_value = "HOST_VALUE";
std::string key = "KEY";
std::string value = "VALUE";
const std::string host_env_key = "HOST_KEY";
const std::string host_env_value = "HOST_VALUE";
const std::string key = "KEY";
const std::string value = "VALUE";
TestEnvironment::setEnvVar(host_env_key, host_env_value, 0);
proto_envs->mutable_host_env_keys()->Add(host_env_key.c_str());
(*proto_envs->mutable_key_values())[key] = value;
Expand Down
8 changes: 4 additions & 4 deletions test/extensions/filters/http/wasm/wasm_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ TEST_P(WasmHttpFilterTest, HeadersOnlyRequestHeadersOnlyWithEnvVars) {
envoy::extensions::wasm::v3::EnvironmentVariables envs;
if (std::get<0>(GetParam()) != "null") {
// Setup env vars.
std::string host_env_key = "ENVOY_HTTP_WASM_TEST_HEADERS_HOST_ENV";
std::string host_env_value = "foo";
std::string env_key = "ENVOY_HTTP_WASM_TEST_HEADERS_KEY_VALUE_ENV";
std::string env_value = "bar";
const std::string host_env_key = "ENVOY_HTTP_WASM_TEST_HEADERS_HOST_ENV";
const std::string host_env_value = "foo";
const std::string env_key = "ENVOY_HTTP_WASM_TEST_HEADERS_KEY_VALUE_ENV";
const std::string env_value = "bar";
TestEnvironment::setEnvVar(host_env_key, host_env_value, 0);
envs.mutable_host_env_keys()->Add(host_env_key.c_str());
(*envs.mutable_key_values())[env_key] = env_value;
Expand Down

0 comments on commit 3ed2309

Please sign in to comment.