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

e2e tests for spin #1065

Merged
merged 27 commits into from
Feb 3, 2023
Merged

e2e tests for spin #1065

merged 27 commits into from
Feb 3, 2023

Conversation

rajatjindal
Copy link
Collaborator

@rajatjindal rajatjindal commented Jan 26, 2023

The goal behind this PR is to have a unified framework to enable e2e testing for spin. This will enable us to keep our templates current and also allow us to add more integration tests quickly as we add more templates and examples.

At this moment it covers following:

  • testing with local deployment using spin up
  • testing with Fermyon Cloud using spin deploy

and covers following templates at the moment:

  • http-c
  • http-grain
  • http-rust
  • http-zig
  • http-go
  • http-js (using js2wasm plugin)
  • http-ts (using js2wasm plugin)

Remaining work that we should complete (may be in upcoming PR's):

  • Move tests currently part of integration tests to use this framework
  • Support running tests against local deployment of hippo, bindle
  • Add tests for more templates/examples

Looking forward to receiving feedback to make these e2e-tests useful.

@rajatjindal rajatjindal force-pushed the rust-e2e-tests branch 6 times, most recently from 58e2dbb to 1dc2d5a Compare January 28, 2023 13:35
@rajatjindal rajatjindal changed the title [WIP] e2e tests for spin e2e tests for spin Jan 29, 2023
Copy link
Collaborator

@calebschoepp calebschoepp left a comment

Choose a reason for hiding this comment

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

Took a read over. Excited for this functionality to merge in. Left two small comments.

crates/e2e-testing/src/spin.rs Outdated Show resolved Hide resolved
crates/e2e-testing/src/controller.rs Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.dockerignore Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
crates/e2e-testing/src/metadata_extractor.rs Show resolved Hide resolved
crates/e2e-testing/src/spin.rs Outdated Show resolved Hide resolved
e2e-tests.Dockerfile Show resolved Hide resolved
tests/testcases/headers-dynamic-env-test/src/lib.rs Outdated Show resolved Hide resolved
tests/testcases/headers-env-routes-test/spin-http.wit Outdated Show resolved Hide resolved
tests/README.md Outdated Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
crates/e2e-testing/src/asserts.rs Outdated Show resolved Hide resolved
crates/e2e-testing/src/spin.rs Show resolved Hide resolved
crates/e2e-testing/src/testcase.rs Outdated Show resolved Hide resolved
@rajatjindal rajatjindal force-pushed the rust-e2e-tests branch 3 times, most recently from 044d5d0 to 0342269 Compare February 1, 2023 13:51
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

This is looking great to me; excited to get this in so we can start iterating on it. The only change I request prior to merging isn't around e2e but the comment here: https://github.com/fermyon/spin/pull/1065/files#r1091285918.

@rajatjindal
Copy link
Collaborator Author

This is looking great to me; excited to get this in so we can start iterating on it. The only change I request prior to merging isn't around e2e but the comment here: https://github.com/fermyon/spin/pull/1065/files#r1091285918.

thanks Vaughn. I've removed the code-coverage block which I added unintentionally.

Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
@rajatjindal
Copy link
Collaborator Author

Hi Michelle, The current dockerfile didn't had support for arm/aarch64.

I am still using my Intel based macbook, so didn't catch this earlier. @vdice did mention issues with Dockerfile and I was wondering why he is trying to build for arm. Now I know :) (sorry Vaughn)

I've added a new dockefile for the same. could you please give it a shot.

Thanks
Rajat Jindal

@rajatjindal
Copy link
Collaborator Author

I am going to merge it and I can fix any remaining issues in upcoming PR's

@rajatjindal rajatjindal merged commit 0450e7d into fermyon:main Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants