本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/configuration/pluginconfig/pluginconfigfakes.FakePluginConfiguration.SetPluginArgsForCall方法的典型用法代码示例。如果您正苦于以下问题:Golang FakePluginConfiguration.SetPluginArgsForCall方法的具体用法?Golang FakePluginConfiguration.SetPluginArgsForCall怎么用?Golang FakePluginConfiguration.SetPluginArgsForCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/configuration/pluginconfig/pluginconfigfakes.FakePluginConfiguration
的用法示例。
在下文中一共展示了FakePluginConfiguration.SetPluginArgsForCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
})
if runtime.GOOS != "windows" {
It("Chmods the plugin so it is executable", func() {
runCommand(test_1, "-f")
fileInfo, err := os.Stat(filepath.Join(pluginDir, "test_1.exe"))
Expect(err).ToNot(HaveOccurred())
Expect(int(fileInfo.Mode())).To(Equal(0700))
})
}
It("populate the configuration with plugin metadata", func() {
runCommand(test_1, "-f")
pluginName, pluginMetadata := pluginConfig.SetPluginArgsForCall(0)
Expect(pluginName).To(Equal("Test1"))
Expect(pluginMetadata.Location).To(Equal(filepath.Join(pluginDir, "test_1.exe")))
Expect(pluginMetadata.Version.Major).To(Equal(1))
Expect(pluginMetadata.Version.Minor).To(Equal(2))
Expect(pluginMetadata.Version.Build).To(Equal(4))
Expect(pluginMetadata.Commands[0].Name).To(Equal("test_1_cmd1"))
Expect(pluginMetadata.Commands[0].HelpText).To(Equal("help text for test_1_cmd1"))
Expect(pluginMetadata.Commands[1].Name).To(Equal("test_1_cmd2"))
Expect(pluginMetadata.Commands[1].HelpText).To(Equal("help text for test_1_cmd2"))
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Installing plugin", test_1},
[]string{"OK"},
[]string{"Plugin", "Test1", "v1.2.4", "successfully installed"},
))