Skip to content

Commit c39c881

Browse files
committed
Update SDK e2e test to reflect poetry changes
Add Ingress domain for sdk e2e test Revert "Add Ingress domain for sdk e2e test" This reverts commit ffc2004.
1 parent 9c0cecc commit c39c881

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
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-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ func TestMNISTRayClusterSDK(t *testing.T) {
5151
"requirements.txt": ReadFile(test, "mnist_pip_requirements.txt"),
5252
// MNIST training script
5353
"mnist.py": ReadFile(test, "mnist.py"),
54+
// codeflare-sdk installation script
55+
"install-codeflare-sdk.sh": ReadFile(test, "install-codeflare-sdk.sh"),
5456
})
5557

5658
// Create RBAC, retrieve token for user with limited rights
@@ -119,7 +121,7 @@ func TestMNISTRayClusterSDK(t *testing.T) {
119121
{Name: "PYTHONUSERBASE", Value: "/workdir"},
120122
{Name: "RAY_IMAGE", Value: GetRayImage()},
121123
},
122-
Command: []string{"/bin/sh", "-c", "pip install codeflare-sdk==" + GetCodeFlareSDKVersion() + " && cp /test/* . && python mnist_raycluster_sdk.py" + " " + namespace.Name},
124+
Command: []string{"/bin/sh", "-c", "cp /test/* . && chmod +x install-codeflare-sdk.sh && ./install-codeflare-sdk.sh && python mnist_raycluster_sdk.py" + " " + namespace.Name},
123125
VolumeMounts: []corev1.VolumeMount{
124126
{
125127
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)