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

Commit

Permalink
Fix typos and resource names in walkthrough e2e logs (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmorie authored and kibbles-n-bytes committed Sep 20, 2017
1 parent d25bd11 commit 092d7f8
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions test/e2e/walkthrough.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
upsbrokername := "ups-broker"

BeforeEach(func() {
//Deploying user provider service broker
By("Creating a user broker pod")
// Deploy the ups-broker
By("Creating a ups-broker pod")
pod, err := f.KubeClientSet.CoreV1().Pods(f.Namespace.Name).Create(NewUPSBrokerPod(upsbrokername))
Expect(err).NotTo(HaveOccurred(), "failed to create upsbroker pod")

By("Waiting for pod to be running")
By("Waiting for ups-broker pod to be running")
err = framework.WaitForPodRunningInNamespace(f.KubeClientSet, pod)
Expect(err).NotTo(HaveOccurred())

By("Createing a user provider broker service")
By("Creating a ups-broker service")
_, err = f.KubeClientSet.CoreV1().Services(f.Namespace.Name).Create(NewUPSBrokerService(upsbrokername))
Expect(err).NotTo(HaveOccurred(), "failed to create upsbroker service")
})

AfterEach(func() {
//Deleting user provider service broker
By("Deleting the user provider broker pod")
// Delete ups-broker pod and service
By("Deleting the ups-broker pod")
err := f.KubeClientSet.CoreV1().Pods(f.Namespace.Name).Delete(upsbrokername, nil)
Expect(err).NotTo(HaveOccurred())

By("Deleting the upsbroker service")
By("Deleting the ups-broker service")
err = f.KubeClientSet.CoreV1().Services(f.Namespace.Name).Delete(upsbrokername, nil)
Expect(err).NotTo(HaveOccurred())
})
Expand All @@ -67,18 +67,18 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
bindingName = "ups-instance-credential"
)

//Broker and ServiceClass should become ready
By("Make sure the named Broker not exist before create")
// Broker and ServiceClass should become ready
By("Make sure the named ServiceBroker does not exist before create")
if _, err := f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceBrokers().Get(brokerName, metav1.GetOptions{}); err == nil {
err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceBrokers().Delete(brokerName, nil)
Expect(err).NotTo(HaveOccurred(), "failed to delete the broker")

By("Waiting for Broker to not exist")
By("Waiting for ServiceBroker to not exist")
err = util.WaitForBrokerToNotExist(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(), brokerName)
Expect(err).NotTo(HaveOccurred())
}

By("Creating a Broker")
By("Creating a ServiceBroker")
url := "http://" + upsbrokername + "." + f.Namespace.Name + ".svc.cluster.local"
broker := &v1alpha1.ServiceBroker{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -89,28 +89,28 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
},
}
broker, err := f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceBrokers().Create(broker)
Expect(err).NotTo(HaveOccurred(), "failed to create Broker")
Expect(err).NotTo(HaveOccurred(), "failed to create ServiceBroker")

By("Waiting for Broker to be ready")
By("Waiting for ServiceBroker to be ready")
err = util.WaitForBrokerCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
broker.Name,
v1alpha1.ServiceBrokerCondition{
Type: v1alpha1.ServiceBrokerConditionReady,
Status: v1alpha1.ConditionTrue,
},
)
Expect(err).NotTo(HaveOccurred(), "failed to wait Broker to be ready")
Expect(err).NotTo(HaveOccurred(), "failed to wait ServiceBroker to be ready")

By("Waiting for ServiceClass to be ready")
err = util.WaitForServiceClassToExist(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(), serviceclassName)
Expect(err).NotTo(HaveOccurred(), "failed to wait serviceclass to be ready")

//Provisioning a Instance and binding to it
// Provisioning a ServiceInstance and binding to it
By("Creating a namespace")
testnamespace, err := framework.CreateKubeNamespace(testns, f.KubeClientSet)
Expect(err).NotTo(HaveOccurred(), "failed to create kube namespace")

By("Creating a Instance")
By("Creating a ServiceInstance")
instance := &v1alpha1.ServiceInstance{
ObjectMeta: metav1.ObjectMeta{
Name: instanceName,
Expand All @@ -125,7 +125,7 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
Expect(err).NotTo(HaveOccurred(), "failed to create instance")
Expect(instance).NotTo(BeNil())

By("Waiting for Instance to be ready")
By("Waiting for ServiceInstance to be ready")
err = util.WaitForInstanceCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
testnamespace.Name,
instanceName,
Expand All @@ -136,8 +136,8 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
)
Expect(err).NotTo(HaveOccurred(), "failed to wait instance to be ready")

//Binding to the Instance
By("Creating a Binding")
// Binding to the ServiceInstance
By("Creating a ServiceInstanceCredential")
binding := &v1alpha1.ServiceInstanceCredential{
ObjectMeta: metav1.ObjectMeta{
Name: bindingName,
Expand All @@ -154,7 +154,7 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
Expect(err).NotTo(HaveOccurred(), "failed to create binding")
Expect(binding).NotTo(BeNil())

By("Waiting for Binding to be ready")
By("Waiting for ServiceInstanceCredential to be ready")
err = util.WaitForBindingCondition(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(),
testnamespace.Name,
bindingName,
Expand All @@ -169,38 +169,38 @@ var _ = framework.ServiceCatalogDescribe("walkthrough", func() {
_, err = f.KubeClientSet.CoreV1().Secrets(testnamespace.Name).Get("my-secret", metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred(), "failed to create secret after binding")

//Unbinding from the Instance
By("Deleting the Binding")
// Unbinding from the ServiceInstance
By("Deleting the ServiceInstanceCredential")
err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceInstanceCredentials(testnamespace.Name).Delete(bindingName, nil)
Expect(err).NotTo(HaveOccurred(), "failed to delete the binding")

By("Waiting for Binding to not exist")
By("Waiting for ServiceInstanceCredential to not exist")
err = util.WaitForBindingToNotExist(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(), testnamespace.Name, bindingName)
Expect(err).NotTo(HaveOccurred())

By("Secret should been deleted after delete the binding")
_, err = f.KubeClientSet.CoreV1().Secrets(testnamespace.Name).Get("my-secret", metav1.GetOptions{})
Expect(err).To(HaveOccurred())

//Deprovisioning the Instance
By("Deleting the Instance")
// Deprovisioning the ServiceInstance
By("Deleting the ServiceInstance")
err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceInstances(testnamespace.Name).Delete(instanceName, nil)
Expect(err).NotTo(HaveOccurred(), "failed to delete the instance")

By("Waiting for Instance to not exist")
By("Waiting for ServiceInstance to not exist")
err = util.WaitForInstanceToNotExist(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(), testnamespace.Name, instanceName)
Expect(err).NotTo(HaveOccurred())

By("Deleting the test namespace")
err = framework.DeleteKubeNamespace(f.KubeClientSet, testnamespace.Name)
Expect(err).NotTo(HaveOccurred())

//Deleting Broker and ServiceClass
By("Deleting the Broker")
// Deleting ServiceBroker and ServiceClass
By("Deleting the ServiceBroker")
err = f.ServiceCatalogClientSet.ServicecatalogV1alpha1().ServiceBrokers().Delete(brokerName, nil)
Expect(err).NotTo(HaveOccurred(), "failed to delete the broker")

By("Waiting for Broker to not exist")
By("Waiting for ServiceBroker to not exist")
err = util.WaitForBrokerToNotExist(f.ServiceCatalogClientSet.ServicecatalogV1alpha1(), brokerName)
Expect(err).NotTo(HaveOccurred())

Expand Down

0 comments on commit 092d7f8

Please sign in to comment.