func TestTerminateOnlyKillsInProd(t *testing.T) {
	deps := mockDeps()
	err := Terminate(deps, "quux", "test", "us-east-1", "", "quux-test")
	if err != nil {
		t.Fatal(err)
	}
	ttor := deps.T.(*mock.Terminator)
	if got, want := ttor.Ncalls, 0; got != want {
		t.Errorf("Expected terminator to not be called, got ttor.Ncalls=%d", ttor.Ncalls)
	}
}
TestTerminateOnlyKillsInProd ensures we don't kill in non-prod accounts
This is temporary until we have full support for multiple accounts
package term
import (
	"errors"
	"testing"
	"time"
	"github.com/Netflix/chaosmonkey"
	"github.com/Netflix/chaosmonkey/clock"
	"github.com/Netflix/chaosmonkey/config"
	"github.com/Netflix/chaosmonkey/config/param"
	"github.com/Netflix/chaosmonkey/deps"
	"github.com/Netflix/chaosmonkey/mock"
)
func mockDeps() deps.Deps {
	monkeyCfg := config.Defaults()
	monkeyCfg.Set(param.Enabled, true)
	monkeyCfg.Set(param.Leashed, false)
	monkeyCfg.Set(param.Accounts, []string{"prod"})
	recorder := mock.Checker{Error: nil}
	confGetter := mock.DefaultConfigGetter()
	cl := clock.New()
	dep := mock.Dep()
	ttor := mock.Terminator{}
	ou := mock.Outage{}
	env := mock.Env{IsInTest: false}
	return deps.Deps{MonkeyCfg: monkeyCfg, Checker: recorder, ConfGetter: confGetter, Cl: cl, Dep: dep, T: &ttor, Ou: ou, Env: env}
}
func TestTerminateKills(t *testing.T) {
	deps := mockDeps()
	err := Terminate(deps, "foo", "prod", "us-east-1", "", "foo-prod")
	if err != nil {
		t.Fatal(err)
	}
	ttor := deps.T.(*mock.Terminator)
	ins := ttor.Instance
	if got, want := ttor.Ncalls, 1; got != want {
		t.Fatalf("Expected terminator to be called once, got ttor.Ncalls=%d", ttor.Ncalls)
	}
	if got, want := ins.AppName(), "foo"; got != want {
		t.Errorf("Expected ins.AppName()=%s. want %s", got, want)
	}
	if got, want := ins.AccountName(), "prod"; got != want {
		t.Errorf("Expected ins.AccountName()=%s. want %s", got, want)
	}
	if got, want := ins.RegionName(), "us-east-1"; got != want {
		t.Errorf("Expected ins.RegionName()=%s. want %s", got, want)
	}
	if got, want := ins.ClusterName(), "foo-prod"; got != want {
		t.Errorf("Expected ins.ClusterName()=%s. want %s", got, want)
	}
}