@@ -54,36 +54,33 @@ def __init__(
5454 self .with_exposed_ports (self .port )
5555
5656 def _configure (self ) -> None :
57- self .with_env ("IRIS_USERNAME" , self .username )
58- self .with_env ("IRIS_PASSWORD" , self .password )
59- self .with_env ("IRIS_NAMESPACE" , self .namespace )
57+ # self.with_env("IRIS_USERNAME", self.username)
58+ # self.with_env("IRIS_PASSWORD", self.password)
59+ # self.with_env("IRIS_NAMESPACE", self.namespace)
6060 if self .license_key :
6161 self .with_volume_mapping (
6262 self .license_key , "/usr/irissys/mgr/iris.key" , "ro"
6363 )
6464
6565 def _connect (self ) -> None :
6666 wait_for_logs (self , predicate = "Enabling logons" )
67- if self .image .startswith ("intersystemsdc" ):
68- wait_for_logs (self , predicate = "executed command" )
69- else :
70- if self .namespace .upper () != "USER" :
71- cmd = (
72- f"iris session iris -U %%SYS '##class(%%SQL.Statement).%%ExecDirect(,\" CREATE DATABASE %s\" )'"
73- % (self .namespace ,)
74- )
75- self .exec (cmd )
67+ if self .namespace .upper () != "USER" :
7668 cmd = (
77- f'iris session iris -U %%SYS \' ##class(Security.Users).Create("%s","%s","%s",,"%s")\' '
78- % (
79- self .username ,
80- "%ALL" ,
81- self .password ,
82- self .namespace ,
83- )
69+ f"iris session iris -U %%SYS '##class(%%SQL.Statement).%%ExecDirect(,\" CREATE DATABASE %s\" )'"
70+ % (self .namespace ,)
8471 )
8572 res = self .exec (cmd )
8673 print ("res" , cmd , res )
74+ cmd = (
75+ f'iris session iris -U %%SYS \' ##class(Security.Users).Create("%s","%s","%s")\' '
76+ % (
77+ self .username ,
78+ "%ALL" ,
79+ self .password ,
80+ )
81+ )
82+ res = self .exec (cmd )
83+ print ("res" , cmd , res )
8784
8885 def get_connection_url (self , host = None ) -> str :
8986 return super ()._create_connection_url (
0 commit comments