diff options
| author | “Milind” <mwaykole@redhat.com> | 2020-10-01 10:18:59 +0530 | 
|---|---|---|
| committer | Arthy Loganathan <aloganat@redhat.com> | 2020-10-22 14:23:10 +0000 | 
| commit | 43ba7cdf39407a5bdf6cde4dcc56b0a9d718b025 (patch) | |
| tree | 6405b86b3466b89b40c582fe33ff4eac01ca6074 | |
| parent | 08faae06ab07b56b815aec5bfbfcf72d653e8055 (diff) | |
[Test] Add TC to check glusterd config file
1 . Check the location of glusterd socket file ( glusterd.socket )
	ls  /var/run/ | grep -i glusterd.socket
2. systemctl is-enabled glusterd -> enabled
Change-Id: I6557c27ffb7e91482043741eeac0294e171a0925
Signed-off-by: “Milind” <mwaykole@redhat.com>
| -rw-r--r-- | tests/functional/glusterd/test_validate_glusterd_info.py | 29 | 
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functional/glusterd/test_validate_glusterd_info.py b/tests/functional/glusterd/test_validate_glusterd_info.py index 4fdeafade..e888d5c03 100644 --- a/tests/functional/glusterd/test_validate_glusterd_info.py +++ b/tests/functional/glusterd/test_validate_glusterd_info.py @@ -65,3 +65,32 @@ class TestGlusterdInfo(GlusterBaseClass):                      self.assertTrue(                          get_uuid.replace("\n", "") in uuid_list,                          "uuid not matched in {}".format(node)) + +    def test_glusterd_config_file_check(self): +        """ +        Steps: +            1. Check the location of glusterd socket file ( glusterd.socket ) +                ls  /var/run/ | grep -i glusterd.socket +            2. systemctl is-enabled glusterd -> enabled + +        """ + +        cmd = "ls  /var/run/ | grep -i glusterd.socket" +        ret, out, _ = g.run(self.mnode, cmd) + +        # Checking glusterd.socket file +        self.assertFalse( +            ret, "Failed to get glusterd.socket file on '{}'".format( +                self.mnode)) +        self.assertEqual( +            out.replace("\n", ""), "glusterd.socket", +            "Failed to get expected output") + +        # Checking for glusterd.service is enabled by default +        ret, out, _ = g.run( +            self.mnode, "systemctl is-enabled glusterd.service") +        self.assertFalse( +            ret, "Failed to execute the cmd on {}".format(self.mnode)) +        self.assertEqual( +            out.replace("\n", ""), "enabled", +            "Output of systemctl is-enabled glusterd.service is not enabled")  | 
