# ********************************************************************************************************************************** # Test Definition # # Contains definitions for all unit and integration tests. # # The definitions consist of modules and tests. Modules group together tests that are related and allow common settings for all the # tests. Every module and test must have a name. Tests must also have a total. If this total does not match the actual number of # runs in a test then an error will be thrown. # # Most options can be set for modules and tests (test option will override module option if both are set): # * db - determines if the test will be run against multiple db versions # * coverage - determines coverage for the test # full - the module/test provides full coverage for the code module # partial - the module/test provides partial coverage for the code module # noCode - the code module should not contain any coverable code. If it does an error will be thrown. # * define - defines for C code (will also be applied to the test harness) # * define-test - defines for the test harness # * debugUnitSuppress - don't define DEBUG_UNIT for unit tests -- this is used to test unit test debugging macros # * perlReq - is Perl required for this C test? # # Some options are unique to tests: # * total - total runs in the test # * vm - VMs that the test will be run on # * include - modules to include directly into test.c (all files in coverage are automatically included) # This is useful when a module's internal data needs to be manipulated for testing but no coverage is added by the test. # ********************************************************************************************************************************** # ********************************************************************************************************************************** # Unit tests # # Unit tests are assumed to be C tests unless they end in "-perl". # ********************************************************************************************************************************** unit: # ******************************************************************************************************************************** - name: common test: # ---------------------------------------------------------------------------------------------------------------------------- - name: error total: 8 define-test: -DNO_ERROR -DNO_LOG -DNO_STACK_TRACE -DNO_MEM_CONTEXT coverage: common/error: full common/error.auto: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: assert-on total: 1 define-test: -DNO_LOG -DNO_STACK_TRACE -DNO_MEM_CONTEXT coverage: common/assert: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: assert-off total: 1 define: -DNDEBUG define-test: -DNO_LOG -DNO_STACK_TRACE -DNO_MEM_CONTEXT debugUnitSuppress: true coverage: common/assert: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: stack-trace total: 4 define-test: -DNO_LOG -DNO_STACK_TRACE -DNO_MEM_CONTEXT coverage: common/stackTrace: full # ---------------------------------------------------------------------------------------------------------------------------- - name: mem-context total: 7 define-test: -DNO_MEM_CONTEXT -DNO_LOG coverage: common/memContext: full # ---------------------------------------------------------------------------------------------------------------------------- - name: time total: 2 define-test: -DNO_ERROR -DNO_LOG coverage: common/time: full # ---------------------------------------------------------------------------------------------------------------------------- - name: fork total: 1 define-test: -DNO_LOG coverage: common/fork: full # ---------------------------------------------------------------------------------------------------------------------------- - name: log total: 5 define-test: -DNO_LOG coverage: common/log: full # ---------------------------------------------------------------------------------------------------------------------------- - name: debug-off total: 2 define: -DNDEBUG define-test: -DNO_LOG debugUnitSuppress: true coverage: common/debug: full # ---------------------------------------------------------------------------------------------------------------------------- - name: debug-on total: 4 coverage: common/debug: full # ---------------------------------------------------------------------------------------------------------------------------- - name: object total: 1 coverage: common/object: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: lock total: 2 coverage: common/lock: full # ---------------------------------------------------------------------------------------------------------------------------- - name: exit total: 3 coverage: common/exit: full # ---------------------------------------------------------------------------------------------------------------------------- - name: wait total: 1 coverage: common/wait: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-convert total: 9 coverage: common/type/convert: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-list total: 3 coverage: common/type/list: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-string total: 26 coverage: common/type/string: full common/type/stringList: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-buffer total: 6 coverage: common/type/buffer: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-variant total: 13 coverage: common/type/variant: full common/type/variantList: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-mcv total: 1 coverage: common/type/mcv: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-json total: 11 coverage: common/type/json: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-key-value total: 2 coverage: common/type/keyValue: full # ---------------------------------------------------------------------------------------------------------------------------- - name: type-xml total: 1 coverage: common/type/xml: full # ---------------------------------------------------------------------------------------------------------------------------- - name: io total: 4 coverage: common/io/bufferRead: full common/io/bufferWrite: full common/io/filter/buffer: full common/io/filter/filter: full common/io/filter/group: full common/io/filter/sink: full common/io/filter/size: full common/io/handleRead: full common/io/handleWrite: full common/io/io: full common/io/read: full common/io/write: full # ---------------------------------------------------------------------------------------------------------------------------- - name: io-tls total: 4 coverage: common/io/tls/client: full # ---------------------------------------------------------------------------------------------------------------------------- - name: io-http total: 5 coverage: common/io/http/cache: full common/io/http/client: full common/io/http/common: full common/io/http/header: full common/io/http/query: full # ---------------------------------------------------------------------------------------------------------------------------- - name: compress-gzip total: 4 coverage: common/compress/gzip/common: full common/compress/gzip/compress: full common/compress/gzip/decompress: full # ---------------------------------------------------------------------------------------------------------------------------- - name: crypto total: 3 coverage: common/crypto/cipherBlock: full common/crypto/common: full common/crypto/hash: full # ---------------------------------------------------------------------------------------------------------------------------- - name: exec total: 1 coverage: common/exec: full # ---------------------------------------------------------------------------------------------------------------------------- - name: encode total: 1 coverage: common/encode: full common/encode/base64: full # ---------------------------------------------------------------------------------------------------------------------------- - name: encode-perl total: 1 # ---------------------------------------------------------------------------------------------------------------------------- - name: reg-exp total: 3 coverage: common/regExp: full # ---------------------------------------------------------------------------------------------------------------------------- - name: ini total: 4 coverage: common/ini: full # ---------------------------------------------------------------------------------------------------------------------------- - name: ini-perl total: 10 # ---------------------------------------------------------------------------------------------------------------------------- - name: io-handle-perl total: 6 # ---------------------------------------------------------------------------------------------------------------------------- - name: io-buffered-perl total: 3 # ---------------------------------------------------------------------------------------------------------------------------- - name: io-process-perl total: 3 # ---------------------------------------------------------------------------------------------------------------------------- - name: log-perl total: 1 # ******************************************************************************************************************************** - name: postgres test: # ---------------------------------------------------------------------------------------------------------------------------- - name: client total: 1 coverage: postgres/client: full # ---------------------------------------------------------------------------------------------------------------------------- - name: interface total: 6 coverage: postgres/interface: full # ---------------------------------------------------------------------------------------------------------------------------- - name: page-checksum total: 3 coverage: postgres/pageChecksum: full # ******************************************************************************************************************************** - name: perl test: # ---------------------------------------------------------------------------------------------------------------------------- - name: config total: 1 coverage: perl/config: full # ---------------------------------------------------------------------------------------------------------------------------- - name: exec total: 4 perlReq: true coverage: perl/exec: full # ******************************************************************************************************************************** - name: config test: # ---------------------------------------------------------------------------------------------------------------------------- - name: define total: 2 coverage: config/define: full config/define.auto: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: config total: 4 coverage: config/config: full config/config.auto: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: parse total: 4 coverage: config/parse: full config/parse.auto: noCode # ---------------------------------------------------------------------------------------------------------------------------- - name: load total: 4 coverage: config/load: full # ---------------------------------------------------------------------------------------------------------------------------- - name: exec total: 1 coverage: config/exec: full # ---------------------------------------------------------------------------------------------------------------------------- - name: protocol total: 1 coverage: config/protocol: full # ******************************************************************************************************************************** - name: storage test: # ---------------------------------------------------------------------------------------------------------------------------- - name: perl total: 13 coverage: Storage/Storage: partial # ---------------------------------------------------------------------------------------------------------------------------- - name: helper-perl total: 3 # ---------------------------------------------------------------------------------------------------------------------------- - name: cifs total: 1 coverage: storage/cifs/storage: full storage/posix/storage: full storage/helper: full include: - storage/storage # ---------------------------------------------------------------------------------------------------------------------------- - name: posix total: 20 coverage: storage/posix/read: full storage/posix/storage: full storage/posix/write: full storage/helper: full storage/read: full storage/storage: full storage/write: full # ---------------------------------------------------------------------------------------------------------------------------- - name: remote total: 11 perlReq: true coverage: storage/remote/read: full storage/remote/protocol: full storage/remote/storage: full storage/remote/write: full storage/helper: full storage/storage: full include: - storage/read - storage/write # ---------------------------------------------------------------------------------------------------------------------------- - name: s3 total: 3 coverage: storage/s3/read: full storage/s3/storage: full storage/s3/write: full storage/helper: full storage/storage: full # ******************************************************************************************************************************** - name: protocol test: # ---------------------------------------------------------------------------------------------------------------------------- - name: common-minion-perl total: 1 # ---------------------------------------------------------------------------------------------------------------------------- - name: helper-perl total: 2 # ---------------------------------------------------------------------------------------------------------------------------- - name: protocol total: 8 perlReq: true coverage: protocol/client: full protocol/command: full protocol/helper: full protocol/parallel: full protocol/parallelJob: full protocol/server: full # ******************************************************************************************************************************** - name: info test: # ---------------------------------------------------------------------------------------------------------------------------- - name: info total: 3 coverage: info/info: full # ---------------------------------------------------------------------------------------------------------------------------- - name: info-pg total: 2 coverage: info/infoPg: full # ---------------------------------------------------------------------------------------------------------------------------- - name: info-archive total: 2 coverage: info/infoArchive: full # ---------------------------------------------------------------------------------------------------------------------------- - name: info-archive-perl total: 4 # ---------------------------------------------------------------------------------------------------------------------------- - name: info-backup total: 2 coverage: info/infoBackup: full # ---------------------------------------------------------------------------------------------------------------------------- - name: info-backup-perl total: 3 # ******************************************************************************************************************************** - name: db test: # ---------------------------------------------------------------------------------------------------------------------------- - name: db total: 2 perlReq: true coverage: db/db: full db/helper: full db/protocol: full # ******************************************************************************************************************************** - name: command test: # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-common total: 8 coverage: command/archive/common: full # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-common-perl total: 4 # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-get total: 5 perlReq: true coverage: command/archive/get/file: full command/archive/get/get: full command/archive/get/protocol: full # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-get-perl total: 1 # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-push total: 4 perlReq: true coverage: command/archive/push/file: full command/archive/push/protocol: full command/archive/push/push: full # ---------------------------------------------------------------------------------------------------------------------------- - name: backup-common total: 3 coverage: command/backup/common: full command/backup/pageChecksum: full # ---------------------------------------------------------------------------------------------------------------------------- - name: backup total: 3 coverage: command/backup/file: full command/backup/protocol: full include: - storage/storage # ---------------------------------------------------------------------------------------------------------------------------- - name: check total: 2 coverage: command/check/common: full command/check/check: full # ---------------------------------------------------------------------------------------------------------------------------- - name: command total: 1 coverage: command/command: full # ---------------------------------------------------------------------------------------------------------------------------- - name: control total: 3 coverage: command/control/common: full command/control/start: full command/control/stop: full # ---------------------------------------------------------------------------------------------------------------------------- - name: expire total: 7 coverage: command/expire/expire: full # ---------------------------------------------------------------------------------------------------------------------------- - name: help total: 4 coverage: command/help/help: full # ---------------------------------------------------------------------------------------------------------------------------- - name: info total: 3 coverage: command/info/info: full # ---------------------------------------------------------------------------------------------------------------------------- - name: local total: 1 coverage: command/local/local: full # ---------------------------------------------------------------------------------------------------------------------------- - name: remote total: 1 coverage: command/remote/remote: full # ---------------------------------------------------------------------------------------------------------------------------- - name: restore total: 1 coverage: command/restore/file: full command/restore/protocol: full # ---------------------------------------------------------------------------------------------------------------------------- - name: storage total: 1 coverage: command/storage/list: full # ******************************************************************************************************************************** - name: backup test: # ---------------------------------------------------------------------------------------------------------------------------- - name: unit-perl total: 4 # ---------------------------------------------------------------------------------------------------------------------------- - name: file-unit-perl total: 2 # ******************************************************************************************************************************** - name: manifest test: # ---------------------------------------------------------------------------------------------------------------------------- - name: all-perl total: 11 # ******************************************************************************************************************************** - name: stanza test: # ---------------------------------------------------------------------------------------------------------------------------- - name: all-perl total: 9 # ********************************************************************************************************************************** # Integration tests # # Integration tests are not run in a container. They are expected to create their own containers since most integration runs will # create more than one. For this reason each run is executed individually. # ********************************************************************************************************************************** integration: # ******************************************************************************************************************************** - name: mock test: # ---------------------------------------------------------------------------------------------------------------------------- - name: stanza total: 2 # ---------------------------------------------------------------------------------------------------------------------------- - name: expire total: 2 # ---------------------------------------------------------------------------------------------------------------------------- - name: archive total: 2 # ---------------------------------------------------------------------------------------------------------------------------- - name: archive-stop total: 2 # ---------------------------------------------------------------------------------------------------------------------------- - name: all total: 2 # ******************************************************************************************************************************** - name: real db: true test: # ---------------------------------------------------------------------------------------------------------------------------- - name: all total: 6 # ********************************************************************************************************************************** # Performance tests # # Performance tests run in a single container but are more like integration tests than unit tests since they call the pgbackrest # executable directly. # ********************************************************************************************************************************** performance: # ******************************************************************************************************************************** - name: performance test: # ---------------------------------------------------------------------------------------------------------------------------- - name: archive total: 1