Skip to content

split controlapi functional tests into their own package - #918

Open
Luiz Oliveira (laoj2) wants to merge 1 commit into
agent-substrate:mainfrom
laoj2:split-functional-tests
Open

split controlapi functional tests into their own package#918
Luiz Oliveira (laoj2) wants to merge 1 commit into
agent-substrate:mainfrom
laoj2:split-functional-tests

Conversation

@laoj2

Copy link
Copy Markdown
Collaborator

functional_test.go was also split into one file per resource, to match what we're doing for the RPC handlers too. See #891

I also needed to make some changes to move the tests to a separate package:

  • NewAteletDialer now takes options, and WithDialCredentials lets a test build its own transport credentials. The fake atelet is reached over insecure transport. Didn't change existing callers. This is the only non-test change.
  • Moved a few unit tests that are actually functional tests to the respective file under functionaltest/

Fixes #891

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@juli4n

Copy link
Copy Markdown
Collaborator

Needs rebase

@laoj2
Luiz Oliveira (laoj2) force-pushed the split-functional-tests branch 3 times, most recently from b7c772c to b13a339 Compare August 14, 2026 13:09
@laoj2

Copy link
Copy Markdown
Collaborator Author

CI was failing because tests were broken at HEAD. Rebased, so this should be good to be reviewed again now.

Luiz Oliveira (laoj2) added a commit to laoj2/substrate that referenced this pull request Aug 14, 2026
RunContractTests is getting large and resource tests are not always grouped together.
So, let's start with splitting them into separate functions. As they grow, we may consider moving them to their own files, like we did for functional tests in agent-substrate#918
functional_test.go was also split into one file per resource, to match what we're doing for the RPC handlers too. See agent-substrate#891

I also needed to make some changes to move the tests to a separate package:

* `NewAteletDialer` now takes `options`, and `WithDialCredentials`
lets a test build its own transport credentials. The fake atelet is
reached over insecure transport. Didn't change existing callers. This is the only
non-test change.
Julian Gutierrez Oschmann (juli4n) pushed a commit that referenced this pull request Aug 14, 2026
RunContractTests is getting large and resource tests are not always
grouped together. So, let's start with splitting them into separate
functions. As they grow, we may consider moving them to their own files,
like we did for functional tests in
#918

> It's a good idea to open an issue first for discussion.

- [x] Tests pass
- [ ] Appropriate changes to documentation are included in the PR
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.

Reorganize RPC handlers under cmd/ateapi/internal/controlapi

2 participants