1
0
mirror of https://github.com/gryf/ferrit.git synced 2026-02-07 16:55:47 +01:00
gryf 9605cb22f0 Implement method /a/changes.
After gerrit recives an action (like creating a review, comment, and so
on) it will send appropriate json from ssh server. Jenkins, which is
listening on the ssh channel will receive this message and do
appropriate action (for example, it will do the build/test whatever),
and sends back notification back to HTTP gerrit server to /a/changes
endpoint. There are couple of requests to that url, which will indicate
what jenkins is doing (like starting build, sending result info).
2019-11-01 08:17:14 +01:00
2019-10-24 14:01:49 +02:00
2019-10-29 19:26:47 +01:00
2019-11-01 08:17:14 +01:00

Ferrit

Ferrit is a fake Gerrit server implementation created for functional testing of events in Jenkins & Gerrit Trigger ecosystem.


Architecture

Ferrit consists of two servers, http and ssh and companion script for generating payload for the ssh server.

We relay on real Jenkins installation, so it has to be configured up front. See next section for details.

Having Jenkins up and running, we can simultaneously run ssh and http servers by invoking:

$ python3 gerrit_fake_http_server.py

and

$ python3 gerrit_fake_ssh_server.py

Output of the last command will provide fifo file name used for triggering events in json format which can be generated using third part of the Ferrit - script generate_event.py.

Installation

Prerequisites

Python

Ferrit modules are written in Python and depends on two external libraries:

Please note, Python 2.x is not supported.

Ferrite image by Karl-Martin Skontorp is on Attribution 2.0 Generic (CC BY 2.0) license.

Description
POC of gerrit server impostor just for functional tests purposes.
Readme 178 KiB
Languages
Python 100%