Skip to content

Commit

Permalink
Merge pull request #10779 from anonymouse64/bugfix/wait-for-serial-ne…
Browse files Browse the repository at this point in the history
…sted

tests/nested/manual: use loop for checking for initialize-system task done
  • Loading branch information
mvo5 committed Sep 17, 2021
2 parents bbdeb5f + 1766654 commit 6efac1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ execute: |
exit
fi
# wait for the initialize device task to be done
retry -n 200 --wait 1 sh -c "tests.nested exec snap changes | MATCH 'Done.*Initialize device'"
echo "Check we have the right model from snap model"
tests.nested exec "sudo snap model --verbose" | MATCH "model:\s+testkeys-snapd-secured-core-20-amd64"
tests.nested exec "sudo snap model --verbose" | MATCH "grade:\s+secured"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ execute: |
exit
fi
#shellcheck source=tests/lib/nested.sh
. "$TESTSLIB/nested.sh"
# wait for the initialize device task to be done
retry -n 200 --wait 1 sh -c "tests.nested exec snap changes | MATCH 'Done.*Initialize device'"
echo "Check we have the right model from snap model"
tests.nested exec "sudo snap model --verbose" | MATCH "model:\s+testkeys-snapd-${MODEL_GRADE}-core-20-amd64"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ execute: |
exit
fi
# wait for the initialize device task to be done
retry -n 200 --wait 1 sh -c "tests.nested exec snap changes | MATCH 'Done.*Initialize device'"
echo "The initial cloud-init user was created"
tests.nested exec "cat /var/lib/extrausers/passwd" | MATCH normal-user
Expand Down

0 comments on commit 6efac1b

Please sign in to comment.