summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorBas van Dijk <v.dijk.bas@gmail.com>2017-09-30 21:12:24 +0200
committerBas van Dijk <v.dijk.bas@gmail.com>2017-10-08 03:03:22 +0200
commit5b8ff5ed4914642027422dd1956f2068cfbe95fd (patch)
tree97ef152777a311477dd8fdb446f8a57dd2b20a54 /nixos/lib
parent3fe7cddc304abb86e61a750a4f807270c7ca7825 (diff)
downloadnixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.gz
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.bz2
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.lz
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.xz
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.zst
nixlib-5b8ff5ed4914642027422dd1956f2068cfbe95fd.zip
graphite: 0.9.15 -> 1.0.2
Fixes: #29961

Also added the option:

  services.graphite.web.extraConfig

for configuring graphite_web.
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/test-driver/Machine.pm11
1 files changed, 11 insertions, 0 deletions
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 {