Skip to content

Commit 7ba5dc3

Browse files
committed
test: adjust unit tests to incorporate image_pull_secrets
1 parent fe91b17 commit 7ba5dc3

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
@@ -107,6 +107,8 @@ spec:
107107
cpu: 2
108108
memory: 8G
109109
nvidia.com/gpu: 0
110+
imagePullSecrets:
111+
- name: unit-test-pull-secret
110112
rayVersion: 2.1.0
111113
workerGroupSpecs:
112114
- groupName: small-group-unit-test-cluster
@@ -164,6 +166,8 @@ spec:
164166
cpu: 3
165167
memory: 5G
166168
nvidia.com/gpu: 7
169+
imagePullSecrets:
170+
- name: unit-test-pull-secret
167171
initContainers:
168172
- command:
169173
- sh

tests/unit_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def test_config_creation():
220220
gpu=7,
221221
instascale=True,
222222
machine_types=["cpu.small", "gpu.large"],
223+
image_pull_secrets=["unit-test-pull-secret"],
223224
)
224225

225226
assert config.name == "unit-test-cluster" and config.namespace == "ns"
@@ -234,6 +235,7 @@ def test_config_creation():
234235
assert config.template == f"{parent}/src/codeflare_sdk/templates/base-template.yaml"
235236
assert config.instascale
236237
assert config.machine_types == ["cpu.small", "gpu.large"]
238+
assert config.image_pull_secrets == ["unit-test-pull-secret"]
237239
return config
238240

239241

0 commit comments

Comments
 (0)