Skip to content

Commit f637c62

Browse files
committed
test: adjust unit tests to incorporate pull_secret
1 parent fce56d9 commit f637c62

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/test-case.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ spec:
9999
cpu: 2
100100
memory: 8G
101101
nvidia.com/gpu: 0
102+
imagePullSecrets:
103+
- name: unit-test-pull-secret
102104
rayVersion: 2.1.0
103105
workerGroupSpecs:
104106
- groupName: small-group-unit-test-cluster
@@ -148,6 +150,8 @@ spec:
148150
cpu: 3
149151
memory: 5G
150152
nvidia.com/gpu: 7
153+
imagePullSecrets:
154+
- name: unit-test-pull-secret
151155
initContainers:
152156
- command:
153157
- 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/base-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)