From 5b8ff5ed4914642027422dd1956f2068cfbe95fd Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sat, 30 Sep 2017 21:12:24 +0200 Subject: graphite: 0.9.15 -> 1.0.2 Fixes: #29961 Also added the option: services.graphite.web.extraConfig for configuring graphite_web. --- nixos/lib/test-driver/Machine.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'nixos/lib/test-driver/Machine.pm') diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index cd375352c4ca..a7ed5d1faa38 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -372,6 +372,17 @@ sub getUnitInfo { return $info; } +# Fail if the given systemd unit is not in the "active" state. +sub requireActiveUnit { + my ($self, $unit) = @_; + $self->nest("checking if unit ‘$unit’ has reached state 'active'", sub { + my $info = $self->getUnitInfo($unit); + my $state = $info->{ActiveState}; + if ($state ne "active") { + die "Expected unit ‘$unit’ to to be in state 'active' but it is in state ‘$state’\n"; + }; + }); +} # Wait for a systemd unit to reach the "active" state. sub waitForUnit { -- cgit 1.4.1