Skip to content

Commit

Permalink
Merge pull request juju#13836 from ycliuhw/ci-ck
Browse files Browse the repository at this point in the history
[JUJU-700] Ci ck
  • Loading branch information
wallyworld authored Mar 15, 2022
2 parents d226b24 + 2180a56 commit 88ef7f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def assert_logs_appear_in_client_model(client, expected_logs, timeout):
expected_logs.splitlines(keepends=True),
current_logs.splitlines(keepends=True),
)
log.error(f'log migration failed, diff of the logs: \n{"".join(diff)}')
log.error('log migration failed, diff of the logs: \n%s', "".join(diff))
raise JujuAssertionError(
'Logs failed to be migrated after {}'.format(timeout))

Expand Down
6 changes: 4 additions & 2 deletions tests/suites/ck/ck.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run_deploy_ck() {
echo

local name model_name file overlay_path storage_path
local name model_name file overlay_path kube_home storage_path
name="${2}"
model_name="${name}"
file="${TEST_DIR}/${model_name}.log"
Expand All @@ -18,7 +18,9 @@ run_deploy_ck() {
wait_for "active" '.applications["kubernetes-master"] | ."application-status".current'
wait_for "active" '.applications["kubernetes-worker"] | ."application-status".current'

juju scp kubernetes-master/0:config ~/.kube/config
kube_home="${HOME}/.kube"
mkdir -p "${kube_home}"
juju scp kubernetes-master/0:config "${kube_home}/config"

kubectl cluster-info
kubectl get ns
Expand Down
3 changes: 3 additions & 0 deletions tests/suites/ck/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ test_ck() {

file="${TEST_DIR}/test-ck.log"

if [[ -n ${OPERATOR_IMAGE_ACCOUNT:-} ]]; then
export BOOTSTRAP_ADDITIONAL_ARGS="${BOOTSTRAP_ADDITIONAL_ARGS:-} --config caas-image-repo=${OPERATOR_IMAGE_ACCOUNT}"
fi
bootstrap "test-ck" "${file}"

test_deploy_ck
Expand Down

0 comments on commit 88ef7f5

Please sign in to comment.