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

fix: compilation errors with functional_tests flag #195

Merged
merged 1 commit into from
Sep 18, 2023
Merged

fix: compilation errors with functional_tests flag #195

merged 1 commit into from
Sep 18, 2023

Conversation

geekbrother
Copy link
Contributor

@geekbrother geekbrother commented Sep 14, 2023

Description

When the --features functional_tests flag is enabled there are few errors that break the building process:

error[E0308]: mismatched types
  --> tests/functional/singletenant/push.rs:62:16
   |
62 |         topic: Some(topic.into()),
   |                ^^^^^^^^^^^^^^^^^^ expected `String`, found `Option<_>`
   |
   = note: expected struct `std::string::String`
                found enum `Option<_>`

error[E0308]: mismatched types
  --> tests/functional/stores/notification.rs:38:20
   |
38 |             topic: None,
   |                    ^^^^ expected `String`, found `Option<_>`
   |
   = note: expected struct `std::string::String`
                found enum `Option<_>`

Seems that functional tests are out of sync with recent changes. To fix that I've changed fields to the expected types in the errors to make them in sync with the recent changes and make the functional tests compile.

Resolves #194

How Has This Been Tested?

It was tested by running cargo test --features functional_tests.
The expected result is successful test building with the functional_tests enabled without errors.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@geekbrother geekbrother added the area-tests Testing label Sep 14, 2023
@geekbrother geekbrother self-assigned this Sep 14, 2023
@geekbrother geekbrother mentioned this pull request Sep 14, 2023
3 tasks
Copy link
Contributor

@xav xav left a comment

Choose a reason for hiding this comment

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

If the tests are working again, can we run them in the CI too?
I don't know why we ever stopped actually.

Copy link
Member

@chris13524 chris13524 left a comment

Choose a reason for hiding this comment

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

LGTM.

And yeah, would be great to run these in CI/CD!

@geekbrother
Copy link
Contributor Author

If the tests are working again, can we run them in the CI too?

Not exactly, they compile, but some of them fail (I assume they are out of sync with changes). These PR changes make the functional tests compile and #196 fixes the client_upsert test.

And yeah, would be great to run these in CI/CD!

Yeah, we can fix failing tests and fix a few low-hanging fruits to make it work in a CI/CD. I will create an issue for this, but not sure about the prioritization of this task cc @xav , @arein .

@geekbrother
Copy link
Contributor Author

If the tests are working again, can we run them in the CI too?
And yeah, would be great to run these in CI/CD!

#198 enabling the functional testing in our CI workflow.

@geekbrother geekbrother merged commit b6c88f1 into WalletConnect:main Sep 18, 2023
13 of 14 checks passed
@geekbrother geekbrother deleted the fix/functional_test_compilation branch September 22, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tests Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: errors when building with functional_tests features flag
3 participants