aboutsummaryrefslogtreecommitdiff
path: root/krash.rb
blob: 01ad0d962b8dbb543f00221ce2ef70252d715cae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Krash < Formula
  desc "Crash nodes on demand"
  homepage "https://git.segundo.io/Kubernetes/krash/about/"
  url "https://git.segundo.io/Kubernetes/krash/snapshot/krash-1.0.0.tar.gz"
  sha256 "ec44cc9f4740b2503759773dbd33356a3a9aeedac67c4775dac7f91846865ae7"
  license :cannot_represent
  head " https://git.segundo.io/Kubernetes/krash", branch: "master"

  depends_on "kubernetes-cli"
  depends_on "autoconf" => :build
  depends_on "automake" => :build

  def install
    system "aclocal"
    system "autoconf"
    system "automake", "--add-missing"
    system "./configure", "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    assert_match "<node-name> [-r|--reboot]", shell_output("#{bin}/krash", 1)
    assert_match "<node-name> [-r|--reboot]", shell_output("kubectl nodecrash", 1)
  end
end