The main dish 
an Array of TestCase
testCases := []testCase{
{"Check polkit rules directory permissions (root:polkitd)", checkPermissions},
{"Add polkit rule and restart service", addRuleAndRestart},
{"Change hostname without authentication", changeHostnameWithAuth},
{"Verify hostname was changed", verifyHostnameChanged},
{"Remove polkit rule and restart service", removeRuleAndRestart},
{"Hostname change should fail without authentication", changeHostnameShouldFail},
{"Verify hostname was not changed", verifyHostnameUnchanged},
}
- Small , testable functions with simple, straightforward logic.
- You can see the test plan without reading the code.