@@ -14,10 +14,14 @@ class OsparcUserBase(FastHttpUser):
1414 different behaviors or tasks.
1515 """
1616
17+ abstract = True # This class is abstract and won't be instantiated by Locust
18+
1719 def __init__ (self , * args , ** kwargs ):
1820 super ().__init__ (* args , ** kwargs )
1921 self .deploy_auth = DeploymentAuth ()
20- _logger .debug ("Using deployment auth: %s" , self .deploy_auth )
22+ _logger .debug (
23+ "Using deployment auth with username: %s" , self .deploy_auth .SC_USER_NAME
24+ )
2125
2226
2327class OsparcWebUserBase (OsparcUserBase ):
@@ -27,11 +31,16 @@ class OsparcWebUserBase(OsparcUserBase):
2731 different behaviors or tasks.
2832 """
2933
34+ abstract = True # This class is abstract and won't be instantiated by Locust
35+
3036 def __init__ (self , * args , ** kwargs ):
3137 super ().__init__ (* args , ** kwargs )
3238 if self .environment .parsed_options .requires_login :
3339 self .osparc_auth = OsparcAuth ()
34- _logger .debug ("Using OsparcAuth for login: %s" , self .osparc_auth )
40+ _logger .debug (
41+ "Using OsparcAuth for login with username: %s" ,
42+ self .osparc_auth .OSPARC_USER_NAME ,
43+ )
3544
3645 def on_start (self ) -> None :
3746 """
@@ -52,11 +61,8 @@ def on_stop(self) -> None:
5261 def _login (self ) -> None :
5362 # Implement login logic here
5463 logging .info (
55- "Loggin in user with email: %s" ,
56- {
57- "email" : self .osparc_auth .OSPARC_USER_NAME ,
58- "password" : self .osparc_auth .OSPARC_PASSWORD .get_secret_value (),
59- },
64+ "Logging in user with email: %s" ,
65+ self .osparc_auth .OSPARC_USER_NAME ,
6066 )
6167 response = self .client .post (
6268 "/v0/auth/login" ,
@@ -67,9 +73,11 @@ def _login(self) -> None:
6773 auth = self .deploy_auth .to_auth (),
6874 )
6975 response .raise_for_status ()
70- logging .info ("Logged in user with email: %s" , self .osparc_auth )
76+ logging .info ("Logged in user with email: %s" , self .osparc_auth . OSPARC_USER_NAME )
7177
7278 def _logout (self ) -> None :
7379 # Implement logout logic here
7480 self .client .post ("/v0/auth/logout" , auth = self .deploy_auth .to_auth ())
75- logging .info ("Logged out user with email: %s" , self .osparc_auth )
81+ logging .info (
82+ "Logged out user with email: %s" , self .osparc_auth .OSPARC_USER_NAME
83+ )
0 commit comments