From 1f9767f75db9ee7fdb479df87c0d2a1bd2ffc693 Mon Sep 17 00:00:00 2001 From: Ildiko Vancsa Date: Tue, 18 Oct 2016 23:21:19 +0200 Subject: [PATCH] [upstream] Add exercises to the code deep dive module Change-Id: I5a4f0de26d15d9c0bbad009bcaaf768d9cba0118 --- .../source/slides/code-exercises.rst | 57 +++++++++++++++++++ .../source/slides/slide-index.rst | 1 + .../source/website/index.rst | 1 + 3 files changed, 59 insertions(+) create mode 100644 doc/upstream-training/source/slides/code-exercises.rst diff --git a/doc/upstream-training/source/slides/code-exercises.rst b/doc/upstream-training/source/slides/code-exercises.rst new file mode 100644 index 00000000..e9e4ce31 --- /dev/null +++ b/doc/upstream-training/source/slides/code-exercises.rst @@ -0,0 +1,57 @@ +==================== +Get to know the code +==================== + +.. image:: ./_assets/os_background.png + :class: fill + :width: 100% + +DevStack exercise +================= + +- Start DevStack in a VM on your laptop or in public cloud +- Validate the services are running +- Choose a service and issue an API call or use its client to verify + functionality + +LOG message exercise +==================== + +- Add a few extra LOG.debug() lines to one of the methods of the API call you + chose in the previous exercise +- Restart the corresponding service in your DevStack environment and find the + new message in the logs +- Find out what parameters were passed to that method by using the LOG messages + +Testing +======= + +- Test suits + + - Unit + - Functional + - Integration + +- Testing framework + + - Tox + +Testing exercise +================ + +- Run only one test class and not the whole suite +- Run one test case +- Group exercise + + - Ask a mentor to break the *tested* code of one test case + - Find out what the modification is by running the test and analyzing the + test output + +Test coverage exercise +====================== + +- Find an open review which is less complex and download the patch +- Remove the code changes and run the tests +- Check whether the tests failed or not +- Explain what it means if they didn't +- Comment on the open review diff --git a/doc/upstream-training/source/slides/slide-index.rst b/doc/upstream-training/source/slides/slide-index.rst index 995dbea2..5aced59b 100644 --- a/doc/upstream-training/source/slides/slide-index.rst +++ b/doc/upstream-training/source/slides/slide-index.rst @@ -52,6 +52,7 @@ Code Deep Dive :maxdepth: 1 code-devstack.rst + code-exercises.rst branching-model.rst Archive diff --git a/doc/upstream-training/source/website/index.rst b/doc/upstream-training/source/website/index.rst index 619ceb3d..f4c8b150 100644 --- a/doc/upstream-training/source/website/index.rst +++ b/doc/upstream-training/source/website/index.rst @@ -131,6 +131,7 @@ Code Deep Dive -------------- * `Demo environment `_ +* `Code exercises `_ Archive of additional training activities -----------------------------------------