You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: cover the Service API in the integration suite - #527
Adds an integration test that installs a small service and runs it through the Service API: enable, start, script path, logs, log streaming, environment, restart, stop and disable. systemd hosts use a unit file. OpenRC hosts use an openrc-run script with supervise-daemon log files.
The Logs and StreamLogs subtests are expected to fail on the Alpine hosts until #525 is merged. The other subtests should pass everywhere.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by critical issues: the unconditional Alpine OpenRC log assertion fails until its prerequisite lands, and fixed system-wide test paths can overwrite and delete pre-existing host artifacts.
Adds integration coverage for the Service API across systemd and OpenRC hosts, including service installation, lifecycle operations, environment handling, script discovery, and log access.
Install a service that writes to stdout and stderr every second and
run it through Enable, Start, ScriptPath, Logs, StreamLogs,
SetEnvironment, Restart, Stop and Disable. systemd hosts get a unit
file. OpenRC hosts get an openrc-run script that sends the output to
log files with supervise-daemon.
Logs and StreamLogs fail on the Alpine hosts until OpenRC supports
them.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
A fixed name could overwrite a service that is already on the host,
and the cleanup would then remove it. StreamLogs is now also checked
for the stderr line, as Logs already was.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
An active moderate finding remains because a failed service-manager detection can abort the test before cleanup is registered, leaving files on the integration host.
A failed service lookup aborted the test after the program and the
service definition were written but before the cleanup was in place.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Active moderate and critical findings remain in test/rig_test.go: OpenRC detection can select an invalid provider, and the Alpine integration reaches unsupported log handling that deterministically fails.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Match OpenRC detection to the provider’s init-system check
test/rig_test.go:532
Using command -v openrc-run here does not match the provider's OpenRC detection. On a host that has the OpenRC scripts installed but is booted under another init system, this selects the OpenRC setup and then h.Service(name) fails instead of skipping the test. Please use the same openrc-init//etc/inittab check as initsystem.RegisterOpenRC.
The test checked for systemd and OpenRC with commands of its own,
which did not match the checks of the providers. A host with OpenRC
installed but booted under another init system got an OpenRC
definition, and the service lookup then failed. The test now asks
the client which init system it detected.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The privileged remote integration and its systemd/OpenRC, journald, log-handling, escalation, and cleanup behavior require execution across the supported host matrix, which static review cannot validate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an integration test that installs a small service and runs it through the Service API: enable, start, script path, logs, log streaming, environment, restart, stop and disable. systemd hosts use a unit file. OpenRC hosts use an openrc-run script with supervise-daemon log files.
The Logs and StreamLogs subtests are expected to fail on the Alpine hosts until #525 is merged. The other subtests should pass everywhere.