本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/configuration.ReadWriter.SetSSLDisabled方法的典型用法代码示例。如果您正苦于以下问题:Golang ReadWriter.SetSSLDisabled方法的具体用法?Golang ReadWriter.SetSSLDisabled怎么用?Golang ReadWriter.SetSSLDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/configuration.ReadWriter
的用法示例。
在下文中一共展示了ReadWriter.SetSSLDisabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
[]string{"TIP", "--skip-ssl-validation"},
))
})
})
Context("when the user does not provide an endpoint", func() {
Context("when the endpoint is set in the config", func() {
var (
ui *testterm.FakeUI
requirementsFactory *testreq.FakeReqFactory
)
BeforeEach(func() {
config.SetApiEndpoint("https://api.run.pivotal.io")
config.SetApiVersion("2.0")
config.SetSSLDisabled(true)
ui = new(testterm.FakeUI)
requirementsFactory = &testreq.FakeReqFactory{}
})
JustBeforeEach(func() {
testcmd.RunCommand(NewApi(ui, config, endpointRepo), []string{}, requirementsFactory)
})
It("prints out the api endpoint", func() {
Expect(ui.Outputs).To(ContainSubstrings([]string{"https://api.run.pivotal.io", "2.0"}))
})
It("should not change the SSL setting in the config", func() {
Expect(config.IsSSLDisabled()).To(BeTrue())