Skip to content

Commit

Permalink
change to return
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfiea committed Nov 11, 2024
1 parent dee68dd commit 34f5f79
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,6 @@ data:
def v1_pods(dyn_client):
yield dyn_client.resources.get(api_version='v1', kind='Pod')
def get_usage_pod(v1_pods):
usage_pod = v1_pods.get(label_selector="app.kubernetes.io/name=usage-hourly-job", namespace=mvi_namespace)
if not usage_pod.items:
assert False, f"Could not find any usage-hourly-job in {mvi_namespace}"
yield usage_pod
@pytest.fixture(scope="session")
def v1_secrets(dyn_client):
yield dyn_client.resources.get(api_version='v1', kind='Secret')
Expand Down Expand Up @@ -298,6 +292,12 @@ data:
assert False, "Expected data.dnn-apikey field not present in secret {mvi_apikey_secret_name} in {mvi_namespace}"
yield base64.b64decode(dnn_apikey_b64)
def get_usage_pod(v1_pods):
usage_pod = v1_pods.get(label_selector="app.kubernetes.io/name=usage-hourly-job", namespace=mvi_namespace)
if not usage_pod.items:
assert False, f"Could not find any usage-hourly-job in {mvi_namespace}"
return usage_pod
def test_usage_reporter(mvi_workspace_cr, v1_pods):
print("Test usage reporter")
mvi_create_time = datetime.strptime(mvi_workspace_cr['metadata']['creationTimestamp'], '%Y-%m-%dT%H:%M:%SZ')
Expand Down

0 comments on commit 34f5f79

Please sign in to comment.