File tree 2 files changed +4
-4
lines changed
src/codeflare_sdk/cluster
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def login(self) -> str:
65
65
Depending on the cluster, a user can choose to login in with "--insecure-skip-tls-verify` by setting `skip_tls`
66
66
to `True`.
67
67
"""
68
- args = [f"--token={ self .token } " , f"--server={ self .server } :6443 " ]
68
+ args = [f"--token={ self .token } " , f"--server={ self .server } " ]
69
69
if self .skip_tls :
70
70
args .append ("--insecure-skip-tls-verify" )
71
71
try :
@@ -84,7 +84,7 @@ def logout(self) -> str:
84
84
"""
85
85
This function is used to logout of an OpenShift cluster.
86
86
"""
87
- args = [f"--token={ self .token } " , f"--server={ self .server } :6443 " ]
87
+ args = [f"--token={ self .token } " , f"--server={ self .server } " ]
88
88
response = oc .invoke ("logout" , args )
89
89
return response .out ()
90
90
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def test_token_auth_login_logout(mocker):
116
116
mock_res = mocker .patch .object (openshift .Result , "out" )
117
117
mock_res .side_effect = lambda : att_side_effect (fake_res )
118
118
119
- token_auth = TokenAuthentication (token = "testtoken" , server = "testserver" )
119
+ token_auth = TokenAuthentication (token = "testtoken" , server = "testserver:6443 " )
120
120
assert token_auth .login () == (
121
121
"login" ,
122
122
["--token=testtoken" , "--server=testserver:6443" ],
@@ -137,7 +137,7 @@ def test_token_auth_login_tls(mocker):
137
137
# assert token_auth.login() == "Error: certificate auth failure, please set `skip_tls=True` in TokenAuthentication"
138
138
139
139
token_auth = TokenAuthentication (
140
- token = "testtoken" , server = "testserver" , skip_tls = True
140
+ token = "testtoken" , server = "testserver:6443 " , skip_tls = True
141
141
)
142
142
assert token_auth .login () == (
143
143
"login" ,
You can’t perform that action at this time.
0 commit comments