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

[propose] Independent e2e test. #1633

Open
justadogistaken opened this issue Aug 14, 2022 · 4 comments
Open

[propose] Independent e2e test. #1633

justadogistaken opened this issue Aug 14, 2022 · 4 comments
Assignees
Labels
e2e-test it needs to run e2e test kind/feature Category issues or PRs related to feature request

Comments

@justadogistaken
Copy link
Member

justadogistaken commented Aug 14, 2022

Issue Description

Let me describe the way how we start e2e tests for sealer.

  1. Request ecs from alicloud.
  2. Run tests over the ecs.

There are some major problems for such approach of test, and there are some drawbacks in our way of testing.

  1. High cost: this is dependent on the resource from alicloud extremely.
  2. Absense of local test: Developers can only had their changes tested after the code gets pushed.
  3. Test context is not independent: Take test apply as a example. In this test, sealer will pull an online image(registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8) to execute apply. But I guess the image in test should be basical context, which means we'd better build a image before going to apply.

Describe what feature you want

I hope we can abandon the dependency for resource of alicloud.
At every e2e test, we start a registry, start some vms(contaienrs). There are basical context for sealer test.
And we build/apply/run over the vms. I think this job is not hard, and there are many available open source tools could help us out.

@justadogistaken justadogistaken added the kind/feature Category issues or PRs related to feature request label Aug 14, 2022
@allencloud allencloud added the e2e-test it needs to run e2e test label Aug 17, 2022
@justadogistaken
Copy link
Member Author

@zhy76 How about taking this work?
And I will split some todos to help you get this whole work done.

@zhy76
Copy link
Member

zhy76 commented Oct 2, 2022

OK!

@justadogistaken justadogistaken changed the title [propose] More independent e2e test. [propose] Independent e2e test. Oct 4, 2022
@justadogistaken
Copy link
Member Author

@zhy76
Here are my considerations for spilting the work.
There could be some steps to do probably.

Test context infra

Currently, the test context infra is launching ecs from alicloud. I hope to remove the dep.

  • Set up nodes: We could launch a set of contaienrs to simulate nodes for cluster deploying. So we could provide a basic ability in sealer, that is setting up test context with containers in standalone. You could create a pkg test/testinfra or something else in sealer/pkg. And in this pkg, we are able to launch test context. (We can learn from kind to know how they set up containers. Be aware of that what kind can do is deploying cluster in containers, but what we need is setting up containers to provide a test environment in standalone.)
  • Details: (1) Docs: Requirements for sealer e2e test. (like install docker...) (2) Containers network configuration.

E2e test context switching

When you finish the Test context infra, we could start to switch the current context to your implementation. The community will help you do this job. Your major responsiblity is Test context infra, which is important to sealer.

/cc @sealerio/sealer-maintainers @sealerio/sealer-reviewers

@zhy76
Copy link
Member

zhy76 commented Oct 5, 2022

0021A651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-test it needs to run e2e test kind/feature Category issues or PRs related to feature request
Projects
None yet
Development

No branches or pull requests

3 participants