diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index d95fd4c3bb93..453c3a65e023 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -226,6 +226,8 @@ osc process -f examples/sample-app/application-template-dockerbuild.json | osc c osc get buildConfigs osc get bc osc get builds +[[ $(osc describe buildConfigs ruby-sample-build | grep --text "Webhook Github") =~ "${API_SCHEME}://${API_HOST}:${API_PORT}/osapi/v1beta1/buildConfigHooks/ruby-sample-build/secret101/github" ]] +[[ $(osc describe buildConfigs ruby-sample-build | grep --text "Webhook Generic") =~ "${API_SCHEME}://${API_HOST}:${API_PORT}/osapi/v1beta1/buildConfigHooks/ruby-sample-build/secret101/generic" ]] echo "buildConfig: ok" osc create -f test/integration/fixtures/test-buildcli.json diff --git a/pkg/cmd/cli/describe/describer.go b/pkg/cmd/cli/describe/describer.go index 0d50efb2b375..73e269dbe9fd 100644 --- a/pkg/cmd/cli/describe/describer.go +++ b/pkg/cmd/cli/describe/describer.go @@ -137,8 +137,6 @@ func (d *BuildDescriber) Describe(namespace, name string) (string, error) { // BuildConfigDescriber generates information about a buildConfig type BuildConfigDescriber struct { client.Interface - // TODO: this is broken, webhook URL generation should be done by client interface using - // the string value host string } diff --git a/pkg/cmd/util/clientcmd/factory.go b/pkg/cmd/util/clientcmd/factory.go index 1e1ff4a3874a..6caafcbdce69 100644 --- a/pkg/cmd/util/clientcmd/factory.go +++ b/pkg/cmd/util/clientcmd/factory.go @@ -99,7 +99,7 @@ func NewFactory(clientConfig clientcmd.ClientConfig) *Factory { if err != nil { return nil, fmt.Errorf("unable to describe %s: %v", mapping.Kind, err) } - describer, ok := describe.DescriberFor(mapping.Kind, cli, kubeClient, "") + describer, ok := describe.DescriberFor(mapping.Kind, cli, kubeClient, cfg.Host) if !ok { return nil, fmt.Errorf("no description has been implemented for %q", mapping.Kind) }