Skip to content

Fix and re-enable automated tests #92

@DocDvorak

Description

@DocDvorak

My current understanding of the automated tests for this project are that they are disabled because they are based on a test user on a public community server that is no longer in operation. They may have also been disabled because network dependencies in automated tests can cause intermittent failures.

I propose implementing the following changes to re-enable testing on MMO and PTR (when PTR is available):

  1. Integrate an HTTP recording/playback library such as sepia, yakbak, or replay. When contributors add/modify tests or the SUT, they will use their own MMO/PTR credentials to run test code against the relevant server, and the responses (with credentials redacted) will be stored as files that will be committed alongside the test code.
  2. Implement a special wrapper/decorator for RawAPI endpoint functions to flag potentially dangerous endpoints. This would include any endpoint that performs an action that is destructive (ex: user.respawn) or not easily undone (ex: user.cpuShards). The test suite will only allow PTR to be used for those endpoints, and tests will fail if they recording and PTR is not accessible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions