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 -----------------------------------------