Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Refactor test file structure #478

Open
gideonthomas opened this issue Jan 16, 2015 · 0 comments
Open

Refactor test file structure #478

gideonthomas opened this issue Jan 16, 2015 · 0 comments
Labels
Milestone

Comments

@gideonthomas
Copy link
Contributor

The test file tree seems to be quite messy. We have integration tests in the unit test directory and vice versa.
One of the main reasons this might have happened is because it can be hard to define what an integration test really is in MakeDrive's case.

It might be safe to say that we can consider an integration test to be a test that examines ONE piece of functionality that might involve multiple syncs or an entire sync process to occur (such that we test the end state of one side of the system i.e. either the client or the server).
A unit test on the other hand can be defined as a test that examines each step of ONE sync. This can be at the protocol level (testing a SyncMessage request/response pair) or rsync tests or route tests.

Usually a unit test would involve faking either the client or the server depending on the scenario but the test framework itself is in control of one of those components completely. This is not true for integration tests as we would control neither component and simply provide an input, let the system process it in multiple steps and then examine the final output (not testing intermediate outputs).

One suggested approach to this is to have the following tree structure:

  • utils
  • /integration
  • /unit
    • /client
      • /socket-protocol
      • /upstream
      • /downstream
    • /server
      • /socket-protocol
      • /upstream
      • /downstream
@gideonthomas gideonthomas added this to the Optimum milestone Jan 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant