2984N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2984N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
2984N/A<!--
2984N/A ! CDDL HEADER START
2984N/A !
2984N/A ! The contents of this file are subject to the terms of the
2984N/A ! Common Development and Distribution License, Version 1.0 only
2984N/A ! (the "License"). You may not use this file except in compliance
2984N/A ! with the License.
2984N/A !
2984N/A ! You can obtain a copy of the license at
2984N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
2984N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
2984N/A ! See the License for the specific language governing permissions
2984N/A ! and limitations under the License.
2984N/A !
2984N/A ! When distributing Covered Code, include this CDDL HEADER in each
2984N/A ! file and include the License file at
2984N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
2984N/A ! add the following below this CDDL HEADER, with the fields enclosed
2984N/A ! by brackets "[]" replaced with your own identifying information:
2984N/A ! Portions Copyright [yyyy] [name of copyright owner]
2984N/A !
2984N/A ! CDDL HEADER END
2984N/A !
4618N/A ! Copyright 2007-2009 Sun Microsystems, Inc.
2984N/A! -->
2984N/A<stax>
2984N/A <defaultcall function="logging_retention_properties"/>
2984N/A <function name="logging_retention_properties" scope="local">
4618N/A <block name="STAXCurrentFunction">
4618N/A <try>
2984N/A <sequence>
4618N/A <script>
4618N/A CurrentTestPath['suite']=STAXCurrentFunction
4618N/A </script>
4618N/A <call function="'testSuite_Preamble'" />
2984N/A
4618N/A <call function="'common_setup'">
4618N/A {
4618N/A 'quickStart' : True ,
4618N/A 'startServer' : True ,
4618N/A 'stopServer' : False
2984N/A }
2984N/A </call>
4618N/A
4618N/A <!--- Test Suite information
4618N/A #@TestSuiteName Retention Policy Properties Tests
4618N/A #@TestSuitePurpose Verify the Retention Policy properties
4618N/A #@TestSuiteID Logging
4618N/A #@TestSuiteGroup Logging
4618N/A #@TestGroup Logging
4618N/A #@TestScript logging_retention_properties.xml
4618N/A #@TestHTMLLink http://opends.dev.java.net/
4618N/A -->
4618N/A
4618N/A
4618N/A <!--- Test Case : Retention policy -->
4618N/A <!---
4618N/A #@TestMarker Retention Policy Properties Tests
4618N/A #@TestName Size limit retention policy
4618N/A #@TestIssue
4618N/A #@TestPurpose Check the size limit retention policy properties.
4618N/A #@TestPreamble none
4618N/A #@TestStep Check the size limit retention policy's properties are correctly set and get using dsconfig
4618N/A #@TestStep Set a property
4618N/A #@TestStep Get the property and check it has been correctly updated
4618N/A #@TestPostamble none
4618N/A #@TestResult Success if OpenDS returns 0 for all operations
4618N/A -->
4618N/A
4618N/A <testcase name="getTestCaseName('size limit retention policy suite')">
4618N/A <sequence>
4618N/A <call function="'testCase_Preamble'"/>
4618N/A <message>
4618N/A '---- Check the size limit retention policy properties -----'
4618N/A </message>
4618N/A <!-- create-log-retention-policy with the type size-limit -->
4618N/A <message>
4618N/A '------ create a size limit retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'create-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my size retention policy',
4618N/A 'optionsString' : '--type size-limit --set disk-space-used:5mb',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <message>'------ get file-size-limit --' </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'objectName' : 'log-retention-policy',
4618N/A 'propertyType' : 'policy',
4618N/A 'propertyName' : 'my size retention policy',
4618N/A 'attributeName' : 'disk-space-used',
4618N/A 'expectedAttributeValue' : '5 mb'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <!-- set disk-space-used -->
4618N/A <message>'------ set file-size-limit to 5kb --' </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'set-log-retention-policy-prop',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my size retention policy',
4618N/A 'optionsString' : '--set disk-space-used:5kb',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <message>'------ get disk-space-used --' </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'objectName' : 'log-retention-policy',
4618N/A 'propertyType' : 'policy',
4618N/A 'propertyName' : 'my size retention policy',
4618N/A 'attributeName' : 'disk-space-used',
4618N/A 'expectedAttributeValue' : '5 kb'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <message>
4618N/A '------ delete a size limit retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'delete-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my size retention policy',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <call function="'testCase_Postamble'"/>
4618N/A </sequence>
4618N/A </testcase>
2984N/A
4618N/A
4618N/A <!--- Test Case : free-disk-space Retention policy -->
4618N/A <!---
4618N/A #@TestMarker Retention Policy Properties Tests
4618N/A #@TestName free-disk-space retention policy
4618N/A #@TestIssue
4618N/A #@TestPurpose Check the free-disk-space retention policy properties.
4618N/A #@TestPreamble none
4618N/A #@TestStep Check the free-disk-space retention policy's properties are correctly set and get using dsconfig
4618N/A #@TestStep Set a property
4618N/A #@TestStep Get the property and check it has been correctly updated
4618N/A #@TestPostamble none
4618N/A #@TestResult Success if OpenDS returns 0 for all operations
4618N/A -->
4618N/A
4618N/A <testcase name="getTestCaseName('free-disk-space retention policy suite')">
4618N/A <sequence>
4618N/A <call function="'testCase_Preamble'"/>
4618N/A <message>
4618N/A '---- Check the free-disk-space retention policy properties -----'
4618N/A </message>
4618N/A <!-- create-log-retention-policy with the type free-disk-space -->
4618N/A <message>
4618N/A '------ create a free-disk-space limit retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'create-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my free-disk-space retention policy',
4618N/A 'optionsString' : '--type free-disk-space --set free-disk-space:6Gb',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A
4618N/A <message>
4618N/A '------ get free_disk-space --'
4618N/A </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'objectName' : 'log-retention-policy' ,
4618N/A 'propertyType' : 'policy' ,
4618N/A 'propertyName' : 'my free-disk-space retention policy',
4618N/A 'attributeName' : 'free-disk-space',
4618N/A 'expectedAttributeValue' : '6 gb'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <!-- set free_disk-space -->
4618N/A <message>'------ set free_disk-space to 4mb --' </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'set-log-retention-policy-prop',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my free-disk-space retention policy',
4618N/A 'optionsString' : '--set free-disk-space:4mb',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <message>'------ get free_disk-space --' </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'objectName' : 'log-retention-policy',
4618N/A 'propertyType' : 'policy',
4618N/A 'propertyName' : 'my free-disk-space retention policy',
4618N/A 'attributeName' : 'free-disk-space',
4618N/A 'expectedAttributeValue' : '4 mb'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <message>
4618N/A '------ delete a free-disk-space retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'delete-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my free-disk-space retention policy',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A
4618N/A <call function="'testCase_Postamble'"/>
4618N/A </sequence>
4618N/A </testcase>
4618N/A
4618N/A
4618N/A <!--- Test Case : free-disk-space Retention policy -->
4618N/A <!---
4618N/A #@TestMarker Retention Policy Properties Tests
4618N/A #@TestName file-count retention policy
4618N/A #@TestIssue
4618N/A #@TestPurpose Check the file-count retention policy properties.
4618N/A #@TestPreamble none
4618N/A #@TestStep Check the file-count retention policy's properties are correctly set and get using dsconfig
4618N/A #@TestStep Set a property
4618N/A #@TestStep Get the property and check it has been correctly updated
4618N/A #@TestPostamble none
4618N/A #@TestResult Success if OpenDS returns 0 for all operations
4618N/A -->
4618N/A
4618N/A <testcase name="getTestCaseName('file-count retention policy suite')">
4618N/A <sequence>
4618N/A <call function="'testCase_Preamble'"/>
4618N/A <message>
4618N/A '---- Check the file-count retention policy properties -----'
4618N/A </message>
4618N/A
4618N/A <!-- create-log-retention-policy with the type file-count -->
4618N/A <message>
4618N/A '------ create a file-count retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'create-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my filecount retention policy',
4618N/A 'optionsString' : '--type file-count --set number-of-files:10',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A
4618N/A <message>'------ get number-of-files --' </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'objectName' : 'log-retention-policy' ,
4618N/A 'propertyType' : 'policy' ,
4618N/A 'propertyName' : 'my filecount retention policy',
4618N/A 'attributeName' : 'number-of-files',
4618N/A 'expectedAttributeValue' : '10'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <!-- set number-of-files -->
4618N/A <message>'------ set number-of-files to 32 --' </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'set-log-retention-policy-prop',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my filecount retention policy',
4618N/A 'optionsString' : '--set number-of-files:32',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <message>'------ get number-of-files --' </message>
4618N/A <call function="'dsconfigGet'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'objectName' : 'log-retention-policy',
4618N/A 'propertyType' : 'policy',
4618N/A 'propertyName' :'my filecount retention policy',
4618N/A 'attributeName' : 'number-of-files',
4618N/A 'expectedAttributeValue' : '32'
4618N/A }
4618N/A </call>
4618N/A
4618N/A <!-- delete-log-retention-policy with the type file-count -->
4618N/A <message>
4618N/A '------ delete a fixed file-count retention policy --'
4618N/A </message>
4618N/A <call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4618N/A 'subcommand' : 'delete-log-retention-policy',
4618N/A 'objectType' : 'policy-name',
4618N/A 'objectName' : 'my filecount retention policy',
4618N/A 'expectedRC' : 0
4618N/A }
4618N/A </call>
4618N/A <call function="'testCase_Postamble'"/>
4618N/A </sequence>
4618N/A </testcase>
4618N/A
2984N/A </sequence>
4618N/A <finally>
4618N/A <sequence>
4618N/A <!-- Test Suite Cleanup -->
4618N/A <message>'Finally: Global Log Retention Properties Cleanup.'</message>
4618N/A <try>
4618N/A <call function="'common_cleanup'" />
4618N/A <catch exception="'STAFException'">
4618N/A <sequence>
4618N/A <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
4618N/A </sequence>
4618N/A </catch>
4618N/A <finally>
4618N/A <call function="'testSuite_Postamble'"/>
4618N/A </finally>
4618N/A </try>
4618N/A </sequence>
4618N/A </finally>
4618N/A
4618N/A </try>
4618N/A </block>
2984N/A </function>
3215N/A</stax>