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

chore: migrate integration tests #1617

Closed
wants to merge 13 commits into from

Conversation

jonathanj-square
Copy link
Contributor

fixes: #1606

migrates integration tests to the package corresponding to the domain of exercised functionality, when it is clear. There are a few tests that were not moved. The placement for these tests are not known so please provide feedback indicate which package you think this should land in if you have an idea.

@jonathanj-square jonathanj-square requested review from a team and deniseli and removed request for a team May 31, 2024 20:55
@ftl-robot ftl-robot mentioned this pull request May 31, 2024
@jonathanj-square jonathanj-square force-pushed the jonathanj/migration-integration-tests branch from 1daf47d to 26c58ef Compare May 31, 2024 21:16
Copy link
Collaborator

@wesbillman wesbillman left a comment

Choose a reason for hiding this comment

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

Woot! It's so nice being able to co-locate this stuff now!

There might be a few others we can move as well. Here are some rough ideas on where the rest can go:

TestLifecycle - go-runtime/ftl
TestInterModuleCall - go-runtime/ftl
TestNonExportedDecls - go-runtime/compile
TestUndefinedExportedDecls - go-runtime/compile
TestSchemaGenerate - backend/schema or cmd/ftl
TestHttpEncodeOmitempty - go-runtime/encoding
TestRuntimeReflection - go-runtime/reflection
TestModuleUnitTests - go-runtime/ftl/ftltest

@wesbillman
Copy link
Collaborator

I get a few modified files when I run this locally:

git st
 M buildengine/testdata/projects/alpha/go.sum
 M buildengine/testdata/projects/another/go.sum
 M buildengine/testdata/projects/other/go.sum
 M go-runtime/compile/testdata/failing/go.sum
 M go-runtime/compile/testdata/one/go.sum
 M go-runtime/compile/testdata/parent/go.sum
 M go-runtime/compile/testdata/pubsub/go.sum
 M go-runtime/compile/testdata/subscriber/go.sum
 M go-runtime/compile/testdata/two/go.sum

It also seems to fail one of the tests locally for me, but seems like it's working here on CI 🤔

=== RUN   TestASMWorkflow
    /Users/wesbillman/dev/ftl/common/configuration/asm_test.go:47: Did not expect an error but got:
        unable to list secrets: operation error Secrets Manager: ListSecrets, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , request send failed, Post "http://localhost:4566/": dial tcp [::1]:4566: connect: connection refused
--- FAIL: TestASMWorkflow (9.16s)
=== RUN   TestASMPagination
    /Users/wesbillman/dev/ftl/common/configuration/asm_test.go:91: Did not expect an error but got:
        unable to store secret: operation error Secrets Manager: CreateSecret, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , request send failed, Post "http://localhost:4566/": dial tcp [::1]:4566: connect: connection refused
--- FAIL: TestASMPagination (5.71s)

jonathanj-square and others added 8 commits June 3, 2024 15:17
Not because they're slow, but just so we don't need localstack running
during day-to-day development.
Fixes: #1561

```
$ rm ftl-project-idk.toml
$ ftl config set yo --inline value -C ftl-project-idk.toml
warn: Creating a new project config file at "ftl-project-idk.toml" because the file does not already exist
$ ftl config set yo --inline value -C ftl-project-idk.toml
$ stat ftl-project-idk.toml                         
16777232 3291117 -rw------- 1 dli staff 0 125 "Jun  3 22:44:16 2024" "Jun  3 22:44:15 2024" "Jun  3 22:44:15 2024" "Jun  3 22:44:15 2024" 4096 8 0 ftl-project-idk.toml
$
```
- pipes module calls for publishing events through to the controller to
the db
- fake implementation for tests not included
- added TopicEventKey. It will be generally useful I think, but also
required for how db events are set up needing a "key" column
)

And the types are named TopicHandle/SubscriptionHandle. This aligns more
with the existing naming conventions, eg. `Map()` -> `MapHandle`, etc.
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [svu](https://togithub.com/caarlos0/svu) | major | `1.12.0` -> `2.0.1`
|

---

### Release Notes

<details>
<summary>caarlos0/svu (svu)</summary>

### [`v2.0.1`](https://togithub.com/caarlos0/svu/releases/tag/v2.0.1)

This is just to prevent gomod caching issues when using it as a library.
It is otherwise the same as v2.0.0, I had to recreate that tag due to a
CI misconfiguration.

#### Changelog

##### New Features

-
[`b58abe1`](https://togithub.com/caarlos0/svu/commit/b58abe18a2f71fcd9d295f8ddd4d8a9bc3fb71c9):
feat: update kingpin to latest v2
([@&#8203;caarlos0](https://togithub.com/caarlos0))
-
[`f9df0ac`](https://togithub.com/caarlos0/svu/commit/f9df0ace1c4a9b94a93e1e05a907ab3e586c03ee):
feat: update semver to v3
([@&#8203;caarlos0](https://togithub.com/caarlos0))
-
[`adf3c2a`](https://togithub.com/caarlos0/svu/commit/adf3c2a8f8604e92ba3cb5e4db18eee918c64fbe):
feat: use go 1.22 ([@&#8203;caarlos0](https://togithub.com/caarlos0))

##### Bug fixes

-
[`dc4ce5b`](https://togithub.com/caarlos0/svu/commit/dc4ce5ba4ed88cb80364ad122e84e90a66001d17):
fix: go 1.22 ([@&#8203;caarlos0](https://togithub.com/caarlos0))

##### Other work

-
[`7cf187a`](https://togithub.com/caarlos0/svu/commit/7cf187a636b7aa676a9acde3f81bb4c858a1de4c):
feat!: gate v0 increment prevention
([@&#8203;caarlos0](https://togithub.com/caarlos0))
-
[`710f53a`](https://togithub.com/caarlos0/svu/commit/710f53a13f10716e123a84aea9b65caa0a25277a):
feat!: prepare for v2 release
([@&#8203;caarlos0](https://togithub.com/caarlos0))

***

*Released with [GoReleaser Pro](https://goreleaser.com/pro)!*

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TBD54566975/ftl).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Toohey <[email protected]>
Since we have no real tests in `frontend` currently, and they are
painful to maintain, removing them for now. We can add a proper setup
once we're ready to invest in frontend tests.

Also, removed a bunch of old unused packages
@jonathanj-square jonathanj-square marked this pull request as draft June 4, 2024 17:38
@jonathanj-square
Copy link
Contributor Author

abandoned due to heavy merge conflicts - this PR has been restarted and merged

@jonathanj-square jonathanj-square deleted the jonathanj/migration-integration-tests branch June 4, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate integration tests to their logical package
5 participants