ontola / ontola/atomic-server

Test Commits in server, test `client`

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.6k
Forks
82
Avg merge
10h 34m
Merged PRs (30d)
205

Description

Commits are not tested in the server, even though there are quite a bit of things that could go wrong. They are tested in the end-to-end tests, though, but these are very slow. The problem with testing the the front-end, is that I'm not using atomic_lib:client, which would make things easier. However, testing with actix means using its test::TestRequest struct, which means that I have to re-implement requests / client. I don't like that. But... re-implementing these isn't too much work. We can set the method like this:

    let req = build_request_authenticated("/commit", &appstate).method(Method::POST);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the existing end-to-end tests for commits with the server code handling POST requests to /commit. Review how actix::test::TestRequest and build_request_authenticated can represent the client requests without atomic_lib::client. Done means server-side commit tests cover the relevant request behavior without relying on the slower end-to-end suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.