text: """
  Copyright (c) 2022 Huawei Technologies Co.,Ltd.
  
  openGauss is licensed under Mulan PSL v2.
  You can use this software according to the terms and conditions of the Mulan PSL v2.
  You may obtain a copy of Mulan PSL v2 at:
  
            http://license.coscl.org.cn/MulanPSL2
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  See the Mulan PSL v2 for more details.
  """
  """
  Case Type   : security-auditing
  Case Name   : 设置audit_user_violation=0.5，不支持
  Description :
      1.设置gs_guc reload -N all -I all -c"audit_user_violation=0.5"
  Expect      :
      1.设置失败，不能为浮点型
  History     :
  """
  import unittest
  from yat.test import Node
  from yat.test import macro
  from testcase.utils.Logger import Logger
  
  
  class Auditing(unittest.TestCase):
      def setUp(self):
          self.logger = Logger()
          self.logger.info(
              '----Opengauss_Function_Security_Auditing_Case0025 start----')
          self.userNode = Node('PrimaryDbUser')
          self.DB_ENV_PATH = macro.DB_ENV_PATH
  
      def test_security(self):
          excute_cmd1 = f'''
              source {self.DB_ENV_PATH};
              gs_guc reload -N all -I all -c "audit_user_violation=0.5"
              '''
          msg1 = self.userNode.sh(excute_cmd1).result()
          self.logger.info(msg1)
          self.assertTrue(msg1.find(
              'ERROR: The parameter "audit_user_violation" requires an integer '
              'value') > -1)
  
      def tearDown(self):
          self.logger.info(
              '-----Opengauss_Function_Security_Auditing_Case0025 finish-----')
  