forked from beego/beego
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jianzhiyao
committed
Jan 28, 2021
1 parent
7e3703d
commit 4dca228
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
# using pkg/adapter. Usually you want to migrate to V2 smoothly, you could running this script | ||
|
||
find ./ -name '*.go' -type f -exec sed -i '' -e 's/github.com\/astaxie\/beego/github.com\/astaxie\/beego\/pkg\/adapter/g' {} \; | ||
find ./ -name '*.go' -type f -exec sed -i '' -e 's/"github.com\/astaxie\/beego\/pkg\/adapter"/beego "github.com\/astaxie\/beego\/pkg\/adapter"/g' {} \; | ||
|
||
update rrp_flow set status = 4 where flow_id in (5623711176,5629411891) | ||
|
||
select * from rrp_flow where flow_id in (5623711176,5629411891) and status = 5 | ||
|
||
update rrp_flow set status = 5 where flow_id in (5623711176,5629411891) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
etcdctl put current.float 1.23 | ||
etcdctl put current.bool true | ||
etcdctl put current.int 11 | ||
etcdctl put current.string hello | ||
etcdctl put current.serialize.name test | ||
etcdctl put sub.sub.key1 sub.sub.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
docker-compose -f "$(pwd)/scripts/test_docker_compose.yaml" up -d | ||
|
||
export ORM_DRIVER=mysql | ||
export TZ=UTC | ||
export ORM_SOURCE="beego:test@tcp(localhost:13306)/orm_test?charset=utf8" | ||
|
||
# wait for services in images ready | ||
sleep 5 | ||
|
||
go test "$(pwd)/..." | ||
|
||
# clear all container | ||
docker-compose -f "$(pwd)/scripts/test_docker_compose.yaml" down | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
version: "3.8" | ||
services: | ||
redis: | ||
container_name: "beego-redis" | ||
image: redis | ||
environment: | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
ports: | ||
- "6379:6379" | ||
|
||
mysql: | ||
container_name: "beego-mysql" | ||
image: mysql:5.7.30 | ||
ports: | ||
- "13306:3306" | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=1q2w3e | ||
- MYSQL_DATABASE=orm_test | ||
- MYSQL_USER=beego | ||
- MYSQL_PASSWORD=test | ||
|
||
postgresql: | ||
container_name: "beego-postgresql" | ||
image: bitnami/postgresql:latest | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
ssdb: | ||
container_name: "beego-ssdb" | ||
image: wendal/ssdb | ||
ports: | ||
- "8888:8888" | ||
memcache: | ||
container_name: "beego-memcache" | ||
image: memcached | ||
ports: | ||
- "11211:11211" | ||
etcd: | ||
command: > | ||
sh -c " | ||
etcdctl put current.float 1.23 | ||
&& etcdctl put current.bool true | ||
&& etcdctl put current.int 11 | ||
&& etcdctl put current.string hello | ||
&& etcdctl put current.serialize.name test | ||
" | ||
container_name: "beego-etcd" | ||
environment: | ||
- ALLOW_NONE_AUTHENTICATION=yes | ||
# - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379 | ||
image: bitnami/etcd | ||
ports: | ||
- "2379:2379" | ||
- "2380:2380" |