Skip to content

Commit

Permalink
CCQ: Added integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters committed Jun 1, 2023
1 parent 58a4432 commit 6fe685d
Show file tree
Hide file tree
Showing 6 changed files with 478 additions and 10 deletions.
15 changes: 6 additions & 9 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ config.define_bool("node_metrics", False, "Enable Prometheus & Grafana for Guard
config.define_bool("guardiand_governor", False, "Enable chain governor in guardiand")
config.define_bool("wormchain", False, "Enable a wormchain node")
config.define_bool("ibc_relayer", False, "Enable IBC relayer between cosmos chains")
config.define_bool("ccq", False, "Enable cross chain queries in guardiand")

cfg = config.parse()
num_guardians = int(cfg.get("num", "1"))
Expand All @@ -88,7 +87,6 @@ node_metrics = cfg.get("node_metrics", False)
guardiand_governor = cfg.get("guardiand_governor", False)
ibc_relayer = cfg.get("ibc_relayer", ci)
btc = cfg.get("btc", False)
ccq = cfg.get("ccq", False)

if cfg.get("manual", False):
trigger_mode = TRIGGER_MODE_MANUAL
Expand Down Expand Up @@ -298,13 +296,6 @@ def build_node_yaml():
"wormhole1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq0kdhcj"
]

if ccq:
container["command"] += [
"--ccqEnabled=true",
"--ccqAllowedRequesters",
"beFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe"
]

return encode_yaml_stream(node_yaml_with_replicas)

k8s_yaml_with_ns(build_node_yaml())
Expand Down Expand Up @@ -598,6 +589,12 @@ if ci_tests:
trigger_mode = trigger_mode,
resource_deps = ["const-gen"], # uses devnet-consts.json, but wormchain/contracts/tools/test_accountant.sh handles waiting for guardian, not having deps gets the build earlier
)
k8s_resource(
"query-ci-tests",
labels = ["ci"],
trigger_mode = trigger_mode,
resource_deps = [], # node/hack/query/test/test_query.sh handles waiting for guardian, not having deps gets the build earlier
)

if terra_classic:
docker_build(
Expand Down
3 changes: 2 additions & 1 deletion devnet/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ spec:
- --publicRpcLogDetail
- "full"
# - --chainGovernorEnabled=true
# - --ccqEnabled=true
- --ccqEnabled=true
- --ccqAllowedRequesters=beFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe
# - --logLevel=debug
securityContext:
capabilities:
Expand Down
25 changes: 25 additions & 0 deletions devnet/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,28 @@ spec:
- "/app/accountant/success"
initialDelaySeconds: 5
periodSeconds: 5
---
kind: Job
apiVersion: batch/v1
metadata:
name: query-ci-tests
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: query-ci-tests
image: guardiand-image
command:
- /bin/sh
- -c
- "cd /app/node/hack/query/test && bash test_query.sh && touch success"
readinessProbe:
exec:
command:
- test
- -e
- "/app/node/hack/query/test/success"
initialDelaySeconds: 5
periodSeconds: 5
Loading

0 comments on commit 6fe685d

Please sign in to comment.