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

Add timechaos and pause timechaos e2e test case #441

Merged
merged 6 commits into from
Apr 24, 2020

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Apr 22, 2020

Signed-off-by: yeya24 [email protected]

In order to test time chaos in e2e, I add a test program, which is mainly copied from #222

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 22, 2020

/run-e2e-test

@codecov-io
Copy link

codecov-io commented Apr 22, 2020

Codecov Report

Merging #441 into master will increase coverage by 1.08%.
The diff coverage is 59.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #441      +/-   ##
==========================================
+ Coverage   60.40%   61.48%   +1.08%     
==========================================
  Files          36       64      +28     
  Lines        1985     4069    +2084     
==========================================
+ Hits         1199     2502    +1303     
- Misses        692     1379     +687     
- Partials       94      188      +94     
Impacted Files Coverage Δ
api/v1alpha1/iochaos_types.go 31.11% <0.00%> (-1.45%) ⬇️
api/v1alpha1/podchaos_types.go 31.11% <0.00%> (-1.45%) ⬇️
controllers/kernelchaos_controller.go 0.00% <0.00%> (ø)
controllers/timechaos_controller.go 0.00% <0.00%> (ø)
pkg/chaosdaemon/netlink_linux.go 0.00% <0.00%> (ø)
pkg/chaosdaemon/server.go 44.44% <0.00%> (ø)
pkg/ptrace/ptrace_linux.go 65.55% <ø> (-0.38%) ⬇️
pkg/utils/coalescer.go 0.00% <0.00%> (ø)
pkg/utils/graph.go 0.00% <0.00%> (ø)
pkg/utils/grpc.go 0.00% <0.00%> (ø)
... and 71 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a70064...9621c60. Read the comment docs.

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 22, 2020

/run-e2e-test

Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could wait unit #442 is merged and organize the timechaos case with its style.

test/config.go Outdated
@@ -22,6 +22,7 @@ type Config struct {
ManagerTag string
DaemonImage string
DaemonTag string
TimerImage string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to name it as E2eImage as we would put more binary to help e2e test in this image, not only timechaos.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean we may add some other binaries to this image? Make sense!

Will update it tomorrow

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 22, 2020

/run-e2e-test

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 22, 2020

Found a flaky test case https://github.com/pingcap/chaos-mesh/blob/master/pkg/ptrace/ptrace_linux_test.go here

Not related to this PR. E2E test passed

Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM

hack/e2e.sh Outdated
@@ -153,6 +154,7 @@ function e2e::image_load() {
for n in ${names[@]}; do
$KIND_BIN load docker-image --name $CLUSTER ${DOCKER_REGISTRY}/$n:$IMAGE_TAG
done
$KIND_BIN load docker-image --name $CLUSTER ${DOCKER_REGISTRY}/pingcap/e2e-helper:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could add pingcap/e2e-helper into names

local names=(
        pingcap/chaos-mesh
        pingcap/chaos-daemon
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it below since I think maybe helper image just needs to use fixed latest tag. Do we need to use ${IMAGE_TAG}?
Do we need to push it to docker hub as well? If yes, I am happy to update the tag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someday we would use e2e test framework as our stability env and we would push relative image to the internal hub.

Makefile Outdated
@@ -217,6 +217,9 @@ endif
cp -r manifests test/image/e2e
docker build -t "${DOCKER_REGISTRY_PREFIX}pingcap/chaos-mesh-e2e:${IMAGE_TAG}" test/image/e2e

image-e2e-helper:
docker build -t "${DOCKER_REGISTRY_PREFIX}pingcap/e2e-helper:latest" test/cmd/e2e_helper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ${IMAGE_TAG} here

hack/run-e2e.sh Outdated
@@ -80,6 +80,7 @@ e2e_args=(
--manager-image-tag="${IMAGE_TAG}"
--daemon-image="${DOCKER_REGISTRY}/pingcap/chaos-daemon"
--daemon-image-tag="${IMAGE_TAG}"
--e2e-image="${DOCKER_REGISTRY}/pingcap/e2e-helper:latest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ${DOCKER_REGISTRY}/pingcap/e2e-helper:${IMAGE_TAG}

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 23, 2020

Done. @Yisaer @cwen0 PTAL

@yeya24 yeya24 closed this Apr 23, 2020
@yeya24 yeya24 reopened this Apr 23, 2020
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 23, 2020

/run-e2e-test

1 similar comment
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 23, 2020

/run-e2e-test

Copy link
Member

@cwen0 cwen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cwen0
Copy link
Member

cwen0 commented Apr 24, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 24, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 24, 2020

@yeya24 merge failed.

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 24, 2020

/run-all-tests

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 24, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 24, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 24, 2020

@yeya24 merge failed.

@Yisaer
Copy link
Contributor

Yisaer commented Apr 24, 2020

/run-e2e-test

@yeya24
Copy link
Contributor Author

yeya24 commented Apr 24, 2020

/run-e2e-test

1 similar comment
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 24, 2020

/run-e2e-test

@yeya24 yeya24 merged commit 48f5e6f into chaos-mesh:master Apr 24, 2020
@yeya24 yeya24 deleted the e2e-time branch April 24, 2020 04:48
sjwsl pushed a commit to sjwsl/chaos-mesh that referenced this pull request May 6, 2021
* add timechaos e2e and pause timechaos

Signed-off-by: yeya24 <[email protected]>

* add kind load timer image

Signed-off-by: yeya24 <[email protected]>

* update e2e helper image

Signed-off-by: yeya24 <[email protected]>

* address comments

Signed-off-by: yeya24 <[email protected]>

* use image tag in e2e image

Signed-off-by: yeya24 <[email protected]>

Co-authored-by: pingcap-github-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants