Skip to content

Commit

Permalink
Merge pull request #138 from Kuadrant/test-data
Browse files Browse the repository at this point in the history
Extract and use real-world data in tests
  • Loading branch information
adam-cattermole authored Nov 11, 2024
2 parents 0dd4968 + 0f5c411 commit 76fa368
Show file tree
Hide file tree
Showing 15 changed files with 413 additions and 214 deletions.
161 changes: 92 additions & 69 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ crate-type = ["cdylib"]
[features]
default = ["with-serde"]
with-serde = ["protobuf/with-serde"]
debug-host-behaviour = []

[dependencies]
proxy-wasm = "0.2.1"
Expand All @@ -32,8 +33,8 @@ regex = "1"
radix_trie = "0.2.1"
const_format = "0.2.31"
chrono = { version = "0.4.38", default-features = false, features = ["alloc", "std"] }
cel-interpreter = "0.8.1"
cel-parser = "0.7.1"
cel-interpreter = { git = "https://github.com/clarkmcc/cel-rust", rev = "5b02b08", features = ["json", "regex", "chrono"] }
cel-parser = { git = "https://github.com/clarkmcc/cel-rust", rev = "5b02b08" }
urlencoding = "2.1.3"

[dev-dependencies]
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH)))

BUILD ?= debug
ifneq ($(FEATURES),)
FEATURE_CMD=--features $(FEATURES)
endif

WASM_RELEASE_BIN = $(PROJECT_PATH)/target/wasm32-unknown-unknown/$(BUILD)/wasm_shim.wasm
WASM_RELEASE_PATH = $(dir $(WASM_RELEASE_BIN))
Expand All @@ -24,9 +27,9 @@ $(PROTOC_BIN):
build: $(PROTOC_BIN)
@echo "Building the wasm filter"
ifeq ($(BUILD), release)
export PATH=$(PROJECT_PATH)/bin:$$PATH; cargo build --target=wasm32-unknown-unknown --release
export PATH=$(PROJECT_PATH)/bin:$$PATH; cargo build --target=wasm32-unknown-unknown --release $(FEATURE_CMD)
else
export PATH=$(PROJECT_PATH)/bin:$$PATH; cargo build --target=wasm32-unknown-unknown
export PATH=$(PROJECT_PATH)/bin:$$PATH; cargo build --target=wasm32-unknown-unknown $(FEATURE_CMD)
endif

# Remove old ones and fetch the latest third-party protobufs
Expand Down
Loading

0 comments on commit 76fa368

Please sign in to comment.