Skip to content

Commit

Permalink
Update to openshift_client 2.0
Browse files Browse the repository at this point in the history
- Only notable change is package naming (finally)
  • Loading branch information
pehala committed Feb 1, 2024
1 parent 6b38bd8 commit 6df316c
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lxml = "*"
cryptography = "*"
backoff = "*"
httpx = { version = "*", extras = ["http2"] }
openshift-client = ">=1.0.14"
openshift-client = ">=2"
apyproxy = "*"
weakget = "*"
flaky = "*"
Expand Down Expand Up @@ -78,7 +78,7 @@ good-names=["i","j","k",
implicit_optional = true

[[tool.mypy.overrides]]
module = ["dynaconf.*", "keycloak.*", "weakget.*", "openshift.*", "apyproxy.*", "click.*", "py.*"]
module = ["dynaconf.*", "keycloak.*", "weakget.*", "openshift_client.*", "apyproxy.*", "click.*", "py.*"]
ignore_missing_imports = true

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion testsuite/gateway/envoy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
from typing import Optional

import openshift as oc
import openshift_client as oc

from testsuite.certificates import Certificate
from testsuite.gateway import Gateway
Expand Down
2 changes: 1 addition & 1 deletion testsuite/gateway/gateway_api/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json
from typing import Optional

import openshift as oc
import openshift_client as oc

from testsuite.certificates import Certificate
from testsuite.gateway import Gateway
Expand Down
2 changes: 1 addition & 1 deletion testsuite/openshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import dataclass, field
from typing import Optional, Literal

from openshift import APIObject, timeout
from openshift_client import APIObject, timeout

from testsuite.lifecycle import LifecycleObject

Expand Down
5 changes: 2 additions & 3 deletions testsuite/openshift/authorino.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import abc
from typing import Any, Dict, List

import openshift
from openshift import selector
from openshift_client import selector, timeout

from testsuite.openshift.client import OpenShiftClient
from testsuite.openshift import OpenShiftObject
Expand Down Expand Up @@ -74,7 +73,7 @@ def create_instance(

def wait_for_ready(self):
"""Waits until Authorino CR reports ready status"""
with openshift.timeout(90):
with timeout(90):
success, _, _ = self.self_selector().until_all(
success_func=lambda obj: len(obj.model.status.conditions) > 0
and all(x.status == "True" for x in obj.model.status.conditions)
Expand Down
4 changes: 2 additions & 2 deletions testsuite/openshift/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import Dict
from urllib.parse import urlparse

import openshift as oc
from openshift import Context, Selector, OpenShiftPythonException
import openshift_client as oc
from openshift_client import Context, Selector, OpenShiftPythonException

from .route import OpenshiftRoute
from .secret import Secret
Expand Down
2 changes: 1 addition & 1 deletion testsuite/openshift/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from typing import Any

import openshift as oc
import openshift_client as oc

from testsuite.openshift import OpenShiftObject, Selector, modify
from testsuite.utils import asdict
Expand Down
2 changes: 1 addition & 1 deletion testsuite/policy/authorization/auth_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import cached_property
from typing import Dict

import openshift as oc
import openshift_client as oc

from testsuite.utils import asdict
from testsuite.openshift import OpenShiftObject, modify
Expand Down
2 changes: 1 addition & 1 deletion testsuite/policy/dns_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from typing import Optional, Literal

import openshift as oc
import openshift_client as oc

from testsuite.utils import asdict
from testsuite.gateway import Referencable
Expand Down
2 changes: 1 addition & 1 deletion testsuite/policy/rate_limit_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from time import sleep
from typing import Iterable, Literal, Optional, List

import openshift as oc
import openshift_client as oc

from testsuite.policy.authorization import Rule
from testsuite.utils import asdict
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/kuadrant/authorino/metrics/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import yaml

import pytest
from openshift import selector
from openshift_client import selector

from testsuite.openshift.config_map import ConfigMap
from testsuite.openshift.metrics import ServiceMonitor, MetricsEndpoint, Prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Any, Dict
import pytest

import openshift as oc
from openshift import OpenShiftPythonException
import openshift_client as oc
from openshift_client import OpenShiftPythonException

from testsuite.policy.authorization import Pattern, ValueFrom
from testsuite.certificates import CertInfo
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/mgc/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Conftest for MGC tests"""

import pytest
from openshift import selector
from openshift_client import selector
from weakget import weakget

from testsuite.gateway import CustomReference, GatewayRoute, Exposer
Expand Down

0 comments on commit 6df316c

Please sign in to comment.