Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Updating the statements in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Reddy Amanaganti <[email protected]>
  • Loading branch information
ramreddya authored and pmyjavec committed Oct 11, 2021
1 parent 46c48a2 commit f48069b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions features/deployment.feature
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Feature: Manage deployments

Scenario: Try retrieve a deployment that does not exist
Given A deployment called fog does not exist
When The user attempts to retrieve the deployment fog
Then None is returned for the deployment
Given a deployment called fog does not exist
When the user attempts to retrieve the deployment fog
Then None is returned instead of the deployment


Scenario: Create a deployment and wait for it to become ready
Given A deployment called whilrwind does not exist
When The deployment called whilrwind is created
Given a deployment called whilrwind does not exist
When the deployment called whilrwind is created
Then a valid deployment called whilrwind can be found

Scenario: Retrieve a deployment that exists
Given The deployment called fire exists
When The user attempts to retrieve the deployment fire
Given the deployment called fire exists
When the user attempts to retrieve the deployment fire
Then Results for the deployment fire are returned
2 changes: 1 addition & 1 deletion features/namespace.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Interact with the Namespace API
Scenario: Try retrieve a namespace that does not exist
Given a namespace called rain does not exist
When the user attempts to retrieve the namespace rain
Then None is returned for the namespace
Then None is returned instead of the namespace

Scenario: Create a namespace and check it exists
Given a namespace called washington does not exist
Expand Down
10 changes: 5 additions & 5 deletions features/steps/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
from jinja2 import Environment, FileSystemLoader


@given(u"A deployment called {deployment_name} does not exist")
@given(u"a deployment called {deployment_name} does not exist")
def step_impl(context, deployment_name):
deployment.delete(context.k8s_v1_apps_client, deployment_name)


@when(u"The user attempts to retrieve the deployment {deployment_name}")
@when(u"the user attempts to retrieve the deployment {deployment_name}")
def step_impl(context, deployment_name):
context.get_resp = deployment.get(context.k8s_v1_apps_client, deployment_name)


@then(u"None is returned for the deployment")
@then(u"None is returned instead of the deployment")
def step_impl(context):
assert context.get_resp is None, "Did not return None"


@when(u"The deployment called {deployment_name} is created")
@when(u"the deployment called {deployment_name} is created")
def step_impl(context, deployment_name):
env = Environment(
loader=FileSystemLoader("./templates"), trim_blocks=True, lstrip_blocks=True
Expand All @@ -40,7 +40,7 @@ def step_impl(context):
)


@given(u"The deployment called {deployment_name} exists")
@given(u"the deployment called {deployment_name} exists")
def step_impl(context, deployment_name):
env = Environment(
loader=FileSystemLoader("./templates"), trim_blocks=True, lstrip_blocks=True
Expand Down
2 changes: 1 addition & 1 deletion features/steps/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def step_impl(context):
context.get_rain_resp = namespace.get(context.k8s_v1_core_client, "rain")


@then(u"None is returned for the namespace")
@then(u"None is returned instead of the namespace")
def step_impl(context):
assert context.get_rain_resp is None, "Did not return None"

Expand Down

0 comments on commit f48069b

Please sign in to comment.