diff --git a/pkg/api/v1/testkube/model_script_content_extended.go b/pkg/api/v1/testkube/model_script_content_extended.go index f3c3c3b94a8..45139103617 100644 --- a/pkg/api/v1/testkube/model_script_content_extended.go +++ b/pkg/api/v1/testkube/model_script_content_extended.go @@ -1,6 +1,8 @@ // content could be fetched as file or dir (many files, e.g. Cypress project) in executor package testkube +import "fmt" + type ScriptContentType string const ( @@ -10,6 +12,9 @@ const ( ScriptContentTypeGitDir ScriptContentType = "git-dir" ) +var ErrTypeNotFile = fmt.Errorf("unsupported content type use one of: file-uri, git-file, string") +var ErrTypeNotDir = fmt.Errorf("unsupported content type use one of: git-dir") + func NewStringScriptContent(str string) *ScriptContent { return &ScriptContent{ Type_: string(ScriptContentTypeGitFile),