• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang commandmocker.Parameters函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/globocom/commandmocker.Parameters函数的典型用法代码示例。如果您正苦于以下问题:Golang Parameters函数的具体用法?Golang Parameters怎么用?Golang Parameters使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Parameters函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: TestRemoveUnits

func (s *S) TestRemoveUnits(c *C) {
	tmpdir, err := commandmocker.Add("juju", "removed")
	c.Assert(err, IsNil)
	defer commandmocker.Remove(tmpdir)
	app := NewFakeApp("xanadu", "rush", 4)
	p := JujuProvisioner{}
	units, err := p.RemoveUnits(app, 3)
	c.Assert(err, IsNil)
	expected := []string{
		"remove-unit", "xanadu/0", "xanadu/1", "xanadu/2",
		"terminate-machine", "1",
		"terminate-machine", "2",
		"terminate-machine", "3",
	}
	ran := make(chan bool, 1)
	go func() {
		for {
			if reflect.DeepEqual(commandmocker.Parameters(tmpdir), expected) {
				ran <- true
			}
		}
	}()
	select {
	case <-ran:
	case <-time.After(2e9):
		params := commandmocker.Parameters(tmpdir)
		c.Fatalf("Did not run terminate-machine commands after 2 seconds. Parameters: %#v", params)
	}
	c.Assert(units, DeepEquals, []int{0, 1, 2})
}
开发者ID:astaxie,项目名称:tsuru,代码行数:30,代码来源:provisioner_test.go


示例2: TestDestroy

func (s *S) TestDestroy(c *C) {
	tmpdir, err := commandmocker.Add("juju", "$*")
	c.Assert(err, IsNil)
	defer commandmocker.Remove(tmpdir)
	app := NewFakeApp("cribcaged", "python", 3)
	p := JujuProvisioner{}
	err = p.Destroy(app)
	c.Assert(err, IsNil)
	c.Assert(commandmocker.Ran(tmpdir), Equals, true)
	expected := []string{
		"destroy-service", "cribcaged",
		"terminate-machine", "1",
		"terminate-machine", "2",
		"terminate-machine", "3",
	}
	ran := make(chan bool, 1)
	go func() {
		for {
			if reflect.DeepEqual(commandmocker.Parameters(tmpdir), expected) {
				ran <- true
			}
		}
	}()
	select {
	case <-ran:
	case <-time.After(2e9):
		c.Errorf("Did not run terminate-machine commands after 2 seconds.")
	}
	c.Assert(commandmocker.Parameters(tmpdir), DeepEquals, expected)
}
开发者ID:astaxie,项目名称:tsuru,代码行数:30,代码来源:provisioner_test.go


示例3: TestRemoveUnit

func (s *S) TestRemoveUnit(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("juju", "removed")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	app := testing.NewFakeApp("two", "rush", 3)
	p := JujuProvisioner{}
	conn, collection := p.unitsCollection()
	defer conn.Close()
	err = collection.Insert(instance{UnitName: "two/2", InstanceId: "i-00000439"})
	c.Assert(err, gocheck.IsNil)
	err = p.RemoveUnit(app, "two/2")
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	expected := []string{"remove-unit", "two/2", "terminate-machine", "3"}
	ran := make(chan bool, 1)
	go func() {
		for {
			if reflect.DeepEqual(commandmocker.Parameters(tmpdir), expected) {
				ran <- true
			}
			time.Sleep(1e3)
		}
	}()
	n, err := collection.Find(bson.M{"_id": "two/2"}).Count()
	c.Assert(err, gocheck.IsNil)
	c.Assert(n, gocheck.Equals, 0)
	select {
	case <-ran:
	case <-time.After(2e9):
		c.Errorf("Did not run terminate-machine command after 2 seconds.")
	}
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:32,代码来源:provisioner_test.go


示例4: TestBootstrapProvisionHealerHeal

func (s *S) TestBootstrapProvisionHealerHeal(c *gocheck.C) {
	p := JujuProvisioner{}
	m := machine{
		AgentState:    "not-started",
		IpAddress:     "localhost",
		InstanceId:    "i-00000376",
		InstanceState: "running",
	}
	p.saveBootstrapMachine(m)
	conn, collection := p.bootstrapCollection()
	defer conn.Close()
	defer collection.Remove(m)
	sshTmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTmpdir)
	sshOutput := []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"localhost",
		"sudo",
		"start",
		"juju-provision-agent",
	}
	h := bootstrapProvisionHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(sshTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(sshTmpdir), gocheck.DeepEquals, sshOutput)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:32,代码来源:healer_test.go


示例5: TestDestroy

func (s *S) TestDestroy(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("juju", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	app := testing.NewFakeApp("cribcaged", "python", 3)
	p := JujuProvisioner{}
	conn, collection := p.unitsCollection()
	defer conn.Close()
	err = collection.Insert(
		instance{UnitName: "cribcaged/0"},
		instance{UnitName: "cribcaged/1"},
		instance{UnitName: "cribcaged/2"},
	)
	c.Assert(err, gocheck.IsNil)
	err = p.Destroy(app)
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	expected := []string{
		"destroy-service", "cribcaged",
		"terminate-machine", "1",
		"terminate-machine", "2",
		"terminate-machine", "3",
	}
	ran := make(chan bool, 1)
	go func() {
		for {
			if reflect.DeepEqual(commandmocker.Parameters(tmpdir), expected) {
				ran <- true
			}
			time.Sleep(1e3)
		}
	}()
	n, err := collection.Find(bson.M{
		"_id": bson.M{
			"$in": []string{"cribcaged/0", "cribcaged/1", "cribcaged/2"},
		},
	}).Count()
	c.Assert(err, gocheck.IsNil)
	c.Assert(n, gocheck.Equals, 0)
	select {
	case <-ran:
	case <-time.After(2e9):
		c.Errorf("Did not run terminate-machine commands after 2 seconds.")
	}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, expected)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:46,代码来源:provisioner_test.go


示例6: TestProvisionSetup

func (s *S) TestProvisionSetup(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("scp", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	sshTempDir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTempDir)
	p := LocalProvisioner{}
	formulasPath := "/home/ubuntu/formulas"
	config.Set("local:formulas-path", formulasPath)
	err = p.setup("10.10.10.10", "static")
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	cmds := []string{
		"-q",
		"-o",
		"StrictHostKeyChecking no",
		"-r",
		formulasPath + "/static/hooks",
		"[email protected]:/var/lib/tsuru",
	}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, cmds)
	c.Assert(commandmocker.Ran(sshTempDir), gocheck.Equals, true)
	cmds = []string{
		"-q",
		"-o",
		"StrictHostKeyChecking no",
		"-l",
		"ubuntu",
		"10.10.10.10",
		"sudo mkdir -p /var/lib/tsuru/hooks",
		"-q",
		"-o",
		"StrictHostKeyChecking no",
		"-l",
		"ubuntu",
		"10.10.10.10",
		"sudo chown -R ubuntu /var/lib/tsuru/hooks",
	}
	c.Assert(commandmocker.Parameters(sshTempDir), gocheck.DeepEquals, cmds)
}
开发者ID:bardusco,项目名称:tsuru,代码行数:41,代码来源:provisioner_test.go


示例7: TestExecuteWithoutArgs

func (s *S) TestExecuteWithoutArgs(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("ls", "ok")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	var e OsExecutor
	var b bytes.Buffer
	err = e.Execute("ls", nil, nil, &b, &b)
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.IsNil)
	c.Assert(b.String(), gocheck.Equals, "ok")
}
开发者ID:nkts,项目名称:golang-devops-stuff,代码行数:12,代码来源:exec_test.go


示例8: TestExecute

func (s *S) TestExecute(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("ls", "ok")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	var e OsExecutor
	var b bytes.Buffer
	err = e.Execute("ls", []string{"-lsa"}, nil, &b, &b)
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	expected := []string{"-lsa"}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, expected)
	c.Assert(b.String(), gocheck.Equals, "ok")
}
开发者ID:nkts,项目名称:golang-devops-stuff,代码行数:13,代码来源:exec_test.go


示例9: TestInstanceMachineHeal

func (s *S) TestInstanceMachineHeal(c *gocheck.C) {
	jujuTmpdir, err := commandmocker.Add("juju", collectOutputInstanceDown)
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(jujuTmpdir)
	sshTmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTmpdir)
	jujuOutput := []string{
		"status", // for juju status that gets the output
	}
	sshOutput := []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"10.10.10.163",
		"sudo",
		"stop",
		"juju-machine-agent",
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"10.10.10.163",
		"sudo",
		"start",
		"juju-machine-agent",
	}
	h := instanceMachineHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(jujuTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(jujuTmpdir), gocheck.DeepEquals, jujuOutput)
	c.Assert(commandmocker.Ran(sshTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(sshTmpdir), gocheck.DeepEquals, sshOutput)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:38,代码来源:healer_test.go


示例10: TestRestart

func (s *S) TestRestart(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("juju", "restart")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	app := testing.NewFakeApp("cribcaged", "python", 1)
	p := JujuProvisioner{}
	err = p.Restart(app)
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	expected := []string{
		"ssh", "-o", "StrictHostKeyChecking no", "-q", "1", "/var/lib/tsuru/hooks/restart",
	}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, expected)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:14,代码来源:provisioner_test.go


示例11: TestZookeeperHealerHeal

func (s *S) TestZookeeperHealerHeal(c *gocheck.C) {
	ln, err := net.Listen("tcp", ":2181")
	c.Assert(err, gocheck.IsNil)
	defer ln.Close()
	go func() {
		conn, _ := ln.Accept()
		fmt.Fprintln(conn, "notok")
		conn.Close()
	}()
	p := JujuProvisioner{}
	m := machine{
		AgentState:    "not-started",
		IpAddress:     "localhost",
		InstanceId:    "i-00000376",
		InstanceState: "running",
	}
	p.saveBootstrapMachine(m)
	conn, collection := p.bootstrapCollection()
	defer conn.Close()
	defer collection.Remove(m)
	sshTmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTmpdir)
	sshOutput := []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"localhost",
		"sudo",
		"stop",
		"zookeeper",
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"localhost",
		"sudo",
		"start",
		"zookeeper",
	}
	h := zookeeperHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(sshTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(sshTmpdir), gocheck.DeepEquals, sshOutput)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:49,代码来源:healer_test.go


示例12: TestProvisionerRestart

func (s *S) TestProvisionerRestart(c *gocheck.C) {
	var p LocalProvisioner
	tmpdir, err := commandmocker.Add("ssh", "ok")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	app := testing.NewFakeApp("almah", "static", 1)
	err = p.Restart(app)
	c.Assert(err, gocheck.IsNil)
	ip := app.ProvisionUnits()[0].GetIp()
	expected := []string{
		"-l", "ubuntu", "-q", "-o", "StrictHostKeyChecking no", ip, "/var/lib/tsuru/hooks/restart",
	}
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, expected)
}
开发者ID:bardusco,项目名称:tsuru,代码行数:15,代码来源:provisioner_test.go


示例13: TestInstanceMachineHealWhenEverythingIsOk

func (s *S) TestInstanceMachineHealWhenEverythingIsOk(c *gocheck.C) {
	fexec := &etesting.FakeExecutor{}
	setExecut(fexec)
	defer setExecut(nil)
	jujuTmpdir, err := commandmocker.Add("juju", collectOutput)
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(jujuTmpdir)
	h := instanceMachineHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	args := []string{
		"status", // for juju status that gets the output
	}
	c.Assert(commandmocker.Ran(jujuTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(jujuTmpdir), gocheck.DeepEquals, args)
}
开发者ID:nemx,项目名称:tsuru,代码行数:16,代码来源:healer_test.go


示例14: TestDeploy

func (s *S) TestDeploy(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("juju", "")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	config.Set("git:unit-repo", "test/dir")
	defer func() {
		config.Unset("git:unit-repo")
	}()
	app := testing.NewFakeApp("cribcaged", "python", 1)
	w := &bytes.Buffer{}
	p := JujuProvisioner{}
	err = p.Deploy(app, "f83ac40", w)
	c.Assert(err, gocheck.IsNil)
	expected := []string{"set", app.GetName(), "app-version=f83ac40"}
	c.Assert(commandmocker.Parameters(tmpdir)[:3], gocheck.DeepEquals, expected)
}
开发者ID:nemx,项目名称:tsuru,代码行数:16,代码来源:provisioner_test.go


示例15: TestInstanceMachineHealWhenEverythingIsOk

func (s *S) TestInstanceMachineHealWhenEverythingIsOk(c *gocheck.C) {
	jujuTmpdir, err := commandmocker.Add("juju", collectOutput)
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(jujuTmpdir)
	sshTmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTmpdir)
	jujuOutput := []string{
		"status", // for juju status that gets the output
	}
	h := instanceMachineHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(jujuTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(jujuTmpdir), gocheck.DeepEquals, jujuOutput)
	c.Assert(commandmocker.Ran(sshTmpdir), gocheck.Equals, false)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:17,代码来源:healer_test.go


示例16: TestProvision

func (s *S) TestProvision(c *gocheck.C) {
	config.Set("juju:charms-path", "/etc/juju/charms")
	defer config.Unset("juju:charms-path")
	config.Set("host", "somehost")
	defer config.Unset("host")
	tmpdir, err := commandmocker.Add("juju", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	app := testing.NewFakeApp("trace", "python", 0)
	p := JujuProvisioner{}
	err = p.Provision(app)
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	expectedParams := []string{
		"deploy", "--repository", "/etc/juju/charms", "local:python", "trace",
		"set", "trace", "app-repo=" + repository.GetReadOnlyUrl("trace"),
	}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, expectedParams)
}
开发者ID:kaiquewdev,项目名称:tsuru,代码行数:19,代码来源:provisioner_test.go


示例17: TestProvisionStart

func (s *S) TestProvisionStart(c *gocheck.C) {
	tmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(tmpdir)
	p := LocalProvisioner{}
	err = p.start("10.10.10.10")
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(tmpdir), gocheck.Equals, true)
	cmds := []string{
		"-q",
		"-o",
		"StrictHostKeyChecking no",
		"-l",
		"ubuntu",
		"10.10.10.10",
		"sudo /var/lib/tsuru/hooks/start",
	}
	c.Assert(commandmocker.Parameters(tmpdir), gocheck.DeepEquals, cmds)
}
开发者ID:bardusco,项目名称:tsuru,代码行数:19,代码来源:provisioner_test.go


示例18: TestInstanceMachineHeal

func (s *S) TestInstanceMachineHeal(c *gocheck.C) {
	fexec := &etesting.FakeExecutor{}
	execut = fexec
	defer func() {
		execut = nil
	}()
	jujuTmpdir, err := commandmocker.Add("juju", collectOutputInstanceDown)
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(jujuTmpdir)
	h := instanceMachineHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	args := []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"10.10.10.163",
		"sudo",
		"stop",
		"juju-machine-agent",
	}
	c.Assert(fexec.ExecutedCmd("ssh", args), gocheck.Equals, true)
	args = []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"10.10.10.163",
		"sudo",
		"start",
		"juju-machine-agent",
	}
	c.Assert(fexec.ExecutedCmd("ssh", args), gocheck.Equals, true)
	args = []string{
		"status", // for juju status that gets the output
	}
	c.Assert(commandmocker.Ran(jujuTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(jujuTmpdir), gocheck.DeepEquals, args)
}
开发者ID:johnvilsack,项目名称:golang-stuff,代码行数:42,代码来源:healer_test.go


示例19: TestInstaceUnitHeal

func (s *S) TestInstaceUnitHeal(c *gocheck.C) {
	conn, err := db.Conn()
	c.Assert(err, gocheck.IsNil)
	a := app.App{
		Name:  "as_i_rise",
		Units: []app.Unit{{Name: "as_i_rise/0", State: "down", Ip: "server-1081.novalocal"}},
	}
	err = conn.Apps().Insert(&a)
	c.Assert(err, gocheck.IsNil)
	defer conn.Apps().Remove(bson.M{"name": "as_i_rise"})
	sshTmpdir, err := commandmocker.Add("ssh", "$*")
	c.Assert(err, gocheck.IsNil)
	defer commandmocker.Remove(sshTmpdir)
	sshOutput := []string{
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"server-1081.novalocal",
		"sudo",
		"stop",
		"juju-as_i_rise-0",
		"-o",
		"StrictHostKeyChecking no",
		"-q",
		"-l",
		"ubuntu",
		"server-1081.novalocal",
		"sudo",
		"start",
		"juju-as_i_rise-0",
	}
	h := instanceUnitHealer{}
	err = h.Heal()
	c.Assert(err, gocheck.IsNil)
	c.Assert(commandmocker.Ran(sshTmpdir), gocheck.Equals, true)
	c.Assert(commandmocker.Parameters(sshTmpdir), gocheck.DeepEquals, sshOutput)
}
开发者ID:nedmax,项目名称:tsuru,代码行数:39,代码来源:healer_test.go


示例20: TestAddUnits

func (s *S) TestAddUnits(c *C) {
	tmpdir, err := commandmocker.Add("juju", addUnitsOutput)
	c.Assert(err, IsNil)
	defer commandmocker.Remove(tmpdir)
	app := NewFakeApp("resist", "rush", 0)
	p := JujuProvisioner{}
	units, err := p.AddUnits(app, 4)
	c.Assert(err, IsNil)
	c.Assert(units, HasLen, 4)
	names := make([]string, len(units))
	for i, unit := range units {
		names[i] = unit.Name
	}
	expected := []string{"resist/3", "resist/4", "resist/5", "resist/6"}
	c.Assert(names, DeepEquals, expected)
	c.Assert(commandmocker.Ran(tmpdir), Equals, true)
	expectedParams := []string{
		"set", "resist", "app-repo=" + repository.GetReadOnlyUrl("resist"),
		"add-unit", "resist", "--num-units", "4",
	}
	c.Assert(commandmocker.Parameters(tmpdir), DeepEquals, expectedParams)
}
开发者ID:astaxie,项目名称:tsuru,代码行数:22,代码来源:provisioner_test.go



注:本文中的github.com/globocom/commandmocker.Parameters函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang commandmocker.Ran函数代码示例发布时间:2022-05-23
下一篇:
Golang commandmocker.Output函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap