@@ -19,6 +19,7 @@ package common
1919import (
2020 "bytes"
2121 "embed"
22+ "strings"
2223
2324 gomega "github.com/onsi/gomega"
2425 . "github.com/project-codeflare/codeflare-common/support"
@@ -53,7 +54,7 @@ type NotebookProps struct {
5354 KubernetesUserBearerToken string
5455 Namespace string
5556 OpenDataHubNamespace string
56- Command [] string
57+ Command string
5758 NotebookImage string
5859 NotebookConfigMapName string
5960 NotebookConfigMapFileName string
@@ -76,6 +77,7 @@ func CreateNotebook(test Test, namespace *corev1.Namespace, notebookUserToken st
7677 s3SecretAccessKey , _ := GetStorageBucketSecretKey ()
7778 s3Endpoint , _ := GetStorageBucketDefaultEndpoint ()
7879 s3DefaultRegion , _ := GetStorageBucketDefaultRegion ()
80+ strCommand := "[\" " + strings .Join (command , "\" ,\" " ) + "\" ]"
7981
8082 if ! s3BucketNameExists {
8183 s3BucketName = "''"
@@ -92,7 +94,7 @@ func CreateNotebook(test Test, namespace *corev1.Namespace, notebookUserToken st
9294 KubernetesUserBearerToken : notebookUserToken ,
9395 Namespace : namespace .Name ,
9496 OpenDataHubNamespace : GetOpenDataHubNamespace (test ),
95- Command : command ,
97+ Command : strCommand ,
9698 NotebookImage : GetNotebookImage (test ),
9799 NotebookConfigMapName : jupyterNotebookConfigMapName ,
98100 NotebookConfigMapFileName : jupyterNotebookConfigMapFileName ,
@@ -109,6 +111,7 @@ func CreateNotebook(test Test, namespace *corev1.Namespace, notebookUserToken st
109111 notebookTemplate , err := files .ReadFile ("resources/custom-nb-small.yaml" )
110112 test .Expect (err ).NotTo (gomega .HaveOccurred ())
111113
114+ notebookTemplate = ParseTemplate (test , notebookTemplate , notebookProps )
112115 parsedNotebookTemplate := ParseTemplate (test , notebookTemplate , notebookProps )
113116
114117 // Create Notebook CR
0 commit comments