Skip to content

Commit 92ad939

Browse files
committed
test: adjust unit tests to incorporate pull_secret
1 parent af7df51 commit 92ad939

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/test-case.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ spec:
9999
cpu: 2
100100
memory: 8G
101101
nvidia.com/gpu: 0
102+
imagePullSecrets:
103+
- &id001
104+
name: unit-test-pull-secret
102105
rayVersion: 1.12.0
103106
workerGroupSpecs:
104107
- groupName: small-group-unit-test-cluster
@@ -148,6 +151,8 @@ spec:
148151
cpu: 3
149152
memory: 5G
150153
nvidia.com/gpu: 7
154+
imagePullSecrets:
155+
- *id001
151156
initContainers:
152157
- command:
153158
- sh

tests/unit_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def test_config_creation():
213213
gpu=7,
214214
instascale=True,
215215
machine_types=["cpu.small", "gpu.large"],
216+
pull_secret={"name": "unit-test-pull-secret"},
216217
)
217218

218219
assert config.name == "unit-test-cluster" and config.namespace == "ns"
@@ -227,6 +228,7 @@ def test_config_creation():
227228
assert config.template == f"{parent}/src/codeflare_sdk/templates/new-template.yaml"
228229
assert config.instascale
229230
assert config.machine_types == ["cpu.small", "gpu.large"]
231+
assert config.pull_secret == {"name": "unit-test-pull-secret"}
230232
return config
231233

232234

0 commit comments

Comments
 (0)