@cloudant/couchbackup 2.9.16 → 2.9.17-SNAPSHOT.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.scannerwork/report-task.txt +2 -2
- package/.scannerwork/scanner-report/analysis-cache2.pb +0 -0
- package/.scannerwork/scanner-report/analysis-warnings.pb +2 -2
- package/.scannerwork/scanner-report/changesets-23.pb +1 -0
- package/.scannerwork/scanner-report/changesets-24.pb +1 -0
- package/.scannerwork/scanner-report/changesets-26.pb +1 -0
- package/.scannerwork/scanner-report/changesets-27.pb +1 -0
- package/.scannerwork/scanner-report/changesets-28.pb +1 -0
- package/.scannerwork/scanner-report/changesets-29.pb +1 -0
- package/.scannerwork/scanner-report/changesets-53.pb +1 -0
- package/.scannerwork/scanner-report/changesets-55.pb +1 -0
- package/.scannerwork/scanner-report/changesets-56.pb +1 -0
- package/.scannerwork/scanner-report/changesets-57.pb +1 -0
- package/.scannerwork/scanner-report/changesets-58.pb +1 -0
- package/.scannerwork/scanner-report/changesets-59.pb +1 -0
- package/.scannerwork/scanner-report/changesets-62.pb +1 -0
- package/.scannerwork/scanner-report/changesets-63.pb +1 -0
- package/.scannerwork/scanner-report/changesets-67.pb +1 -0
- package/.scannerwork/scanner-report/changesets-69.pb +1 -0
- package/.scannerwork/scanner-report/component-1.pb +1 -2
- package/.scannerwork/scanner-report/component-11.pb +1 -1
- package/.scannerwork/scanner-report/component-12.pb +1 -1
- package/.scannerwork/scanner-report/component-13.pb +1 -1
- package/.scannerwork/scanner-report/component-14.pb +1 -1
- package/.scannerwork/scanner-report/component-15.pb +1 -1
- package/.scannerwork/scanner-report/component-16.pb +1 -1
- package/.scannerwork/scanner-report/component-17.pb +1 -1
- package/.scannerwork/scanner-report/component-18.pb +1 -1
- package/.scannerwork/scanner-report/component-19.pb +1 -1
- package/.scannerwork/scanner-report/component-20.pb +1 -1
- package/.scannerwork/scanner-report/component-21.pb +1 -1
- package/.scannerwork/scanner-report/component-22.pb +1 -1
- package/.scannerwork/scanner-report/component-23.pb +1 -0
- package/.scannerwork/scanner-report/component-24.pb +1 -0
- package/.scannerwork/scanner-report/component-25.pb +1 -0
- package/.scannerwork/scanner-report/component-26.pb +1 -0
- package/.scannerwork/scanner-report/component-27.pb +1 -0
- package/.scannerwork/scanner-report/component-28.pb +1 -0
- package/.scannerwork/scanner-report/component-29.pb +1 -0
- package/.scannerwork/scanner-report/component-3.pb +1 -1
- package/.scannerwork/scanner-report/component-41.pb +1 -1
- package/.scannerwork/scanner-report/component-42.pb +1 -1
- package/.scannerwork/scanner-report/component-43.pb +1 -1
- package/.scannerwork/scanner-report/component-44.pb +1 -1
- package/.scannerwork/scanner-report/component-45.pb +1 -1
- package/.scannerwork/scanner-report/component-46.pb +1 -1
- package/.scannerwork/scanner-report/component-47.pb +1 -1
- package/.scannerwork/scanner-report/component-48.pb +1 -1
- package/.scannerwork/scanner-report/component-49.pb +1 -1
- package/.scannerwork/scanner-report/component-50.pb +1 -1
- package/.scannerwork/scanner-report/component-51.pb +1 -1
- package/.scannerwork/scanner-report/component-52.pb +1 -1
- package/.scannerwork/scanner-report/component-53.pb +1 -0
- package/.scannerwork/scanner-report/component-54.pb +1 -1
- package/.scannerwork/scanner-report/component-55.pb +1 -1
- package/.scannerwork/scanner-report/component-56.pb +1 -0
- package/.scannerwork/scanner-report/component-57.pb +1 -0
- package/.scannerwork/scanner-report/component-58.pb +1 -0
- package/.scannerwork/scanner-report/component-59.pb +1 -0
- package/.scannerwork/scanner-report/component-60.pb +1 -1
- package/.scannerwork/scanner-report/component-62.pb +1 -0
- package/.scannerwork/scanner-report/component-63.pb +1 -0
- package/.scannerwork/scanner-report/component-67.pb +1 -0
- package/.scannerwork/scanner-report/component-69.pb +1 -0
- package/.scannerwork/scanner-report/component-70.pb +1 -0
- package/.scannerwork/scanner-report/component-9.pb +1 -1
- package/.scannerwork/scanner-report/coverages-11.pb +0 -0
- package/.scannerwork/scanner-report/coverages-12.pb +0 -0
- package/.scannerwork/scanner-report/coverages-13.pb +0 -0
- package/.scannerwork/scanner-report/coverages-14.pb +0 -0
- package/.scannerwork/scanner-report/coverages-15.pb +0 -0
- package/.scannerwork/scanner-report/coverages-16.pb +0 -0
- package/.scannerwork/scanner-report/coverages-17.pb +0 -0
- package/.scannerwork/scanner-report/coverages-18.pb +0 -0
- package/.scannerwork/scanner-report/coverages-19.pb +0 -0
- package/.scannerwork/scanner-report/coverages-20.pb +0 -0
- package/.scannerwork/scanner-report/coverages-21.pb +0 -0
- package/.scannerwork/scanner-report/coverages-22.pb +0 -0
- package/.scannerwork/scanner-report/coverages-24.pb +0 -0
- package/.scannerwork/scanner-report/coverages-27.pb +0 -0
- package/.scannerwork/scanner-report/coverages-28.pb +0 -0
- package/.scannerwork/scanner-report/coverages-41.pb +0 -0
- package/.scannerwork/scanner-report/coverages-42.pb +0 -0
- package/.scannerwork/scanner-report/coverages-43.pb +0 -0
- package/.scannerwork/scanner-report/coverages-44.pb +0 -0
- package/.scannerwork/scanner-report/coverages-45.pb +0 -0
- package/.scannerwork/scanner-report/coverages-46.pb +0 -0
- package/.scannerwork/scanner-report/coverages-47.pb +0 -0
- package/.scannerwork/scanner-report/coverages-48.pb +0 -0
- package/.scannerwork/scanner-report/coverages-49.pb +0 -0
- package/.scannerwork/scanner-report/coverages-50.pb +0 -0
- package/.scannerwork/scanner-report/coverages-51.pb +0 -0
- package/.scannerwork/scanner-report/coverages-52.pb +0 -0
- package/.scannerwork/scanner-report/coverages-54.pb +0 -0
- package/.scannerwork/scanner-report/coverages-56.pb +0 -0
- package/.scannerwork/scanner-report/coverages-58.pb +0 -0
- package/.scannerwork/scanner-report/coverages-59.pb +0 -0
- package/.scannerwork/scanner-report/coverages-60.pb +0 -0
- package/.scannerwork/scanner-report/coverages-62.pb +0 -0
- package/.scannerwork/scanner-report/coverages-69.pb +0 -0
- package/.scannerwork/scanner-report/duplications-12.pb +0 -3
- package/.scannerwork/scanner-report/duplications-15.pb +2 -0
- package/.scannerwork/scanner-report/duplications-24.pb +2 -0
- package/.scannerwork/scanner-report/duplications-43.pb +2 -0
- package/.scannerwork/scanner-report/duplications-50.pb +0 -2
- package/.scannerwork/scanner-report/duplications-51.pb +3 -2
- package/.scannerwork/scanner-report/duplications-66.pb +1 -1
- package/.scannerwork/scanner-report/measures-11.pb +0 -0
- package/.scannerwork/scanner-report/measures-12.pb +0 -0
- package/.scannerwork/scanner-report/measures-13.pb +0 -0
- package/.scannerwork/scanner-report/measures-14.pb +0 -0
- package/.scannerwork/scanner-report/measures-15.pb +0 -0
- package/.scannerwork/scanner-report/measures-16.pb +0 -0
- package/.scannerwork/scanner-report/measures-17.pb +0 -0
- package/.scannerwork/scanner-report/measures-18.pb +0 -0
- package/.scannerwork/scanner-report/measures-19.pb +0 -0
- package/.scannerwork/scanner-report/measures-20.pb +0 -0
- package/.scannerwork/scanner-report/measures-21.pb +0 -0
- package/.scannerwork/scanner-report/measures-22.pb +0 -0
- package/.scannerwork/scanner-report/measures-24.pb +0 -0
- package/.scannerwork/scanner-report/measures-27.pb +0 -0
- package/.scannerwork/scanner-report/measures-28.pb +0 -0
- package/.scannerwork/scanner-report/measures-41.pb +0 -0
- package/.scannerwork/scanner-report/measures-42.pb +0 -0
- package/.scannerwork/scanner-report/measures-43.pb +0 -0
- package/.scannerwork/scanner-report/measures-44.pb +0 -0
- package/.scannerwork/scanner-report/measures-45.pb +0 -0
- package/.scannerwork/scanner-report/measures-46.pb +0 -0
- package/.scannerwork/scanner-report/measures-47.pb +0 -0
- package/.scannerwork/scanner-report/measures-48.pb +0 -0
- package/.scannerwork/scanner-report/measures-49.pb +0 -0
- package/.scannerwork/scanner-report/measures-50.pb +0 -0
- package/.scannerwork/scanner-report/measures-51.pb +0 -0
- package/.scannerwork/scanner-report/measures-52.pb +0 -0
- package/.scannerwork/scanner-report/measures-54.pb +0 -0
- package/.scannerwork/scanner-report/measures-55.pb +0 -0
- package/.scannerwork/scanner-report/measures-56.pb +0 -0
- package/.scannerwork/scanner-report/measures-58.pb +0 -0
- package/.scannerwork/scanner-report/measures-59.pb +0 -0
- package/.scannerwork/scanner-report/measures-60.pb +0 -0
- package/.scannerwork/scanner-report/measures-62.pb +0 -0
- package/.scannerwork/scanner-report/measures-69.pb +0 -0
- package/.scannerwork/scanner-report/measures-9.pb +0 -0
- package/.scannerwork/scanner-report/metadata.pb +0 -0
- package/.scannerwork/scanner-report/source-11.txt +25 -16
- package/.scannerwork/scanner-report/source-12.txt +32 -199
- package/.scannerwork/scanner-report/source-13.txt +17 -87
- package/.scannerwork/scanner-report/source-14.txt +115 -116
- package/.scannerwork/scanner-report/source-15.txt +66 -423
- package/.scannerwork/scanner-report/source-16.txt +64 -277
- package/.scannerwork/scanner-report/source-17.txt +247 -66
- package/.scannerwork/scanner-report/source-18.txt +104 -92
- package/.scannerwork/scanner-report/source-19.txt +45 -120
- package/.scannerwork/scanner-report/source-20.txt +89 -41
- package/.scannerwork/scanner-report/source-21.txt +148 -24
- package/.scannerwork/scanner-report/source-22.txt +162 -25
- package/.scannerwork/scanner-report/source-24.txt +75 -0
- package/.scannerwork/scanner-report/{source-38.txt → source-25.txt} +143 -143
- package/.scannerwork/scanner-report/source-27.txt +65 -0
- package/.scannerwork/scanner-report/source-28.txt +100 -0
- package/.scannerwork/scanner-report/source-3.txt +152 -152
- package/.scannerwork/scanner-report/source-41.txt +315 -32
- package/.scannerwork/scanner-report/source-42.txt +23 -63
- package/.scannerwork/scanner-report/source-43.txt +169 -45
- package/.scannerwork/scanner-report/source-44.txt +23 -164
- package/.scannerwork/scanner-report/source-45.txt +116 -104
- package/.scannerwork/scanner-report/source-46.txt +14 -26
- package/.scannerwork/scanner-report/source-47.txt +48 -99
- package/.scannerwork/scanner-report/source-48.txt +52 -141
- package/.scannerwork/scanner-report/source-49.txt +254 -242
- package/.scannerwork/scanner-report/source-50.txt +114 -72
- package/.scannerwork/scanner-report/source-51.txt +198 -60
- package/.scannerwork/scanner-report/source-52.txt +134 -14
- package/.scannerwork/scanner-report/source-54.txt +80 -25
- package/.scannerwork/scanner-report/source-55.txt +187 -424
- package/.scannerwork/scanner-report/{source-5.txt → source-56.txt} +10 -7
- package/.scannerwork/scanner-report/source-58.txt +106 -0
- package/.scannerwork/scanner-report/source-59.txt +449 -0
- package/.scannerwork/scanner-report/source-60.txt +25 -44
- package/.scannerwork/scanner-report/source-62.txt +60 -0
- package/.scannerwork/scanner-report/source-69.txt +46 -0
- package/.scannerwork/scanner-report/{source-68.txt → source-70.txt} +49 -49
- package/.scannerwork/scanner-report/source-9.txt +424 -183
- package/.scannerwork/scanner-report/symbols-11.pb +18 -9
- package/.scannerwork/scanner-report/symbols-12.pb +20 -264
- package/.scannerwork/scanner-report/symbols-13.pb +13 -57
- package/.scannerwork/scanner-report/symbols-14.pb +33 -86
- package/.scannerwork/scanner-report/symbols-15.pb +43 -789
- package/.scannerwork/scanner-report/symbols-16.pb +44 -426
- package/.scannerwork/scanner-report/symbols-17.pb +354 -69
- package/.scannerwork/scanner-report/symbols-18.pb +30 -59
- package/.scannerwork/scanner-report/symbols-19.pb +19 -71
- package/.scannerwork/scanner-report/symbols-20.pb +45 -32
- package/.scannerwork/scanner-report/symbols-21.pb +126 -23
- package/.scannerwork/scanner-report/symbols-22.pb +143 -30
- package/.scannerwork/scanner-report/symbols-24.pb +42 -0
- package/.scannerwork/scanner-report/symbols-27.pb +33 -0
- package/.scannerwork/scanner-report/symbols-28.pb +69 -0
- package/.scannerwork/scanner-report/symbols-41.pb +353 -20
- package/.scannerwork/scanner-report/symbols-42.pb +23 -46
- package/.scannerwork/scanner-report/symbols-43.pb +203 -19
- package/.scannerwork/scanner-report/symbols-44.pb +9 -144
- package/.scannerwork/scanner-report/symbols-45.pb +86 -30
- package/.scannerwork/scanner-report/symbols-46.pb +8 -18
- package/.scannerwork/scanner-report/symbols-47.pb +23 -45
- package/.scannerwork/scanner-report/symbols-48.pb +39 -126
- package/.scannerwork/scanner-report/symbols-49.pb +402 -328
- package/.scannerwork/scanner-report/symbols-50.pb +71 -44
- package/.scannerwork/scanner-report/symbols-51.pb +264 -42
- package/.scannerwork/scanner-report/symbols-52.pb +92 -13
- package/.scannerwork/scanner-report/symbols-54.pb +58 -7
- package/.scannerwork/scanner-report/symbols-56.pb +9 -0
- package/.scannerwork/scanner-report/symbols-58.pb +59 -0
- package/.scannerwork/scanner-report/symbols-59.pb +790 -0
- package/.scannerwork/scanner-report/symbols-60.pb +31 -21
- package/.scannerwork/scanner-report/symbols-62.pb +21 -0
- package/.scannerwork/scanner-report/symbols-69.pb +7 -0
- package/.scannerwork/scanner-report/syntax-highlightings-11.pb +23 -25
- package/.scannerwork/scanner-report/syntax-highlightings-12.pb +33 -266
- package/.scannerwork/scanner-report/syntax-highlightings-13.pb +15 -124
- package/.scannerwork/scanner-report/syntax-highlightings-14.pb +94 -90
- package/.scannerwork/scanner-report/syntax-highlightings-15.pb +57 -591
- package/.scannerwork/scanner-report/syntax-highlightings-16.pb +62 -687
- package/.scannerwork/scanner-report/syntax-highlightings-17.pb +245 -67
- package/.scannerwork/scanner-report/syntax-highlightings-18.pb +83 -148
- package/.scannerwork/scanner-report/syntax-highlightings-19.pb +23 -145
- package/.scannerwork/scanner-report/syntax-highlightings-20.pb +93 -77
- package/.scannerwork/scanner-report/syntax-highlightings-21.pb +177 -20
- package/.scannerwork/scanner-report/syntax-highlightings-22.pb +207 -33
- package/.scannerwork/scanner-report/syntax-highlightings-24.pb +81 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-38.pb → syntax-highlightings-25.pb} +103 -100
- package/.scannerwork/scanner-report/syntax-highlightings-27.pb +110 -0
- package/.scannerwork/scanner-report/syntax-highlightings-28.pb +107 -0
- package/.scannerwork/scanner-report/syntax-highlightings-3.pb +107 -108
- package/.scannerwork/scanner-report/syntax-highlightings-41.pb +590 -34
- package/.scannerwork/scanner-report/syntax-highlightings-42.pb +22 -61
- package/.scannerwork/scanner-report/syntax-highlightings-43.pb +246 -25
- package/.scannerwork/scanner-report/syntax-highlightings-44.pb +27 -209
- package/.scannerwork/scanner-report/syntax-highlightings-45.pb +95 -83
- package/.scannerwork/scanner-report/syntax-highlightings-46.pb +20 -23
- package/.scannerwork/scanner-report/syntax-highlightings-47.pb +67 -96
- package/.scannerwork/scanner-report/syntax-highlightings-48.pb +64 -176
- package/.scannerwork/scanner-report/syntax-highlightings-49.pb +606 -171
- package/.scannerwork/scanner-report/syntax-highlightings-50.pb +145 -57
- package/.scannerwork/scanner-report/syntax-highlightings-51.pb +263 -47
- package/.scannerwork/scanner-report/syntax-highlightings-52.pb +208 -16
- package/.scannerwork/scanner-report/syntax-highlightings-54.pb +119 -27
- package/.scannerwork/scanner-report/syntax-highlightings-55.pb +289 -3261
- package/.scannerwork/scanner-report/syntax-highlightings-56.pb +54 -0
- package/.scannerwork/scanner-report/syntax-highlightings-58.pb +178 -0
- package/.scannerwork/scanner-report/syntax-highlightings-59.pb +627 -0
- package/.scannerwork/scanner-report/syntax-highlightings-60.pb +48 -61
- package/.scannerwork/scanner-report/syntax-highlightings-62.pb +82 -0
- package/.scannerwork/scanner-report/syntax-highlightings-69.pb +62 -0
- package/.scannerwork/scanner-report/{syntax-highlightings-68.pb → syntax-highlightings-70.pb} +14 -13
- package/.scannerwork/scanner-report/syntax-highlightings-9.pb +3286 -226
- package/package.json +1 -1
- package/test-18-results.xml +147 -147
- package/test-20-results.xml +141 -141
- package/test-21-results.xml +143 -143
- package/test-iam-20-results.xml +49 -49
- package/.scannerwork/scanner-report/changesets-10.pb +0 -2
- package/.scannerwork/scanner-report/changesets-2.pb +0 -1
- package/.scannerwork/scanner-report/changesets-34.pb +0 -1
- package/.scannerwork/scanner-report/changesets-35.pb +0 -1
- package/.scannerwork/scanner-report/changesets-36.pb +0 -1
- package/.scannerwork/scanner-report/changesets-37.pb +0 -1
- package/.scannerwork/scanner-report/changesets-39.pb +0 -1
- package/.scannerwork/scanner-report/changesets-4.pb +0 -1
- package/.scannerwork/scanner-report/changesets-40.pb +0 -1
- package/.scannerwork/scanner-report/changesets-5.pb +0 -1
- package/.scannerwork/scanner-report/changesets-6.pb +0 -1
- package/.scannerwork/scanner-report/changesets-61.pb +0 -1
- package/.scannerwork/scanner-report/changesets-64.pb +0 -1
- package/.scannerwork/scanner-report/changesets-7.pb +0 -1
- package/.scannerwork/scanner-report/changesets-8.pb +0 -1
- package/.scannerwork/scanner-report/changesets-9.pb +0 -1
- package/.scannerwork/scanner-report/component-10.pb +0 -2
- package/.scannerwork/scanner-report/component-2.pb +0 -1
- package/.scannerwork/scanner-report/component-34.pb +0 -1
- package/.scannerwork/scanner-report/component-35.pb +0 -1
- package/.scannerwork/scanner-report/component-36.pb +0 -1
- package/.scannerwork/scanner-report/component-37.pb +0 -1
- package/.scannerwork/scanner-report/component-38.pb +0 -1
- package/.scannerwork/scanner-report/component-39.pb +0 -1
- package/.scannerwork/scanner-report/component-4.pb +0 -1
- package/.scannerwork/scanner-report/component-40.pb +0 -1
- package/.scannerwork/scanner-report/component-5.pb +0 -1
- package/.scannerwork/scanner-report/component-6.pb +0 -1
- package/.scannerwork/scanner-report/component-61.pb +0 -1
- package/.scannerwork/scanner-report/component-64.pb +0 -1
- package/.scannerwork/scanner-report/component-68.pb +0 -1
- package/.scannerwork/scanner-report/component-7.pb +0 -1
- package/.scannerwork/scanner-report/component-8.pb +0 -1
- package/.scannerwork/scanner-report/coverages-10.pb +0 -0
- package/.scannerwork/scanner-report/coverages-36.pb +0 -0
- package/.scannerwork/scanner-report/coverages-37.pb +0 -0
- package/.scannerwork/scanner-report/coverages-39.pb +0 -0
- package/.scannerwork/scanner-report/coverages-5.pb +0 -0
- package/.scannerwork/scanner-report/coverages-6.pb +0 -0
- package/.scannerwork/scanner-report/coverages-8.pb +0 -0
- package/.scannerwork/scanner-report/coverages-9.pb +0 -0
- package/.scannerwork/scanner-report/duplications-9.pb +0 -2
- package/.scannerwork/scanner-report/measures-10.pb +0 -0
- package/.scannerwork/scanner-report/measures-36.pb +0 -15
- package/.scannerwork/scanner-report/measures-37.pb +0 -0
- package/.scannerwork/scanner-report/measures-39.pb +0 -0
- package/.scannerwork/scanner-report/measures-4.pb +0 -0
- package/.scannerwork/scanner-report/measures-5.pb +0 -0
- package/.scannerwork/scanner-report/measures-6.pb +0 -0
- package/.scannerwork/scanner-report/measures-8.pb +0 -0
- package/.scannerwork/scanner-report/source-10.txt +0 -37
- package/.scannerwork/scanner-report/source-36.txt +0 -151
- package/.scannerwork/scanner-report/source-37.txt +0 -75
- package/.scannerwork/scanner-report/source-39.txt +0 -129
- package/.scannerwork/scanner-report/source-4.txt +0 -187
- package/.scannerwork/scanner-report/source-6.txt +0 -329
- package/.scannerwork/scanner-report/source-8.txt +0 -62
- package/.scannerwork/scanner-report/symbols-10.pb +0 -9
- package/.scannerwork/scanner-report/symbols-36.pb +0 -93
- package/.scannerwork/scanner-report/symbols-37.pb +0 -39
- package/.scannerwork/scanner-report/symbols-39.pb +0 -33
- package/.scannerwork/scanner-report/symbols-5.pb +0 -8
- package/.scannerwork/scanner-report/symbols-6.pb +0 -353
- package/.scannerwork/scanner-report/symbols-8.pb +0 -24
- package/.scannerwork/scanner-report/symbols-9.pb +0 -203
- package/.scannerwork/scanner-report/syntax-highlightings-10.pb +0 -61
- package/.scannerwork/scanner-report/syntax-highlightings-36.pb +0 -237
- package/.scannerwork/scanner-report/syntax-highlightings-37.pb +0 -101
- package/.scannerwork/scanner-report/syntax-highlightings-39.pb +0 -129
- package/.scannerwork/scanner-report/syntax-highlightings-4.pb +0 -368
- package/.scannerwork/scanner-report/syntax-highlightings-5.pb +0 -49
- package/.scannerwork/scanner-report/syntax-highlightings-6.pb +0 -620
- package/.scannerwork/scanner-report/syntax-highlightings-8.pb +0 -97
- /package/.scannerwork/scanner-report/{coverages-40.pb → coverages-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-2.pb → coverages-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-34.pb → coverages-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-7.pb → coverages-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-4.pb → coverages-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-35.pb → coverages-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-61.pb → coverages-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{coverages-64.pb → coverages-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-10.pb → duplications-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-2.pb → duplications-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-34.pb → duplications-27.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-35.pb → duplications-28.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-36.pb → duplications-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-37.pb → duplications-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-4.pb → duplications-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-39.pb → duplications-56.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-40.pb → duplications-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-46.pb → duplications-58.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-6.pb → duplications-59.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-61.pb → duplications-62.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-7.pb → duplications-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-64.pb → duplications-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{duplications-8.pb → duplications-69.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-6.pb → issues-41.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-14.pb → issues-45.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-12.pb → issues-51.pb} +0 -0
- /package/.scannerwork/scanner-report/{issues-35.pb → issues-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-40.pb → measures-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-38.pb → measures-25.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-2.pb → measures-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-34.pb → measures-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-7.pb → measures-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-35.pb → measures-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-61.pb → measures-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-64.pb → measures-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{measures-68.pb → measures-70.pb} +0 -0
- /package/.scannerwork/scanner-report/{source-40.txt → source-23.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-2.txt → source-26.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-34.txt → source-29.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-7.txt → source-53.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-35.txt → source-57.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-61.txt → source-63.txt} +0 -0
- /package/.scannerwork/scanner-report/{source-64.txt → source-67.txt} +0 -0
- /package/.scannerwork/scanner-report/{symbols-40.pb → symbols-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-2.pb → symbols-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-34.pb → symbols-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-7.pb → symbols-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-4.pb → symbols-55.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-35.pb → symbols-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-61.pb → symbols-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{symbols-64.pb → symbols-67.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-40.pb → syntax-highlightings-23.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-2.pb → syntax-highlightings-26.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-34.pb → syntax-highlightings-29.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-7.pb → syntax-highlightings-53.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-35.pb → syntax-highlightings-57.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-61.pb → syntax-highlightings-63.pb} +0 -0
- /package/.scannerwork/scanner-report/{syntax-highlightings-64.pb → syntax-highlightings-67.pb} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright © 2017,
|
|
1
|
+
// Copyright © 2017, 2023 IBM Corp. All rights reserved.
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,271 +11,283 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
/* global describe it before after beforeEach */
|
|
14
16
|
'use strict';
|
|
15
17
|
|
|
16
|
-
const
|
|
17
|
-
const events = require('events');
|
|
18
|
+
const assert = require('assert');
|
|
18
19
|
const fs = require('fs');
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* - `finished` - when backup process is finished (either complete or errored)
|
|
36
|
-
*/
|
|
37
|
-
module.exports = function(db, options) {
|
|
38
|
-
const ee = new events.EventEmitter();
|
|
39
|
-
const start = new Date().getTime(); // backup start time
|
|
40
|
-
const batchesPerDownloadSession = 50; // max batches to read from log file for download at a time (prevent OOM)
|
|
41
|
-
|
|
42
|
-
function proceedWithBackup() {
|
|
43
|
-
if (options.resume) {
|
|
44
|
-
// pick up from existing log file from previous run
|
|
45
|
-
downloadRemainingBatches(options.log, db, ee, start, batchesPerDownloadSession, options.parallelism);
|
|
46
|
-
} else {
|
|
47
|
-
// create new log file and process
|
|
48
|
-
spoolchanges(db, options.log, options.bufferSize, ee, function(err) {
|
|
49
|
-
if (err) {
|
|
50
|
-
ee.emit('error', err);
|
|
51
|
-
} else {
|
|
52
|
-
downloadRemainingBatches(options.log, db, ee, start, batchesPerDownloadSession, options.parallelism);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
20
|
+
const u = require('./citestutils.js');
|
|
21
|
+
const mockServerPort = +process.env.COUCHBACKUP_MOCK_SERVER_PORT || 7777;
|
|
22
|
+
const { once } = require('node:events');
|
|
23
|
+
const url = `http://localhost:${mockServerPort}`;
|
|
24
|
+
const nock = require('nock');
|
|
25
|
+
const httpProxy = require('http-proxy');
|
|
26
|
+
const Readable = require('stream').Readable;
|
|
27
|
+
|
|
28
|
+
// Create an infinite stream to read.
|
|
29
|
+
// It just keeps sending a backup line, useful for testing cases of
|
|
30
|
+
// termination while a stream has content remaining (the animaldb backup
|
|
31
|
+
// is too small for that).
|
|
32
|
+
class InfiniteBackupStream extends Readable {
|
|
33
|
+
constructor(opt) {
|
|
34
|
+
super(opt);
|
|
35
|
+
this.contents = Buffer.from('[{"_id":"giraffe","_rev":"3-7665c3e66315ff40616cceef62886bd8","min_weight":830,"min_length":5,"max_weight":1600,"max_length":6,"wiki_page":"http://en.wikipedia.org/wiki/Giraffe","class":"mammal","diet":"herbivore","_revisions":{"start":3,"ids":["7665c3e66315ff40616cceef62886bd8","aaaf10d5a68cdf22d95a5482a0e95549","967a00dff5e02add41819138abb3284d"]}}]\n', 'utf8');
|
|
56
36
|
}
|
|
57
37
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
38
|
+
_read() {
|
|
39
|
+
let proceed;
|
|
40
|
+
do {
|
|
41
|
+
proceed = this.push(this.contents);
|
|
42
|
+
} while (proceed);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
65
45
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
switch (err.status) {
|
|
79
|
-
case undefined:
|
|
80
|
-
// There was no status code on the error
|
|
81
|
-
return err;
|
|
82
|
-
case 404:
|
|
83
|
-
return new error.BackupError('BulkGetError', 'Database does not support /_bulk_get endpoint');
|
|
84
|
-
default:
|
|
85
|
-
return new error.HTTPError(err);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
callback(err);
|
|
46
|
+
function assertNock() {
|
|
47
|
+
try {
|
|
48
|
+
assert.ok(nock.isDone());
|
|
49
|
+
} catch (err) {
|
|
50
|
+
console.error('pending mocks: %j', nock.pendingMocks());
|
|
51
|
+
throw err;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function testPromiseWithAssertNock(testPromise) {
|
|
56
|
+
return testPromise.finally(() => {
|
|
57
|
+
assertNock();
|
|
89
58
|
});
|
|
90
59
|
}
|
|
91
60
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* to avoid enqueueing too many in one go.
|
|
95
|
-
*
|
|
96
|
-
* @param {string} log - log file name to maintain download state
|
|
97
|
-
* @param {string} db - nodejs-cloudant db
|
|
98
|
-
* @param {events.EventEmitter} ee - event emitter to emit received events on
|
|
99
|
-
* @param {time} startTime - start time for backup process
|
|
100
|
-
* @param {number} batchesPerDownloadSession - max batches to enqueue for
|
|
101
|
-
* download at a time. As batches contain many doc IDs, this helps avoid
|
|
102
|
-
* exhausting memory.
|
|
103
|
-
* @param {number} parallelism - number of concurrent downloads
|
|
104
|
-
* @returns function to call do download remaining batches with signature
|
|
105
|
-
* (err, {batches: batch, docs: doccount}) {@see spoolchanges}.
|
|
106
|
-
*/
|
|
107
|
-
function downloadRemainingBatches(log, db, ee, startTime, batchesPerDownloadSession, parallelism) {
|
|
108
|
-
let total = 0; // running total of documents downloaded so far
|
|
109
|
-
let noRemainingBatches = false;
|
|
110
|
-
|
|
111
|
-
// Generate a set of batches (up to batchesPerDownloadSession) to download from the
|
|
112
|
-
// log file and download them. Set noRemainingBatches to `true` for last batch.
|
|
113
|
-
function downloadSingleBatchSet(done) {
|
|
114
|
-
// Fetch the doc IDs for the batches in the current set to
|
|
115
|
-
// download them.
|
|
116
|
-
function batchSetComplete(err, data) {
|
|
117
|
-
if (!err) {
|
|
118
|
-
total = data.total;
|
|
119
|
-
}
|
|
120
|
-
done(err);
|
|
121
|
-
}
|
|
122
|
-
function processRetrievedBatches(err, batches) {
|
|
123
|
-
if (!err) {
|
|
124
|
-
// process them in parallelised queue
|
|
125
|
-
processBatchSet(db, parallelism, log, batches, ee, startTime, total, batchSetComplete);
|
|
126
|
-
} else {
|
|
127
|
-
batchSetComplete(err);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
61
|
+
async function backupHttpError(opts, errorName, errorCode) {
|
|
62
|
+
const p = u.p(opts, { expectedBackupError: { name: errorName, code: errorCode } });
|
|
130
63
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
done();
|
|
137
|
-
} else {
|
|
138
|
-
if (batchSetIds.length === 0) {
|
|
139
|
-
noRemainingBatches = true;
|
|
140
|
-
return done();
|
|
141
|
-
}
|
|
142
|
-
logfilegetbatches(log, batchSetIds, processRetrievedBatches);
|
|
143
|
-
}
|
|
64
|
+
// Create a file and attempt a backup to it
|
|
65
|
+
const output = fs.createWriteStream('/dev/null');
|
|
66
|
+
return once(output, 'open')
|
|
67
|
+
.then(() => {
|
|
68
|
+
return testPromiseWithAssertNock(u.testBackup(p, 'fakenockdb', output));
|
|
144
69
|
});
|
|
145
|
-
|
|
70
|
+
}
|
|
146
71
|
|
|
147
|
-
|
|
148
|
-
|
|
72
|
+
async function restoreHttpError(opts, errorName, errorCode) {
|
|
73
|
+
const q = u.p(opts, { expectedRestoreError: { name: errorName, code: errorCode } });
|
|
74
|
+
return testPromiseWithAssertNock(u.testRestoreFromFile(q, './test/fixtures/animaldb_expected.json', 'fakenockdb'));
|
|
75
|
+
}
|
|
149
76
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
77
|
+
[{ useApi: true }, { useApi: false }].forEach(function(params) {
|
|
78
|
+
describe(u.scenario('#unit Fatal errors', params), function() {
|
|
79
|
+
// These tests do real requests with mocks and if they run slowly
|
|
80
|
+
// the 2 second default mocha timeout can be insufficient, use 10 s
|
|
81
|
+
this.timeout(10000);
|
|
153
82
|
|
|
154
|
-
|
|
155
|
-
|
|
83
|
+
let processEnvCopy;
|
|
84
|
+
let proxy;
|
|
156
85
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return callback(null, []);
|
|
86
|
+
before('Set process data for test', function() {
|
|
87
|
+
const proxyPort = mockServerPort + 1000;
|
|
88
|
+
// Copy env and argv so we can reset them after the tests
|
|
89
|
+
processEnvCopy = JSON.parse(JSON.stringify(process.env));
|
|
90
|
+
|
|
91
|
+
// Set up a proxy to point to our nock server because the nock override
|
|
92
|
+
// isn't visible to the spawned CLI process
|
|
93
|
+
if (!params.useApi) {
|
|
94
|
+
proxy = httpProxy.createProxyServer({ target: url }).listen(proxyPort, 'localhost');
|
|
95
|
+
proxy.on('error', (err, req, res) => {
|
|
96
|
+
console.log(`Proxy received error ${err}`);
|
|
97
|
+
res.writeHead(400, {
|
|
98
|
+
'Content-Type': 'application/json'
|
|
99
|
+
});
|
|
100
|
+
res.end(JSON.stringify(err));
|
|
101
|
+
});
|
|
174
102
|
}
|
|
175
103
|
|
|
176
|
-
//
|
|
177
|
-
|
|
178
|
-
callback(null, batchSetIds);
|
|
179
|
-
} else {
|
|
180
|
-
callback(err);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
104
|
+
// setup environment variables
|
|
105
|
+
process.env.COUCH_URL = (params.useApi) ? url : `http://localhost:${proxyPort}`;
|
|
184
106
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
* @param {any} start - time backup started, to report deltas
|
|
196
|
-
* @param {any} grandtotal - count of documents downloaded prior to this set
|
|
197
|
-
* of batches
|
|
198
|
-
* @param {any} callback - completion callback, (err, {total: number}).
|
|
199
|
-
*/
|
|
200
|
-
function processBatchSet(db, parallelism, log, batches, ee, start, grandtotal, callback) {
|
|
201
|
-
let hasErrored = false;
|
|
202
|
-
let total = grandtotal;
|
|
203
|
-
|
|
204
|
-
// queue to process the fetch requests in an orderly fashion using _bulk_get
|
|
205
|
-
const q = async.queue(function(payload, done) {
|
|
206
|
-
const output = [];
|
|
207
|
-
const thisBatch = payload.batch;
|
|
208
|
-
delete payload.batch;
|
|
209
|
-
delete payload.command;
|
|
210
|
-
|
|
211
|
-
function logCompletedBatch(batch) {
|
|
212
|
-
if (log) {
|
|
213
|
-
fs.appendFile(log, ':d batch' + thisBatch + '\n', done);
|
|
107
|
+
nock.emitter.on('no match', (req, opts) => {
|
|
108
|
+
console.error(`Unmatched nock request ${opts.method} ${opts.protocol}${opts.host}${opts.path}`);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
after('Reset process data', function(done) {
|
|
113
|
+
process.env = processEnvCopy;
|
|
114
|
+
nock.emitter.removeAllListeners();
|
|
115
|
+
if (!params.useApi) {
|
|
116
|
+
proxy.close(done);
|
|
214
117
|
} else {
|
|
215
118
|
done();
|
|
216
119
|
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
beforeEach('Reset nocks', function() {
|
|
123
|
+
nock.cleanAll();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
describe('for backup', function() {
|
|
127
|
+
it('should terminate when DB does not exist', function() {
|
|
128
|
+
// Simulate existence check
|
|
129
|
+
nock(url).head('/fakenockdb').reply(404, { error: 'not_found', reason: 'missing' });
|
|
130
|
+
return backupHttpError(params, 'DatabaseNotFound', 10);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('should terminate on BulkGetError', function() {
|
|
134
|
+
// Simulate existence check
|
|
135
|
+
const n = nock(url).head('/fakenockdb').reply(200);
|
|
136
|
+
// Simulate _bulk_get not available
|
|
137
|
+
n.post('/fakenockdb/_bulk_get').reply(404, { error: 'not_found', reason: 'missing' });
|
|
138
|
+
return backupHttpError(params, 'BulkGetError', 50);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('should terminate on Unauthorized existence check', function() {
|
|
142
|
+
// Simulate a 401
|
|
143
|
+
nock(url).head('/fakenockdb').reply(401, { error: 'unauthorized', reason: '_reader access is required for this request' });
|
|
144
|
+
return backupHttpError(params, 'Unauthorized', 11);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('should terminate on Forbidden no _reader', function() {
|
|
148
|
+
// Simulate a 403
|
|
149
|
+
nock(url).head('/fakenockdb').reply(403, { error: 'forbidden', reason: '_reader access is required for this request' });
|
|
150
|
+
return backupHttpError(params, 'Forbidden', 12);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it('should terminate on _bulk_get HTTPFatalError', function() {
|
|
154
|
+
// Provide a mock complete changes log to allow a resume to skip ahead
|
|
155
|
+
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/test.log' } });
|
|
156
|
+
// Allow the existence and _bulk_get checks to pass
|
|
157
|
+
const n = nock(url).head('/fakenockdb').reply(200);
|
|
158
|
+
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
159
|
+
// Simulate a fatal HTTP error when trying to fetch docs
|
|
160
|
+
// Note: 2 outstanding batches, so 2 responses, 1 mock is optional because we can't guarantee timing
|
|
161
|
+
n.post('/fakenockdb/_bulk_get').query(true).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
162
|
+
n.post('/fakenockdb/_bulk_get').query(true).optionally().reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
163
|
+
return backupHttpError(p, 'HTTPFatalError', 40);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it('should terminate on NoLogFileName', function() {
|
|
167
|
+
// Don't supply a log file name with resume
|
|
168
|
+
const p = u.p(params, { opts: { resume: true } });
|
|
169
|
+
return backupHttpError(p, 'NoLogFileName', 20);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('should terminate on LogDoesNotExist', function() {
|
|
173
|
+
// Use a non-existent log file
|
|
174
|
+
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/doesnotexist.log' } });
|
|
175
|
+
return backupHttpError(p, 'LogDoesNotExist', 21);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it('should terminate on IncompleteChangesInLogFile', function() {
|
|
179
|
+
// Use an incomplete changes log file
|
|
180
|
+
const p = u.p(params, { opts: { resume: true, log: './test/fixtures/incomplete_changes.log' } });
|
|
181
|
+
// Allow the existence and _bulk_get checks to pass
|
|
182
|
+
const n = nock(url).head('/fakenockdb').reply(200);
|
|
183
|
+
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
184
|
+
// Should fail when it reads the incomplete changes
|
|
185
|
+
return backupHttpError(p, 'IncompleteChangesInLogFile', 22);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it('should terminate on _changes HTTPFatalError', function() {
|
|
189
|
+
// Allow the existence and _bulk_get checks to pass
|
|
190
|
+
const n = nock(url).head('/fakenockdb').reply(200);
|
|
191
|
+
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
192
|
+
// Simulate a fatal HTTP error when trying to fetch docs (note 2 outstanding batches)
|
|
193
|
+
n.post('/fakenockdb/_changes').query(true).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
194
|
+
return backupHttpError(params, 'HTTPFatalError', 40);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('should terminate on SpoolChangesError', function() {
|
|
198
|
+
// Allow the existence and _bulk_get checks to pass
|
|
199
|
+
const n = nock(url).head('/fakenockdb').reply(200);
|
|
200
|
+
n.post('/fakenockdb/_bulk_get').reply(200, '{"results": []}');
|
|
201
|
+
// Simulate a changes without a last_seq
|
|
202
|
+
n.post('/fakenockdb/_changes').query(true).reply(200,
|
|
203
|
+
{
|
|
204
|
+
results: [{
|
|
205
|
+
seq: '2-g1AAAAEbeJzLYWBgYMlgTmFQSElKzi9KdUhJstTLTS3KLElMT9VLzskvTUnMK9HLSy3JAapkSmRIsv___39WBnMiUy5QgN3MzDIxOdEMWb85dv0gSxThigyN8diS5AAkk-pBFiUyoOkzxKMvjwVIMjQAKaDW_Zh6TQnqPQDRC7I3CwDPDV1k',
|
|
206
|
+
id: 'badger',
|
|
207
|
+
changes: [{ rev: '4-51aa94e4b0ef37271082033bba52b850' }]
|
|
208
|
+
}]
|
|
232
209
|
});
|
|
233
|
-
|
|
210
|
+
return backupHttpError(params, 'SpoolChangesError', 30);
|
|
234
211
|
});
|
|
235
|
-
total += output.length;
|
|
236
|
-
const t = (new Date().getTime() - start) / 1000;
|
|
237
|
-
ee.emit('received', {
|
|
238
|
-
batch: thisBatch,
|
|
239
|
-
data: output,
|
|
240
|
-
length: output.length,
|
|
241
|
-
time: t,
|
|
242
|
-
total: total
|
|
243
|
-
}, q, logCompletedBatch);
|
|
244
|
-
}).catch(err => {
|
|
245
|
-
if (!hasErrored) {
|
|
246
|
-
hasErrored = true;
|
|
247
|
-
err = error.convertResponseError(err);
|
|
248
|
-
// Kill the queue for fatal errors
|
|
249
|
-
q.kill();
|
|
250
|
-
ee.emit('error', err);
|
|
251
|
-
}
|
|
252
|
-
done();
|
|
253
212
|
});
|
|
254
|
-
}, parallelism);
|
|
255
213
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
214
|
+
describe('for restore', function() {
|
|
215
|
+
it('should terminate on Unauthorized db existence check', function() {
|
|
216
|
+
// Simulate a 401
|
|
217
|
+
nock(url).get('/fakenockdb').reply(401, { error: 'unauthorized', reason: '_reader access is required for this request' });
|
|
218
|
+
return restoreHttpError(params, 'Unauthorized', 11);
|
|
219
|
+
});
|
|
259
220
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
221
|
+
it('should terminate on Forbidden no _writer', function() {
|
|
222
|
+
// Simulate the DB exists (i.e. you can read it)
|
|
223
|
+
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
224
|
+
// Simulate a 403 trying to write
|
|
225
|
+
n.post('/fakenockdb/_bulk_docs').reply(403, { error: 'forbidden', reason: '_writer access is required for this request' });
|
|
226
|
+
return restoreHttpError(params, 'Forbidden', 12);
|
|
227
|
+
});
|
|
264
228
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
229
|
+
it('should terminate on RestoreDatabaseNotFound', function() {
|
|
230
|
+
// Simulate the DB does not exist
|
|
231
|
+
nock(url).get('/fakenockdb').reply(404, { error: 'not_found', reason: 'Database does not exist.' });
|
|
232
|
+
return restoreHttpError(params, 'DatabaseNotFound', 10);
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it('should terminate on notEmptyDBErr when database is not empty', function() {
|
|
236
|
+
// Simulate the DB that does exist and not empty
|
|
237
|
+
nock(url).get('/fakenockdb').reply(200, { doc_count: 10, doc_del_count: 0 });
|
|
238
|
+
return restoreHttpError(params, 'DatabaseNotEmpty', 13);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('should terminate on notEmptyDBErr when database is not new', function() {
|
|
242
|
+
// Simulate the DB that does exist and not new
|
|
243
|
+
nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 10 });
|
|
244
|
+
return restoreHttpError(params, 'DatabaseNotEmpty', 13);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
it('should terminate on _bulk_docs HTTPFatalError', function() {
|
|
248
|
+
// Simulate the DB exists
|
|
249
|
+
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
250
|
+
// Use a parallelism of one and mock one response
|
|
251
|
+
const p = u.p(params, { opts: { parallelism: 1 } });
|
|
252
|
+
// Simulate a 400 trying to write
|
|
253
|
+
n.post('/fakenockdb/_bulk_docs').reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
254
|
+
return restoreHttpError(p, 'HTTPFatalError', 40);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it('should terminate on _bulk_docs HTTPFatalError from system database', function() {
|
|
258
|
+
// Simulate that target database exists and is _not_ empty.
|
|
259
|
+
// This should pass validator as we exclude system databases from the check.
|
|
260
|
+
const n = nock(url).get('/_replicator').reply(200, { doc_count: 1, doc_del_count: 0 });
|
|
261
|
+
// Simulate a 400 trying to write
|
|
262
|
+
n.post('/_replicator/_bulk_docs').reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
263
|
+
// Use a parallelism of one and mock one response
|
|
264
|
+
const q = u.p(params, { opts: { parallelism: 1 }, expectedRestoreError: { name: 'HTTPFatalError', code: 40 } });
|
|
265
|
+
return testPromiseWithAssertNock(u.testRestore(q, new InfiniteBackupStream(), '_replicator'));
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
it('should terminate on _bulk_docs HTTPFatalError large stream', function() {
|
|
269
|
+
// Simulate the DB exists
|
|
270
|
+
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
271
|
+
// Simulate a 400 trying to write
|
|
272
|
+
// Provide a body function to handle the stream, but allow any body
|
|
273
|
+
n.post('/fakenockdb/_bulk_docs', function(body) { return true; }).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
274
|
+
// Use only parallelism 1 so we don't have to mock up loads of responses
|
|
275
|
+
const q = u.p(params, { opts: { parallelism: 1 }, expectedRestoreError: { name: 'HTTPFatalError', code: 40 } });
|
|
276
|
+
return testPromiseWithAssertNock(u.testRestore(q, new InfiniteBackupStream(), 'fakenockdb'));
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
it('should terminate on multiple _bulk_docs HTTPFatalError', function() {
|
|
280
|
+
// Simulate the DB exists
|
|
281
|
+
const n = nock(url).get('/fakenockdb').reply(200, { doc_count: 0, doc_del_count: 0 });
|
|
282
|
+
// Simulate a 400 trying to write docs, 5 times because of default parallelism
|
|
283
|
+
// Provide a body function to handle the stream, but allow any body
|
|
284
|
+
// Four of the mocks are optional because of parallelism 5 we can't guarantee that the exit will happen
|
|
285
|
+
// after all 5 requests, but we must get at least one of them
|
|
286
|
+
n.post('/fakenockdb/_bulk_docs', function(body) { return true; }).reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
287
|
+
n.post('/fakenockdb/_bulk_docs', function(body) { return true; }).times(4).optionally().reply(400, { error: 'bad_request', reason: 'testing bad response' });
|
|
288
|
+
const q = u.p(params, { opts: { bufferSize: 1 }, expectedRestoreError: { name: 'HTTPFatalError', code: 40 } });
|
|
289
|
+
return restoreHttpError(q, 'HTTPFatalError', 40);
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
});
|