WIP - Convert e2e test to Python test #442
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue link
#441
What changes have been made
Main changes:
kind.sh
Currently the main changes are made to the
kind.sh
script for setting up our KinD environment and creating a user with limited permissions. Reference: https://medium.com/@lionelvillard/creating-users-in-kind-cluster-6c5ee35db3feThe script creates a KinD cluster, then it gets the Kubernetes root certificate and private key to generate the user certificate, user key, and CSR. Once generated, it replaces the values for the server, certificate, and key in the kube config file for the new user to get access to the KinD cluster.
RBAC rules are then created for the new user, and a cleanup is performed on the copied and generated csr/crt/keys files.
Lastly, as part of this setup script, the codeflare-sdk is installed.
mnist_raycluster_sdk_test.go
In this PR the test has been refactored to simplify the process and to run the test as a real-user would do. Based on previous discussions, the job spec no longer needs to be specified, and perhaps there won’t be a need to create the configmap either. In fact, we will want to convert the test to a Python test and leverage the SDK directly.
Moved the
src codeflare_sdk
files to the root directory as required by poetry to install the SDK.Immediate TODOs:
Verification steps
Checks