Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'pr/1122'
Browse files Browse the repository at this point in the history
LGTM from:
jpeeler
MHBauer
  • Loading branch information
MHBauer committed Aug 11, 2017
2 parents 8411f31 + ed75774 commit 0038b1e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ $(BINDIR)/e2e.test: .init
.PHONY: verify verify-client-gen
verify: .init .generate_files verify-client-gen
@echo Running gofmt:
@$(DOCKER_CMD) gofmt -l -s $(TOP_SRC_DIRS) > .out 2>&1 || true
@$(DOCKER_CMD) gofmt -l -s $(TOP_TEST_DIRS) $(TOP_SRC_DIRS) &> .out || true
@bash -c '[ "`cat .out`" == "" ] || \
(echo -e "\n*** Please 'gofmt' the following:" ; cat .out ; echo ; false)'
@rm .out
Expand Down
4 changes: 4 additions & 0 deletions contrib/pkg/broker/user_provided/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func (c *userProvidedController) CreateServiceInstance(
}
var cred brokerapi.Credential
err = json.Unmarshal(jsonCred, &cred)
if err != nil {
glog.Errorf("Failed to unmarshal credentials: %v", err)
return nil, err
}

c.instanceMap[id] = &userProvidedServiceInstance{
Name: id,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
// - tests for the methods on controller.go
// - test fixtures used in other controller_*_test.go files
//
// Other controller_*_test.go files contain tests related to the reconcilation
// Other controller_*_test.go files contain tests related to the reconciliation
// loops for the different catalog API resources.

const (
Expand Down
24 changes: 13 additions & 11 deletions test/e2e/walkthrough.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {

It("Run walkthrough-example ", func() {
var (
brokerName = upsbrokername
brokerName = upsbrokername
serviceclassName = "user-provided-service"
testns = "test-ns"
instanceName = "ups-instance"
bindingName = "ups-binding"
testns = "test-ns"
instanceName = "ups-instance"
bindingName = "ups-binding"
)

//Broker and ServiceClass should become ready
Expand All @@ -79,7 +79,7 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
}

By("Creating a Broker")
url := "http://" + upsbrokername + "." +f.Namespace.Name + ".svc.cluster.local"
url := "http://" + upsbrokername + "." + f.Namespace.Name + ".svc.cluster.local"
broker := &v1alpha1.Broker{
ObjectMeta: metav1.ObjectMeta{
Name: brokerName,
Expand All @@ -95,7 +95,7 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
err = util.WaitForBrokerCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
broker.Name,
v1alpha1.BrokerCondition{
Type: v1alpha1.BrokerConditionReady,
Type: v1alpha1.BrokerConditionReady,
Status: v1alpha1.ConditionTrue,
},
)
Expand All @@ -113,23 +113,24 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
By("Creating a Instance")
instance := &v1alpha1.Instance{
ObjectMeta: metav1.ObjectMeta{
Name: instanceName,
Name: instanceName,
Namespace: testnamespace.Name,
},
Spec: v1alpha1.InstanceSpec{
ServiceClassName: serviceclassName,
PlanName: "default",
PlanName: "default",
},
}
instance, err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().Instances(testnamespace.Name).Create(instance)
Expect(err).NotTo(HaveOccurred(), "failed to create instance")
Expect(instance).NotTo(BeNil())

By("Waiting for Instance to be ready")
err = util.WaitForInstanceCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
testnamespace.Name,
instanceName,
v1alpha1.InstanceCondition{
Type: v1alpha1.InstanceConditionReady,
Type: v1alpha1.InstanceConditionReady,
Status: v1alpha1.ConditionTrue,
},
)
Expand All @@ -139,7 +140,7 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
By("Creating a Binding")
binding := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Name: bindingName,
Name: bindingName,
Namespace: testnamespace.Name,
},
Spec: v1alpha1.BindingSpec{
Expand All @@ -151,13 +152,14 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
}
binding, err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().Bindings(testnamespace.Name).Create(binding)
Expect(err).NotTo(HaveOccurred(), "failed to create binding")
Expect(binding).NotTo(BeNil())

By("Waiting for Binding to be ready")
err = util.WaitForBindingCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
testnamespace.Name,
bindingName,
v1alpha1.BindingCondition{
Type: v1alpha1.BindingConditionReady,
Type: v1alpha1.BindingConditionReady,
Status: v1alpha1.ConditionTrue,
},
)
Expand Down

0 comments on commit 0038b1e

Please sign in to comment.