MovingBlocks / TerasologyLauncher

Terasology Launcher is the official launcher for the open source game Terasology.
http://terasology.org/
Apache License 2.0
154 stars 76 forks source link

fix(repositories): make JenkinsRepositoryAdapter more resilient #624

Closed skaldarnar closed 3 years ago

skaldarnar commented 3 years ago

Testing JenkinsRepositoryAdapter - fetchReleases

input nothing (the adapter itself is initialized with a release specification)
action IO and processing of server resource(s) to internal data
output the list of available releases

Collaborators

Behavior

Ideas

skaldarnar commented 3 years ago

Example payload, positive case:

{
  "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
  "builds": [
    {
      "_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
      "artifacts": [
        { "relativePath": "distros/omega/build/distributions/md5sums.txt" },
        { "relativePath": "distros/omega/build/distributions/sha256sums.txt" },
        {
          "relativePath": "distros/omega/build/distributions/TerasologyOmega.zip"
        }
      ],
      "number": 1,
      "result": "SUCCESS",
      "timestamp": 1604285977306,
      "url": "http://jenkins.terasology.io/teraorg/job/Nanoware/job/Omega/job/develop/1/"
    }
  ]
}
skaldarnar commented 3 years ago

This has become quite a behemoth of a PR for the small fixes that were actually necessary :see_no_evil: I think I learned a lot about testing (and making code testable), and I discovered more bugs while writing more tests.