Skip to content

Commit

Permalink
Set envars getters as test helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti authored and openshift-merge-bot[bot] committed Nov 15, 2024
1 parent fc5d081 commit 2c41cf6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/kfto/core/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
)

func GetFmsHfTuningImage(t Test) string {
t.T().Helper()
image, ok := os.LookupEnv(fmsHfTuningImageEnvVar)
if !ok {
t.T().Fatalf("Expected environment variable %s not found, please use this environment variable to specify fms-hf-tuning image to be tested.", fmsHfTuningImageEnvVar)
Expand All @@ -57,6 +58,7 @@ func GetFmsHfTuningImage(t Test) string {
}

func GetCudaTrainingImage(t Test) string {
t.T().Helper()
image, ok := os.LookupEnv(cudaTrainingImageEnvVar)
if !ok {
t.T().Fatalf("Expected environment variable %s not found, please use this environment variable to specify the cuda training image to be tested.", cudaTrainingImageEnvVar)
Expand All @@ -65,6 +67,7 @@ func GetCudaTrainingImage(t Test) string {
}

func GetROCmTrainingImage(t Test) string {
t.T().Helper()
image, ok := os.LookupEnv(rocmTrainingImageEnvVar)
if !ok {
t.T().Fatalf("Expected environment variable %s not found, please use this environment variable to specify the cuda training image to be tested.", rocmTrainingImageEnvVar)
Expand All @@ -85,6 +88,7 @@ func GetMinioCliImage() string {
}

func GetHuggingFaceToken(t Test) string {
t.T().Helper()
image, ok := os.LookupEnv(huggingfaceTokenEnvVar)
if !ok {
t.T().Fatalf("Expected environment variable %s not found, please use this environment variable to specify HuggingFace token to download models.", huggingfaceTokenEnvVar)
Expand Down

0 comments on commit 2c41cf6

Please sign in to comment.