Skip to content

Commit 1351512

Browse files
committed
Update SDK e2e test to reflect poetry changes
1 parent 544d1e7 commit 1351512

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

Diff for: test/e2e/install-codeflare-sdk.sh

+16
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 ..

Diff for: test/e2e/mnist_raycluster_sdk_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ func TestMNISTRayClusterSDK(t *testing.T) {
4040
test := With(t)
4141
test.T().Parallel()
4242

43-
// Currently blocked by https://github.com/project-codeflare/codeflare-sdk/pull/251 , remove the skip once SDK with the PR is released
44-
test.T().Skip("Requires https://github.com/project-codeflare/codeflare-sdk/pull/251")
45-
4643
// Create a namespace
4744
namespace := test.NewTestNamespace()
4845

@@ -63,6 +60,8 @@ func TestMNISTRayClusterSDK(t *testing.T) {
6360
"requirements.txt": ReadFile(test, "mnist_pip_requirements.txt"),
6461
// MNIST training script
6562
"mnist.py": ReadFile(test, "mnist.py"),
63+
// codeflare-sdk installation script
64+
"install-codeflare-sdk.sh": ReadFile(test, "install-codeflare-sdk.sh"),
6665
},
6766
Immutable: Ptr(true),
6867
}
@@ -163,7 +162,7 @@ func TestMNISTRayClusterSDK(t *testing.T) {
163162
Env: []corev1.EnvVar{
164163
corev1.EnvVar{Name: "PYTHONUSERBASE", Value: "/workdir"},
165164
},
166-
Command: []string{"/bin/sh", "-c", "pip install codeflare-sdk==" + GetCodeFlareSDKVersion() + " && cp /test/* . && python mnist_raycluster_sdk.py" + " " + namespace.Name},
165+
Command: []string{"/bin/sh", "-c", "cp /test/* . && chmod +x install-codeflare-sdk.sh && ./install-codeflare-sdk.sh && python mnist_raycluster_sdk.py" + " " + namespace.Name},
167166
VolumeMounts: []corev1.VolumeMount{
168167
{
169168
Name: "test",

Diff for: test/e2e/support.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/project-codeflare/codeflare-common/support"
2424
)
2525

26-
//go:embed *.py *.txt
26+
//go:embed *.py *.txt *.sh
2727
var files embed.FS
2828

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

0 commit comments

Comments
 (0)