Skip to content

Commit 3e0c6c2

Browse files
committed
small fix
1 parent 2f79344 commit 3e0c6c2

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

Diff for: testcontainers/iris/__init__.py

+16-19
Original file line numberDiff line numberDiff line change
@@ -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(

Diff for: tests/test_iris.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ def check_connection(iris):
1717

1818

1919
def test_community():
20-
iris_container = IRISContainer("intersystemsdc/iris-community:2023.1.1.380.0-zpm", **creds)
20+
iris_container = IRISContainer("containers.intersystems.com/intersystems/iris-community:latest-em", **creds)
21+
with iris_container as iris:
22+
check_connection(iris)
23+
24+
25+
def test_dccommunity():
26+
iris_container = IRISContainer("intersystemsdc/iris-community:latest", **creds)
2127
with iris_container as iris:
2228
check_connection(iris)
2329

2430

2531
def test_enterprise():
2632
license_key = os.path.abspath(os.path.expanduser("~/iris.key"))
27-
iris_container = IRISContainer("containers.intersystems.com/intersystems/iris:2023.3", license_key=license_key,
33+
iris_container = IRISContainer("containers.intersystems.com/intersystems/iris:latest-cd", license_key=license_key,
2834
**creds)
2935
with iris_container as iris:
3036
check_connection(iris)

0 commit comments

Comments
 (0)