Skip to content

Commit 0f6d39b

Browse files
committed
Update SDK e2e test to reflect poetry changes
1 parent de7fc9d commit 0f6d39b

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
@@ -41,9 +41,6 @@ func TestMNISTRayClusterSDK(t *testing.T) {
4141
test := With(t)
4242
test.T().Parallel()
4343

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

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

Diff for: test/e2e/support.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/project-codeflare/codeflare-operator/test/support"
2525
)
2626

27-
//go:embed *.py *.txt
27+
//go:embed *.py *.txt *.sh
2828
var files embed.FS
2929

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

0 commit comments

Comments
 (0)