Skip to content

Commit de31b91

Browse files
Reflect poetry changes
1 parent 24c16a8 commit de31b91

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

tests/e2e/install-codeflare-sdk.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Install Poetry and configure virtualenvs
4+
pip install poetry
5+
poetry config virtualenvs.create false
6+
7+
# Clone the CodeFlare SDK repository
8+
git clone --branch main https://github.com/project-codeflare/codeflare-sdk.git
9+
cd codeflare-sdk
10+
11+
# Lock dependencies and install them
12+
poetry lock --no-update
13+
poetry install --with test,docs
14+
15+
# Return to the previous directory
16+
cd ..

tests/e2e/mnist_raycluster_sdk_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ func TestMNISTRayClusterSDK(t *testing.T) {
6969
// MNIST training script
7070
"mnist.py": ReadFile(test, "mnist.py"),
7171
// SDK Wheel File
72-
"codeflare_sdk-0.0.0.dev0-py3-none-any.whl": ReadWhlFile(test, "codeflare_sdk-0.0.0.dev0-py3-none-any.whl"),
72+
// codeflare-sdk installation script
73+
"install-codeflare-sdk.sh": ReadFile(test, "install-codeflare-sdk.sh"),
74+
75+
// "codeflare_sdk-0.0.0.dev0-py3-none-any.whl": ReadWhlFile(test, "codeflare_sdk-0.0.0.dev0-py3-none-any.whl"),
7376
},
7477
Immutable: Ptr(true),
7578
}
@@ -167,7 +170,8 @@ func TestMNISTRayClusterSDK(t *testing.T) {
167170
// FIXME: switch to base Python image once the dependency on OpenShift CLI is removed
168171
// See https://github.com/project-codeflare/codeflare-sdk/pull/146
169172
Image: "quay.io/opendatahub/notebooks:jupyter-minimal-ubi8-python-3.8-4c8f26e",
170-
Command: []string{"/bin/sh", "-c", "pip install /test/codeflare_sdk-0.0.0.dev0-py3-none-any.whl && cp /test/* . && python mnist_raycluster_sdk.py" + " " + namespace.Name},
173+
Command: []string{"/bin/sh", "-c", "cp /test/* . && chmod +x install-codeflare-sdk.sh && ./install-codeflare-sdk.sh && python mnist_raycluster_sdk.py" + " " + namespace.Name},
174+
// Command: []string{"/bin/sh", "-c", "pip install /test/codeflare_sdk-0.0.0.dev0-py3-none-any.whl && cp /test/* . && python mnist_raycluster_sdk.py" + " " + namespace.Name},
171175
VolumeMounts: []corev1.VolumeMount{
172176
{
173177
Name: "test",

tests/e2e/support.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/project-codeflare/codeflare-operator/test/support"
2727
)
2828

29-
//go:embed *.py *.txt
29+
//go:embed *.py *.txt *.sh
3030
var files embed.FS
3131

3232
func ReadFile(t support.Test, fileName string) []byte {

0 commit comments

Comments
 (0)