Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stability: add more checks for scale & upgrade #327

Merged
merged 27 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
62425e7
add basic actions
weekface Feb 22, 2019
3a47c95
add e2e main func
weekface Mar 7, 2019
129df4f
tidb stability test main function (#306)
shuijing198799 Mar 12, 2019
4f8d71a
stability: add fault-trigger server (#312)
cwen0 Mar 14, 2019
c12bf3b
Yinliang/backup and restore add adhoc backup and restore functison (…
shuijing198799 Mar 15, 2019
da93efd
stability: add scale & upgrade case functions (#309)
zyguan Mar 18, 2019
2090950
add slack (#318)
xiaojingchen Mar 18, 2019
06a3742
log dump when test failed (#317)
xiaojingchen Mar 18, 2019
07f838d
stability: add fault-trigger client (#326)
cwen0 Mar 18, 2019
fb7184c
monitor checker (#320)
xiaojingchen Mar 18, 2019
ca26f79
stability: add more checks for scale operation
zyguan Mar 18, 2019
addadb9
stability: add checks for upgrade operations
zyguan Mar 18, 2019
4c3d275
stability: amend tidbMembersReadyFn
zyguan Mar 18, 2019
9d33e26
stability: add blockWriter case for inserting data (#321)
cwen0 Mar 19, 2019
f31476b
Merge remote-tracking branch 'origin/stability' into add-more-checks
zyguan Mar 19, 2019
61652fc
add scheduled-backup test case (#322)
shuijing198799 Mar 19, 2019
1743b8f
Merge remote-tracking branch 'origin/stability' into add-more-checks
zyguan Mar 19, 2019
7fb6083
stability: address the comments
zyguan Mar 19, 2019
432fdab
stability: port ddl test as a workload (#328)
zyguan Mar 20, 2019
b0ef8e1
stability: use fault-trigger at e2e tests and add some log (#330)
cwen0 Mar 20, 2019
fa2e51c
add binlog deploy and check process (#329)
shuijing198799 Mar 20, 2019
0f934aa
fix e2e can not make (#331)
xiaojingchen Mar 20, 2019
d3f630d
Merge remote-tracking branch 'origin/stability' into add-more-checks
zyguan Mar 20, 2019
a41eed9
revert go.mod changes
zyguan Mar 20, 2019
2d416c6
multi tidb cluster testing (#334)
xiaojingchen Mar 20, 2019
e853348
Merge remote-tracking branch 'origin/stability' into add-more-checks
zyguan Mar 20, 2019
f7dd605
Merge remote-tracking branch 'origin/master' into add-more-checks
zyguan Mar 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ images/tidb-operator-e2e/tidb-operator/
tmp/
data/
.idea
cscope.files
tags
filenametags

# ginkgo test coverage
*.coverprofile
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,10 @@ e2e-docker-push: e2e-docker
docker push "${DOCKER_REGISTRY}/pingcap/tidb-operator-e2e:latest"

e2e-docker: e2e-build
mkdir -p images/tidb-operator-e2e/bin
mv tests/e2e/e2e.test images/tidb-operator-e2e/bin/
[[ -d images/tidb-operator-e2e/tidb-operator ]] && rm -r images/tidb-operator-e2e/tidb-operator || true
[[ -d images/tidb-operator-e2e/tidb-cluster ]] && rm -r images/tidb-operator-e2e/tidb-cluster || true
cp -r charts/tidb-operator images/tidb-operator-e2e/
cp -r charts/tidb-cluster images/tidb-operator-e2e/
docker build -t "${DOCKER_REGISTRY}/pingcap/tidb-operator-e2e:latest" images/tidb-operator-e2e
docker build -t "${DOCKER_REGISTRY}/pingcap/tidb-operator-e2e:latest" tests/images/e2e

e2e-build:
$(GOENV) ginkgo build tests/e2e
$(GO) -ldflags '$(LDFLAGS)' -o tests/images/e2e/bin/e2e tests/cmd/e2e/main.go

test:
@echo "Run unit tests"
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/hpcloud/tail v1.0.0 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.5 // indirect
github.com/juju/errors v0.0.0-20180806074554-22422dad46e1 // indirect
github.com/juju/errors v0.0.0-20180806074554-22422dad46e1
github.com/juju/loggo v0.0.0-20180524022052-584905176618 // indirect
github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
Expand All @@ -42,13 +42,14 @@ require (
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.1
github.com/pborman/uuid v1.2.0 // indirect
github.com/pingcap/check v0.0.0-20171206051426-1c287c953996 // indirect
github.com/pingcap/errors v0.11.0
github.com/pingcap/kvproto v0.0.0-20180606093822-b7ba8ea1c0b4
github.com/pingcap/pd v2.1.0-beta+incompatible
github.com/pkg/errors v0.8.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v0.8.0 // indirect
github.com/prometheus/client_golang v0.8.0
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 // indirect
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e // indirect
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 // indirect
Expand All @@ -64,7 +65,7 @@ require (
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/crypto v0.0.0-20180807104621-f027049dab0a // indirect
golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24 // indirect
golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
golang.org/x/sys v0.0.0-20180807162357-acbc56fc7007 // indirect
golang.org/x/text v0.3.0 // indirect
Expand All @@ -79,7 +80,7 @@ require (
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.2.1
k8s.io/api v0.0.0-20180308224125-73d903622b73
k8s.io/apiextensions-apiserver v0.0.0-20180426153726-e8ab413e0ae1 // indirect
k8s.io/apimachinery v0.0.0-20180228050457-302974c03f7e
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
Expand Down Expand Up @@ -79,6 +80,7 @@ github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.1 h1:PZSj/UFNaVp3KxrzHOcS7oyuWA7LoOY/77yCTEFu21U=
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pingcap/check v0.0.0-20171206051426-1c287c953996 h1:ZBdiJCMan6GSo/aPAM7gywcUKa0z58gczVrnG6TQnAQ=
github.com/pingcap/check v0.0.0-20171206051426-1c287c953996/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ=
github.com/pingcap/errors v0.11.0 h1:DCJQB8jrHbQ1VVlMFIrbj2ApScNNotVmkSNplu2yUt4=
Expand Down
13 changes: 13 additions & 0 deletions pkg/label/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
package label

import (
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"strings"
)

const (
Expand Down Expand Up @@ -138,3 +140,14 @@ func (l Label) LabelSelector() *metav1.LabelSelector {
func (l Label) Labels() map[string]string {
return l
}

// String converts label to a string
func (l Label) String() string {
var arr []string

for k, v := range l {
arr = append(arr, fmt.Sprintf("%s=%s", k, v))
}

return strings.Join(arr, ",")
}
Loading