samba-in-kubernetes / sit-test-cases

SIT (Samba Integration Tests) Automated Test Cases
0 stars 4 forks source link

misc: optimize by avoiding repetitive code #59

Closed Shwetha-Acharya closed 7 months ago

Shwetha-Acharya commented 8 months ago

Added a list of testcases to iterate over and to avoid repetition. Also removed unnecessary print statement.

spuiuk commented 8 months ago

I am not convinced that these changes are required. This particular code is not expected to change. The addition of the loop doesn't really add much to functionality or readability in my opinion.

Shwetha-Acharya commented 8 months ago

I am not convinced that these changes are required. This particular code is not expected to change. The addition of the loop doesn't really add much to functionality or readability in my opinion.

I have just made this change according to the basic principle of avoiding repetitive code using loop. https://github.com/samba-in-kubernetes/sit-test-cases/pull/59/commits/5742b8a88f8fbe432691e834c6631fc43ea97f9c#diff-93cad77f223a70e92e5582538a5f34e8b1ab80b34927d4791694e154f776b941R97 avoids repeatedly calling three functions one after the other.

I agree it is not much of functionality, but it is just a clean practice and improves readability and maintainability of code. I am open to hear any opinions.

spuiuk commented 8 months ago

I think it negatively impacts the readability of the code. I vote that we skip this change for now and re-visit it in case these tests get more complicated.