openbmc / openbmc-build-scripts

Apache License 2.0
19 stars 50 forks source link

Need systemd in the unit test docker #33

Open ShichenLin opened 2 years ago

ShichenLin commented 2 years ago

I have a problem that I write a new unit test for bmcweb but this test cannot run via the current CI flow. My unit test focuses on the subscription part of Event Service, so it runs bmcweb app partially and mimics a client to check on the broadcasted test events. However, the HTTP part of bmcweb needs systemd-resolved.service to resolve hostnames and thus further depends on systemd while systemd is not supported in the unit test docker, so is it possible to add systemd in the unit test docker?

williamspatrick commented 2 years ago

You should mock out the dbus calls that bmcweb would interact with. There should be other examples of creating a dummy dbus end-point.