[yast-commit] [yast/yast-yast2] 316699: Add missing unit tests
Branch: refs/heads/master Home: https://github.com/yast/yast-yast2 Commit: 316699028cbda240f9e2dbce09d479891d60dfbd https://github.com/yast/yast-yast2/commit/316699028cbda240f9e2dbce09d479891d... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/test/port_aliases_test.rb Log Message: ----------- Add missing unit tests The PortAliases public API didn't have unit tests yet, which we considered necessary to make changes in a safety way. Commit: 59a8374b74d0021111f32a1383d6e0039b444a19 https://github.com/yast/yast-yast2/commit/59a8374b74d0021111f32a1383d6e0039b... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Use `getent` to load the services database The `getent` util will load the database properly, no matter if it is placed in /etc/services, /usr/etc/services, or even in both. Commit: 68689097251a6de4a880f80ac0b681de5223cf25 https://github.com/yast/yast-yast2/commit/68689097251a6de4a880f80ac0b681de52... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Improve performance reducing the services lines to process The services database could have almost identical entries for the same services, but with different protocol. Getting rid of the protocol allows to identify and discard those not necessary lines, which helps to improve the performance. Commit: b8ef65895afc3418231cedad626c87671a0a6c83 https://github.com/yast/yast-yast2/commit/b8ef65895afc3418231cedad626c87671a... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Use a Struct to make easier dealing with services Commit: e0a80f5dce7bf7e0318660ac188ba049a04b786c https://github.com/yast/yast-yast2/commit/e0a80f5dce7bf7e0318660ac188ba049a0... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Fix documentation and copyright headers Commit: 278db9c09cc3bbf4008e8258b3ea5d1dd7f19454 https://github.com/yast/yast-yast2/commit/278db9c09cc3bbf4008e8258b3ea5d1dd7... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Get ride of Builtins Commit: 685c29c63bd90be6c0818aca9543b7fa626cf4da https://github.com/yast/yast-yast2/commit/685c29c63bd90be6c0818aca9543b7fa62... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M package/yast2.changes M package/yast2.spec Log Message: ----------- Bump version and update changelog Commit: 444ee20ad967ae30217f66e96565680cb7f54214 https://github.com/yast/yast-yast2/commit/444ee20ad967ae30217f66e96565680cb7... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb Log Message: ----------- Fix Rubocop offenses Commit: 456bfe89b66dbad16dc508fa21dcaf0d4e0c698f https://github.com/yast/yast-yast2/commit/456bfe89b66dbad16dc508fa21dcaf0d4e... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M package/yast2.changes Log Message: ----------- Fix typos and wording based on code review Commit: 8c60fdc7fe219c672c9366f6ee2eeec79bb15533 https://github.com/yast/yast-yast2/commit/8c60fdc7fe219c672c9366f6ee2eeec79b... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb Log Message: ----------- Avoid using complex output pre-process As suggested in the code review, the performance impact should not be noticiable. Commit: beb247855b958811215fa27acd30abaf585de367 https://github.com/yast/yast-yast2/commit/beb247855b958811215fa27acd30abaf58... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb Log Message: ----------- Remove pre-loaded service aliases As suggested during the code review. It helps a bit to simplify the code. Commit: 7ed9002483ebf355db272be762494e6e60eb151f https://github.com/yast/yast-yast2/commit/7ed9002483ebf355db272be762494e6e60... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb Log Message: ----------- Remove unused cache Commit: 261eae8b00f8c5b92af524403223991019859432 https://github.com/yast/yast-yast2/commit/261eae8b00f8c5b92af524403223991019... Author: David Díaz González <dgonzalez@suse.de> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb Log Message: ----------- Do not log `getent services` command execution Because its output is too long, now the `logger: nil` option is passed to Yast::Execute in order to use the Cheetah::NullRecorder[1]. [1] https://github.com/openSUSE/cheetah/blob/bafcf46680fba6cc3fa3e60498d2f1d2b74... Commit: 4be7ee8d197cc4576939be8b00a4a4b0f296109c https://github.com/yast/yast-yast2/commit/4be7ee8d197cc4576939be8b00a4a4b0f2... Author: David Díaz <1691872+dgdavid@users.noreply.github.com> Date: 2020-03-06 (Fri, 06 Mar 2020) Changed paths: M library/network/src/modules/PortAliases.rb M library/network/test/port_aliases_test.rb M package/yast2.changes M package/yast2.spec Log Message: ----------- Merge pull request #1026 from yast/fix/loading_services_database Do not crash when loading /usr/etc/services Compare: https://github.com/yast/yast-yast2/compare/3299e093601b...4be7ee8d197c
participants (1)
-
David Díaz