Skip to content

Commit

Permalink
test: add integrate test (#795)
Browse files Browse the repository at this point in the history
Co-authored-by: seeflood <zhou.qunli@foxmail.com>
  • Loading branch information
bxiiiiii and seeflood authored Oct 19, 2022
1 parent 10b0313 commit 18ceced
Show file tree
Hide file tree
Showing 8 changed files with 565 additions and 191 deletions.
173 changes: 173 additions & 0 deletions configs/config_integrate_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"servers": [
{
"default_log_path": "stdout",
"default_log_level": "DEBUG",
"routers": [
{
"router_config_name": "actuator_dont_need_router"
}
],
"listeners": [
{
"name": "grpc",
"address": "127.0.0.1:34904",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "grpc",
"config": {
"server_name": "runtime",
"grpc_config": {
"hellos": {
"quick_start_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"config_store": {
"etcd_config_demo": {
"type": "etcd",
"address": [
"127.0.0.1:2379"
],
"timeout": "10"
}
},
"state": {
"redis_state_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
},
"zookeeper_state_demo": {
"type": "zookeeper",
"metadata": {
"servers": "127.0.0.1",
"zookeeperPassword": "",
"sessionTimeout": "3s",
"logInfo": "false",
"keyPrefixPath": "/"
}
}
},
"lock": {
"redis_lock_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
},
"etcd_lock_demo": {
"type": "etcd",
"metadata": {
"endpoints": "localhost:2379",
"username": "",
"password": "",
"keyPrefixPath": "/lock",
"dialTimeout": "5"
}
},
"zookeeper_lock_demo": {
"type": "zookeeper",
"metadata": {
"zookeeperHosts": "127.0.0.1",
"zookeeperPassword": "",
"sessionTimeout": "3",
"logInfo": "false",
"keyPrefixPath": "/"
}
}
},
"sequencer": {
"redis_sequencer_demo": {
"type": "redis",
"metadata": {
"redisHost": "127.0.0.1:6380",
"redisPassword": ""
}
},
"etcd_sequencer_demo": {
"type": "etcd",
"metadata": {
"endpoints": "localhost:2379",
"segmentCacheEnable": "false",
"segmentStep": "1",
"username": "",
"password": "",
"dialTimeout": "5"
}
},
"zookeeper_sequencer_demo": {
"type": "zookeeper",
"metadata": {
"zookeeperHosts": "127.0.0.1",
"zookeeperPassword": "",
"sessionTimeout": "3",
"logInfo": "false",
"keyPrefixPath": "/"
}
}
},
"pub_subs": {
"redis_pub_subs_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"secret_store": {
"local_file_secret_demo": {
"type": "local.file",
"metadata": {
"secretsFile": "./configs/secret/config_test_secret_demo.json"
}
}
},
"app": {
"app_id": "app1",
"grpc_callback_port": 9999
}
}
}
}
]
}
]
},
{
"name": "actuator",
"address": "127.0.0.1:34999",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name": "actuator_dont_need_router"
}
}
]
}
],
"stream_filters": [
{
"type": "actuator_filter"
}
]
}
]
}
]
}

7 changes: 7 additions & 0 deletions configs/secret/config_test_secret_demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"db-user-pass": {
"username": "admin",
"password": "pw1"
},
"testPassword": "pw2"
}
5 changes: 4 additions & 1 deletion docker/app/integrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FROM golang:1.16

RUN apt-get update && apt-get install -y redis-server
RUN apt-get update && apt-get install -y redis-server \
&& apt-get install -y etcd-server \
&& apt-get install -y net-tools \
&& apt-get install -y zookeeper \
Loading

0 comments on commit 18ceced

Please sign in to comment.