Skip to content

Commit

Permalink
Merge branch 'master' into broken
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarciao authored Jan 26, 2024
2 parents 588ce23 + 666207a commit dcf2784
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ods_ci/libs/Helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,13 @@ def process_resource_list(self, filename_in, filename_out=None):
@keyword
def escape_forward_slashes(self, string_to_escape):
return string_to_escape.replace("/", "\/")

@keyword
def is_string_empty(self, string):
"""
Check if a given string (including multi-line string) is empty.
Robot Framework doesn't properly handle multi-line strings and throws
Evaluating expression '"..." == ""' failed:
SyntaxError: EOL while scanning string literal (<string>, line 1)
"""
return string is None or string == ""
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Create Pipeline Server
... It assumes the Data Connection is aleady created
... and you wants to use defaul DB configurations [TEMPORARY]
[Arguments] ${dc_name} ${project_title}
... ${aws_s3_ca_bundle}=${NONE}
# Every 2 mins the frontend updates its cache and the client polls every 30seconds.
# So the longest you’d have to wait is 2.5 mins. Set 3 min just to make sure
Wait Until Page Contains Element ${PIPELINES_SERVER_BTN_XP} timeout=180s
Expand All @@ -34,6 +35,29 @@ Create Pipeline Server
Wait Until Generic Modal Disappears
Wait Until Project Is Open project_title=${project_title}
... timeout-pre-spinner=5s timeout-spinner=60s
${is_ca_empty}= Is String Empty ${aws_s3_ca_bundle}
IF ${is_ca_empty}
${aws_s3_ca_bundle}= Get Variable Value ${S3.AWS_CA_BUNDLE} ${NONE}
END
${is_ca_empty}= Is String Empty ${aws_s3_ca_bundle}
IF not ${is_ca_empty}
Patch Pipeline Server With CA Bundle
... project_title=${project_title} aws_s3_ca_bundle=${aws_s3_ca_bundle}
END

Patch Pipeline Server With CA Bundle
[Documentation] Patch the underlying dspa resource with CA Bundle
... The CA Bundle can be obtained from S3.AWS_CA_BUNDLE in test-variables.yml
[Arguments] ${project_title} ${aws_s3_ca_bundle}
${dc_namespace}= Get Openshift Namespace From Data Science Project ${project_title}
${rc} ${out}= Run And Return Rc And Output
... oc create configmap custom-ca-bundle -n ${dc_namespace} --from-literal=ca-bundle.crt='${aws_s3_ca_bundle}' # robocop: disable
Should Be Equal As Integers ${rc} 0
Log "${out}"
${rc} ${out}= Run And Return Rc And Output
... oc patch dspa pipelines-definition -n ${dc_namespace} -p '[{"op":"add","path":"/spec/apiServer/cABundle","value":{"configMapKey":"ca-bundle.crt","configMapName":"custom-ca-bundle"}}]' --type json # robocop: disable
Should Be Equal As Integers ${rc} 0
Log "${out}"

Select Data Connection
[Documentation] Selects an existing data connection from the dropdown
Expand Down

0 comments on commit dcf2784

Please sign in to comment.