1
0
mirror of https://github.com/google/nomulus synced 2026-06-09 16:33:02 +00:00

Compare commits

...

9 Commits

Author SHA1 Message Date
Lai Jiang 903b7979de Upgrade to jline 3 (#2400)
jline 3 contains API breaking changes, necessitating changes in
ShellCommand.
2024-04-12 19:57:02 +00:00
Weimin Yu 8721085d14 Fix BSA validation (#2401)
Unblocked reserved names wrongly reported as missing unblockable domain.
2024-04-12 19:54:59 +00:00
Lai Jiang e434528cd3 Add nomulus deployment and service manifests (#2389) 2024-04-11 19:01:09 +00:00
Pavlo Tkach 9ca54e4364 Add UI for EPP Password update (#2393) 2024-04-10 22:29:52 +00:00
Weimin Yu a16794e2af Run BSA Validate without lock (#2399)
As a read-only action that tolerates staleness, locking is unnecessary.
This should help with the lock contention we are observing.

Also reduces the number of VM instances provisioned for BSA and increase
the idle timeout. This should reduce invocation delay. Longer delay may
cause AppEngine to return `Timeout` status to Cloud Scheduler even
though the cron job succeeds.
2024-04-10 19:58:24 +00:00
Lai Jiang 496a781572 Upgrade jcommander (#2398) 2024-04-10 17:34:11 +00:00
Ben McIlwain 2df583df1a Statically import Truth.assertThat() in tests (#2395)
This also involved breaking out an improperly done assertThat() helper overload
method for JsonObjects into a proper Subject that doesn't further overload
assertThat().
2024-04-09 16:27:26 +00:00
sarahcaseybot 4f1ca920a7 Use the createBillingCostTransitions map to get the create cost for a domain (#2390)
* Use the createBillingCostTransitions map to get the create cost for a domain

* Add comment

* Add some TODOs

* use streams to check currency unit
2024-04-05 21:27:55 +00:00
Weimin Yu 96e33f5b4f Check for missing BSA unblockable domains (#2394)
* Check for missing BSA unblockable domains

All unblockable domains created before the last refresh run should be
reported as unblockable (registered).

All reserved domains that are not registered should be reported as
unblockable (reserved). Note that transient errors may be reported for
newly added reserved domains since we do not maintain update time for
when a reserved label is associated with a TLD. However, this scenario
is extremely rare in operations.

* Addressing review
2024-04-03 00:44:05 +00:00
113 changed files with 2923 additions and 2058 deletions
+126 -112
View File
@@ -70,12 +70,12 @@
}
},
"node_modules/@angular-devkit/architect": {
"version": "0.1703.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1703.1.tgz",
"integrity": "sha512-vkfvURv7O+3fHMTE9K+yUEiFS0v4JNYKsDP0LE1ChH5Ocy0bJXGcH2Cyz2W8qdJGDG/tKe41VzvOLpu88Xv3zQ==",
"version": "0.1703.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1703.2.tgz",
"integrity": "sha512-fT5gSzwDHOyGv8zF97t8rjeoYSGSxXjWWstl3rN1nXdO0qgJ5m6Sv0fupON+HltdXDCBLRH+2khNpqx/Fh0Qww==",
"dev": true,
"dependencies": {
"@angular-devkit/core": "17.3.1",
"@angular-devkit/core": "17.3.2",
"rxjs": "7.8.1"
},
"engines": {
@@ -94,15 +94,15 @@
}
},
"node_modules/@angular-devkit/build-angular": {
"version": "17.3.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.3.1.tgz",
"integrity": "sha512-e+hZvLVH5AvHCFbVtKRd5oJeFsEmjg7kK1V6hsVxH4YE2f2x399TSr+AGxwV+R3jnjZ67ujIeXXd0Uuf1RwcSg==",
"version": "17.3.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.3.2.tgz",
"integrity": "sha512-muPCUyL0uHvRkLH4NLWiccER6P2vCm/Q5DDvqyN4XOzzY3tAHHLrKrpvY87sgd2oNJ6Ci8x7GPNcfzR5KELCnw==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "2.3.0",
"@angular-devkit/architect": "0.1703.1",
"@angular-devkit/build-webpack": "0.1703.1",
"@angular-devkit/core": "17.3.1",
"@angular-devkit/architect": "0.1703.2",
"@angular-devkit/build-webpack": "0.1703.2",
"@angular-devkit/core": "17.3.2",
"@babel/core": "7.24.0",
"@babel/generator": "7.23.6",
"@babel/helper-annotate-as-pure": "7.22.5",
@@ -113,7 +113,7 @@
"@babel/preset-env": "7.24.0",
"@babel/runtime": "7.24.0",
"@discoveryjs/json-ext": "0.5.7",
"@ngtools/webpack": "17.3.1",
"@ngtools/webpack": "17.3.2",
"@vitejs/plugin-basic-ssl": "1.1.0",
"ansi-colors": "4.1.3",
"autoprefixer": "10.4.18",
@@ -158,7 +158,7 @@
"vite": "5.1.5",
"watchpack": "2.4.0",
"webpack": "5.90.3",
"webpack-dev-middleware": "6.1.1",
"webpack-dev-middleware": "6.1.2",
"webpack-dev-server": "4.15.1",
"webpack-merge": "5.10.0",
"webpack-subresource-integrity": "5.1.0"
@@ -232,12 +232,12 @@
}
},
"node_modules/@angular-devkit/build-webpack": {
"version": "0.1703.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1703.1.tgz",
"integrity": "sha512-nVUzewX8RCzaEPQZ1JQpE42wpsYchKQwfXUSCkoUsuCMB2c6zuEz0Jt94nzJg3UjSEEV4ZqCH8v5MDOvB49Rlw==",
"version": "0.1703.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1703.2.tgz",
"integrity": "sha512-w7rVFQcZK4iTCd/MLfQWIkDkwBOfAs++txNQyS9qYID8KvLs1V+oWYd2qDBRelRv1u3YtaCIS1pQx3GFKBC3OA==",
"dev": true,
"dependencies": {
"@angular-devkit/architect": "0.1703.1",
"@angular-devkit/architect": "0.1703.2",
"rxjs": "7.8.1"
},
"engines": {
@@ -260,9 +260,9 @@
}
},
"node_modules/@angular-devkit/core": {
"version": "17.3.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.1.tgz",
"integrity": "sha512-EP7zwqBEaOPuBJwzKmh2abfgNFITGX178BOyTG6zTymeMzEbrvy2OdeQXSslkJ/RGLCpx60GT+0CFW7wGlQR6Q==",
"version": "17.3.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.2.tgz",
"integrity": "sha512-1vxKo9+pdSwTOwqPDSYQh84gZYmCJo6OgR5+AZoGLGMZSeqvi9RG5RiUcOMLQYOnuYv0arlhlWxz0ZjyR8ApKw==",
"dev": true,
"dependencies": {
"ajv": "8.12.0",
@@ -3462,9 +3462,9 @@
}
},
"node_modules/@leichtgewicht/ip-codec": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
"integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",
"integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==",
"dev": true
},
"node_modules/@ljharb/through": {
@@ -4232,9 +4232,9 @@
}
},
"node_modules/@ngtools/webpack": {
"version": "17.3.1",
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.3.1.tgz",
"integrity": "sha512-6qRYFN6DqogZK0ZFrSlhg1OsIWm3lL3m+/Ixoj6/MLLjDBrTtHqmI93vg6P1EKYTH4fWChL7jtv7iS/LSZubgw==",
"version": "17.3.2",
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.3.2.tgz",
"integrity": "sha512-E8zejFF4aJ8l2XcF+GgnE/1IqsZepnPT1xzulLB4LXtjVuXLFLoF9xkHQwxs7cJWWZsxd/SlNsCIcn/ezrYBcQ==",
"dev": true,
"engines": {
"node": "^18.13.0 || >=20.9.0",
@@ -4780,9 +4780,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz",
"integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.1.tgz",
"integrity": "sha512-4C4UERETjXpC4WpBXDbkgNVgHyWfG3B/NKY46e7w5H134UDOFqUJKpsLm0UYmuupW+aJmRgeScrDNfvZ5WV80A==",
"cpu": [
"arm"
],
@@ -4793,9 +4793,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz",
"integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.1.tgz",
"integrity": "sha512-TrTaFJ9pXgfXEiJKQ3yQRelpQFqgRzVR9it8DbeRzG0RX7mKUy0bqhCFsgevwXLJepQKTnLl95TnPGf9T9AMOA==",
"cpu": [
"arm64"
],
@@ -4806,9 +4806,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz",
"integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.1.tgz",
"integrity": "sha512-fz7jN6ahTI3cKzDO2otQuybts5cyu0feymg0bjvYCBrZQ8tSgE8pc0sSNEuGvifrQJWiwx9F05BowihmLxeQKw==",
"cpu": [
"arm64"
],
@@ -4819,9 +4819,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz",
"integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.1.tgz",
"integrity": "sha512-WTvdz7SLMlJpektdrnWRUN9C0N2qNHwNbWpNo0a3Tod3gb9leX+yrYdCeB7VV36OtoyiPAivl7/xZ3G1z5h20g==",
"cpu": [
"x64"
],
@@ -4832,9 +4832,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz",
"integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.1.tgz",
"integrity": "sha512-dBHQl+7wZzBYcIF6o4k2XkAfwP2ks1mYW2q/Gzv9n39uDcDiAGDqEyml08OdY0BIct0yLSPkDTqn4i6czpBLLw==",
"cpu": [
"arm"
],
@@ -4845,9 +4845,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz",
"integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.1.tgz",
"integrity": "sha512-bur4JOxvYxfrAmocRJIW0SADs3QdEYK6TQ7dTNz6Z4/lySeu3Z1H/+tl0a4qDYv0bCdBpUYM0sYa/X+9ZqgfSQ==",
"cpu": [
"arm64"
],
@@ -4858,9 +4858,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz",
"integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.1.tgz",
"integrity": "sha512-ssp77SjcDIUSoUyj7DU7/5iwM4ZEluY+N8umtCT9nBRs3u045t0KkW02LTyHouHDomnMXaXSZcCSr2bdMK63kA==",
"cpu": [
"arm64"
],
@@ -4871,9 +4871,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz",
"integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.1.tgz",
"integrity": "sha512-Jv1DkIvwEPAb+v25/Unrnnq9BO3F5cbFPT821n3S5litkz+O5NuXuNhqtPx5KtcwOTtaqkTsO+IVzJOsxd11aQ==",
"cpu": [
"riscv64"
],
@@ -4883,10 +4883,23 @@
"linux"
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.1.tgz",
"integrity": "sha512-U564BrhEfaNChdATQaEODtquCC7Ez+8Hxz1h5MAdMYj0AqD0GA9rHCpElajb/sQcaFL6NXmHc5O+7FXpWMa73Q==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
"integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.1.tgz",
"integrity": "sha512-zGRDulLTeDemR8DFYyFIQ8kMP02xpUsX4IBikc7lwL9PrwR3gWmX2NopqiGlI2ZVWMl15qZeUjumTwpv18N7sQ==",
"cpu": [
"x64"
],
@@ -4897,9 +4910,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz",
"integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.1.tgz",
"integrity": "sha512-VTk/MveyPdMFkYJJPCkYBw07KcTkGU2hLEyqYMsU4NjiOfzoaDTW9PWGRsNwiOA3qI0k/JQPjkl/4FCK1smskQ==",
"cpu": [
"x64"
],
@@ -4910,9 +4923,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz",
"integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.1.tgz",
"integrity": "sha512-L+hX8Dtibb02r/OYCsp4sQQIi3ldZkFI0EUkMTDwRfFykXBPptoz/tuuGqEd3bThBSLRWPR6wsixDSgOx/U3Zw==",
"cpu": [
"arm64"
],
@@ -4923,9 +4936,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz",
"integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.1.tgz",
"integrity": "sha512-+dI2jVPfM5A8zme8riEoNC7UKk0Lzc7jCj/U89cQIrOjrZTCWZl/+IXUeRT2rEZ5j25lnSA9G9H1Ob9azaF/KQ==",
"cpu": [
"ia32"
],
@@ -4936,9 +4949,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz",
"integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.1.tgz",
"integrity": "sha512-YY1Exxo2viZ/O2dMHuwQvimJ0SqvL+OAWQLLY6rvXavgQKjhQUzn7nc1Dd29gjB5Fqi00nrBWctJBOyfVMIVxw==",
"cpu": [
"x64"
],
@@ -5031,9 +5044,9 @@
}
},
"node_modules/@sigstore/core": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.0.0.tgz",
"integrity": "sha512-dW2qjbWLRKGu6MIDUTBuJwXCnR8zivcSpf5inUzk7y84zqy/dji0/uahppoIgMoKeR+6pUZucrwHfkQQtiG9Rw==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.1.0.tgz",
"integrity": "sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==",
"dev": true,
"engines": {
"node": "^16.14.0 || >=18.0.0"
@@ -5064,9 +5077,9 @@
}
},
"node_modules/@sigstore/tuf": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.1.tgz",
"integrity": "sha512-9Iv40z652td/QbV0o5n/x25H9w6IYRt2pIGbTX55yFDYlApDQn/6YZomjz6+KBx69rXHLzHcbtTS586mDdFD+Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.2.tgz",
"integrity": "sha512-mwbY1VrEGU4CO55t+Kl6I7WZzIl+ysSzEYdA1Nv/FTrl2bkeaPXo5PnWZAVfcY2zSdhOpsUTJW67/M2zHXGn5w==",
"dev": true,
"dependencies": {
"@sigstore/protobuf-specs": "^0.3.0",
@@ -5077,13 +5090,13 @@
}
},
"node_modules/@sigstore/verify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.1.0.tgz",
"integrity": "sha512-1fTqnqyTBWvV7cftUUFtDcHPdSox0N3Ub7C0lRyReYx4zZUlNTZjCV+HPy4Lre+r45dV7Qx5JLKvqqsgxuyYfg==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.1.1.tgz",
"integrity": "sha512-BNANJms49rw9Q5J+fJjrDqOQSzjXDcOq/pgKDaVdDoIvQwqIfaoUriy+fQfh8sBX04hr4bkkrwu3EbhQqoQH7A==",
"dev": true,
"dependencies": {
"@sigstore/bundle": "^2.2.0",
"@sigstore/core": "^1.0.0",
"@sigstore/core": "^1.1.0",
"@sigstore/protobuf-specs": "^0.3.0"
},
"engines": {
@@ -6772,9 +6785,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001599",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz",
"integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==",
"version": "1.0.30001600",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz",
"integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==",
"dev": true,
"funding": [
{
@@ -7935,9 +7948,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.713",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.713.tgz",
"integrity": "sha512-vDarADhwntXiULEdmWd77g2dV6FrNGa8ecAC29MZ4TwPut2fvosD0/5sJd1qWNNe8HcJFAC+F5Lf9jW1NPtWmw==",
"version": "1.4.719",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.719.tgz",
"integrity": "sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -8128,9 +8141,9 @@
}
},
"node_modules/es-module-lexer": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.2.tgz",
"integrity": "sha512-7nOqkomXZEaxUDJw21XZNtRk739QvrPSoZoRtbsEfcii00vdzZUh6zh1CQwHhrib8MdEtJfv5rJiGeb4KuV/vw==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz",
"integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==",
"dev": true
},
"node_modules/esbuild": {
@@ -11594,9 +11607,9 @@
}
},
"node_modules/node-gyp": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.0.1.tgz",
"integrity": "sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz",
"integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==",
"dev": true,
"dependencies": {
"env-paths": "^2.2.0",
@@ -12546,12 +12559,12 @@
"dev": true
},
"node_modules/path-scurry": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
"integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz",
"integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==",
"dev": true,
"dependencies": {
"lru-cache": "^9.1.1 || ^10.0.0",
"lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
},
"engines": {
@@ -13411,9 +13424,9 @@
}
},
"node_modules/rollup": {
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.1.tgz",
"integrity": "sha512-hFi+fU132IvJ2ZuihN56dwgpltpmLZHZWsx27rMCTZ2sYwrqlgL5sECGy1eeV2lAihD8EzChBVVhsXci0wD4Tg==",
"dev": true,
"dependencies": {
"@types/estree": "1.0.5"
@@ -13426,19 +13439,20 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.13.0",
"@rollup/rollup-android-arm64": "4.13.0",
"@rollup/rollup-darwin-arm64": "4.13.0",
"@rollup/rollup-darwin-x64": "4.13.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
"@rollup/rollup-linux-arm64-gnu": "4.13.0",
"@rollup/rollup-linux-arm64-musl": "4.13.0",
"@rollup/rollup-linux-riscv64-gnu": "4.13.0",
"@rollup/rollup-linux-x64-gnu": "4.13.0",
"@rollup/rollup-linux-x64-musl": "4.13.0",
"@rollup/rollup-win32-arm64-msvc": "4.13.0",
"@rollup/rollup-win32-ia32-msvc": "4.13.0",
"@rollup/rollup-win32-x64-msvc": "4.13.0",
"@rollup/rollup-android-arm-eabi": "4.13.1",
"@rollup/rollup-android-arm64": "4.13.1",
"@rollup/rollup-darwin-arm64": "4.13.1",
"@rollup/rollup-darwin-x64": "4.13.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.13.1",
"@rollup/rollup-linux-arm64-gnu": "4.13.1",
"@rollup/rollup-linux-arm64-musl": "4.13.1",
"@rollup/rollup-linux-riscv64-gnu": "4.13.1",
"@rollup/rollup-linux-s390x-gnu": "4.13.1",
"@rollup/rollup-linux-x64-gnu": "4.13.1",
"@rollup/rollup-linux-x64-musl": "4.13.1",
"@rollup/rollup-win32-arm64-msvc": "4.13.1",
"@rollup/rollup-win32-ia32-msvc": "4.13.1",
"@rollup/rollup-win32-x64-msvc": "4.13.1",
"fsevents": "~2.3.2"
}
},
@@ -14375,9 +14389,9 @@
}
},
"node_modules/tar": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
"integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
"dev": true,
"dependencies": {
"chownr": "^2.0.0",
@@ -15533,9 +15547,9 @@
}
},
"node_modules/webpack-dev-middleware": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.1.tgz",
"integrity": "sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.2.tgz",
"integrity": "sha512-Wu+EHmX326YPYUpQLKmKbTyZZJIB8/n6R09pTmB03kJmnMsVPTo9COzHZFr01txwaCAuZvfBJE4ZCHRcKs5JaQ==",
"dev": true,
"dependencies": {
"colorette": "^2.0.10",
+2
View File
@@ -36,6 +36,7 @@ import { RegistrarComponent } from './registrar/registrarsTable.component';
import { ResourcesComponent } from './resources/resources.component';
import SettingsContactComponent from './settings/contact/contact.component';
import { ContactDetailsComponent } from './settings/contact/contactDetails.component';
import EppPasswordEditComponent from './settings/security/eppPasswordEdit.component';
import SecurityComponent from './settings/security/security.component';
import SecurityEditComponent from './settings/security/securityEdit.component';
import { SettingsComponent } from './settings/settings.component';
@@ -57,6 +58,7 @@ import { TldsComponent } from './tlds/tlds.component';
BillingInfoComponent,
ContactDetailsComponent,
DomainListComponent,
EppPasswordEditComponent,
HeaderComponent,
HomeComponent,
LocationBackDirective,
+13 -11
View File
@@ -12,16 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { NgModule } from '@angular/core';
import { A11yModule } from '@angular/cdk/a11y';
import { DialogModule } from '@angular/cdk/dialog';
import { CdkMenuModule } from '@angular/cdk/menu';
import { OverlayModule } from '@angular/cdk/overlay';
import { CdkTableModule } from '@angular/cdk/table';
import { CdkTreeModule } from '@angular/cdk/tree';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatBadgeModule } from '@angular/material/badge';
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatGridListModule } from '@angular/material/grid-list';
@@ -29,24 +36,18 @@ import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatTreeModule } from '@angular/material/tree';
import { OverlayModule } from '@angular/cdk/overlay';
import { CdkMenuModule } from '@angular/cdk/menu';
import { DialogModule } from '@angular/cdk/dialog';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatChipsModule } from '@angular/material/chips';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
@NgModule({
exports: [
@@ -85,6 +86,7 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
MatPaginatorModule,
MatChipsModule,
MatAutocompleteModule,
ReactiveFormsModule,
],
})
export class MaterialModule {}
@@ -23,6 +23,10 @@ import {
GlobalLoaderService,
} from '../shared/services/globalLoader.service';
export interface IpAllowListItem {
value: string;
}
export interface Address {
city?: string;
countryCode?: string;
@@ -31,6 +35,19 @@ export interface Address {
zip?: string;
}
export interface SecuritySettingsBackendModel {
clientCertificate?: string;
failoverClientCertificate?: string;
ipAddressAllowList?: Array<string>;
// TODO: @ptkach At some point we want to add a back-end support for this
eppPasswordLastUpdated?: string;
}
export interface SecuritySettings
extends Omit<SecuritySettingsBackendModel, 'ipAddressAllowList'> {
ipAddressAllowList?: Array<IpAllowListItem>;
}
export interface WhoisRegistrarFields {
ianaIdentifier?: number;
icannReferralEmail: string;
@@ -40,13 +57,14 @@ export interface WhoisRegistrarFields {
whoisServer: string;
}
export interface Registrar extends WhoisRegistrarFields {
export interface Registrar
extends WhoisRegistrarFields,
SecuritySettingsBackendModel {
allowedTlds?: string[];
billingAccountMap?: object;
driveFolderId?: string;
emailAddress?: string;
faxNumber?: string;
ipAddressAllowList?: string[];
phoneNumber?: string;
registrarId: string;
registrarName: string;
@@ -25,6 +25,9 @@
font-weight: 500;
padding: 10px 0;
}
.contact__name-column-roles {
margin-bottom: 10px;
}
}
&__empty-contacts {
display: flex;
@@ -17,10 +17,9 @@ import { MatTableDataSource } from '@angular/material/table';
import { take } from 'rxjs';
import { RegistrarService } from 'src/app/registrar/registrar.service';
import {
Contact,
ContactService,
ViewReadyContact,
contactTypeToViewReadyContact,
ViewReadyContact,
} from './contact.service';
@Component({
@@ -85,7 +84,7 @@ export default class ContactComponent {
});
}
openDetails(contact: Contact) {
openDetails(contact: ViewReadyContact) {
this.contactService.setEditableContact(contact);
this.contactService.isContactDetailsView = true;
}
@@ -77,19 +77,17 @@ export class ContactService {
private registrarService: RegistrarService
) {}
setEditableContact(contact?: Contact) {
this.contactInEdit = contactTypeToViewReadyContact(
contact
? contact
: {
emailAddress: '',
name: '',
types: ['ADMIN'],
faxNumber: '',
phoneNumber: '',
registrarId: '',
}
);
setEditableContact(contact?: ViewReadyContact) {
this.contactInEdit = contact
? contact
: contactTypeToViewReadyContact({
emailAddress: '',
name: '',
types: ['ADMIN'],
faxNumber: '',
phoneNumber: '',
registrarId: '',
});
}
fetchContacts(): Observable<Contact[]> {
@@ -106,13 +104,6 @@ export class ContactService {
.pipe(switchMap((_) => this.fetchContacts()));
}
updateContact(index: number, contact: ViewReadyContact) {
const newContacts = this.contacts().map((c, i) =>
i === index ? contact : c
);
return this.saveContacts(newContacts);
}
addContact(contact: ViewReadyContact) {
const newContacts = this.contacts().concat([contact]);
return this.saveContacts(newContacts);
@@ -65,16 +65,17 @@ export class ContactDetailsComponent {
save(e: SubmitEvent) {
e.preventDefault();
this.contactService
.saveContacts([this.contactService.contactInEdit])
.subscribe({
complete: () => {
this.goBack();
},
error: (err: HttpErrorResponse) => {
this._snackBar.open(err.error);
},
});
const request = this.contactService.isContactNewView
? this.contactService.addContact(this.contactService.contactInEdit)
: this.contactService.saveContacts(this.contactService.contacts());
request.subscribe({
complete: () => {
this.goBack();
},
error: (err: HttpErrorResponse) => {
this._snackBar.open(err.error);
},
});
}
checkboxIsChecked(type: string) {
@@ -0,0 +1,76 @@
<div class="settings-security__edit-password">
<p>
<button
mat-icon-button
aria-label="Back to security settings"
(click)="goBack()"
>
<mat-icon>arrow_back</mat-icon>
</button>
</p>
<h1>Update EPP password</h1>
<p class="secondary-text">
Passwords must be between 6 and 16 alphanumeric characters
</p>
<form
(ngSubmit)="save()"
[formGroup]="passwordUpdateForm"
class="settings-security__edit-password-form"
>
<div class="settings-security__edit-password-field">
<mat-form-field appearance="outline">
<mat-label>Old password: </mat-label>
<input
matInput
type="text"
formControlName="oldPassword"
required
autocomplete="current-password"
/>
<mat-error *ngIf="hasError('oldPassword') as errorText">{{
errorText
}}</mat-error>
</mat-form-field>
</div>
<div class="settings-security__edit-password-field">
<mat-form-field appearance="outline">
<mat-label>New password: </mat-label>
<input
matInput
type="text"
formControlName="newPassword"
required
autocomplete="new-password"
/>
<mat-error *ngIf="hasError('newPassword') as errorText">{{
errorText
}}</mat-error>
</mat-form-field>
</div>
<div class="settings-security__edit-password-field">
<mat-form-field appearance="outline">
<mat-label>Confirm new password: </mat-label>
<input
matInput
type="text"
formControlName="newPasswordRepeat"
required
autocomplete="new-password"
/>
<mat-error *ngIf="hasError('newPasswordRepeat') as errorText">{{
errorText
}}</mat-error>
</mat-form-field>
</div>
<button
mat-flat-button
color="primary"
[disabled]="!passwordUpdateForm.valid"
aria-label="Save epp password update"
type="submit"
class="settings-security__edit-password-save"
>
Save
</button>
</form>
</div>
@@ -0,0 +1,16 @@
.settings-security__edit-password {
max-width: 616px;
&-field {
width: 100%;
mat-form-field {
margin-bottom: 20px;
width: 100%;
}
}
&-form {
margin-top: 30px;
}
&-save {
margin-top: 30px;
}
}
@@ -0,0 +1,109 @@
// Copyright 2024 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Component } from '@angular/core';
import {
AbstractControl,
FormControl,
FormGroup,
ValidatorFn,
Validators,
} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import { RegistrarService } from 'src/app/registrar/registrar.service';
import { SecurityService } from './security.service';
type errorCode = 'required' | 'maxlength' | 'minlength' | 'passwordsDontMatch';
type errorFriendlyText = { [type in errorCode]: String };
@Component({
selector: 'app-epp-password-edit',
templateUrl: './eppPasswordEdit.component.html',
styleUrls: ['./eppPasswordEdit.component.scss'],
})
export default class EppPasswordEditComponent {
MIN_MAX_LENGHT = new String(
'Passwords must be between 6 and 16 alphanumeric characters'
);
errorTextMap: errorFriendlyText = {
required: "This field can't be empty",
maxlength: this.MIN_MAX_LENGHT,
minlength: this.MIN_MAX_LENGHT,
passwordsDontMatch: "Passwords don't match",
};
constructor(
public securityService: SecurityService,
private _snackBar: MatSnackBar,
public registrarService: RegistrarService
) {}
hasError(controlName: string) {
const maybeErrors = this.passwordUpdateForm.get(controlName)?.errors;
const maybeError =
maybeErrors && (Object.keys(maybeErrors)[0] as errorCode);
if (maybeError) {
return this.errorTextMap[maybeError];
}
return '';
}
newPasswordsMatch: ValidatorFn = (control: AbstractControl) => {
if (
this.passwordUpdateForm?.get('newPassword')?.value ===
this.passwordUpdateForm?.get('newPasswordRepeat')?.value
) {
this.passwordUpdateForm?.get('newPasswordRepeat')?.setErrors(null);
} else {
this.passwordUpdateForm
?.get('newPasswordRepeat')
?.setErrors({ passwordsDontMatch: control.value });
}
return null;
};
passwordUpdateForm = new FormGroup({
oldPassword: new FormControl('', [Validators.required]),
newPassword: new FormControl('', [
Validators.required,
Validators.minLength(6),
Validators.maxLength(16),
this.newPasswordsMatch,
]),
newPasswordRepeat: new FormControl('', [
Validators.required,
Validators.minLength(6),
Validators.maxLength(16),
this.newPasswordsMatch,
]),
});
save() {
debugger;
// this.securityService.saveEppPassword().subscribe({
// complete: () => {
// this.goBack();
// },
// error: (err: HttpErrorResponse) => {
// this._snackBar.open(err.error);
// },
// });
}
goBack() {
this.securityService.isEditingPassword = false;
}
}
@@ -1,7 +1,48 @@
@if(securityService.isEditingSecurity) {
<app-security-edit></app-security-edit>
} @else if(securityService.isEditingPassword) {
<app-epp-password-edit></app-epp-password-edit>
} @else {
<div class="settings-security">
<mat-card appearance="outlined">
<mat-card-content>
<mat-list role="list">
<!-- IP Allowlist Start -->
<mat-list-item role="listitem">
<div class="settings-security__section-header">
<h2>EPP Password</h2>
<button
mat-flat-button
color="primary"
aria-label="Edit EPP Password"
(click)="editEppPassword()"
>
<mat-icon>edit</mat-icon>
Edit
</button>
</div>
</mat-list-item>
<mat-list-item role="listitem" lines="3">
<span class="console-app__list-value"
>todo: come up with a text here</span
>
</mat-list-item>
<mat-list-item role="listitem">
<span class="console-app__list-key">Password</span>
<span class="console-app__list-value">••••••••••••••</span>
</mat-list-item>
@if(dataSource.eppPasswordLastUpdated) {
<mat-divider></mat-divider>
<mat-list-item role="listitem">
<span class="console-app__list-key">Last Changed</span>
<span class="console-app__list-value">{{
dataSource.eppPasswordLastUpdated
}}</span>
</mat-list-item>
}
</mat-list>
</mat-card-content>
</mat-card>
<mat-card appearance="outlined">
<mat-card-content>
<mat-list role="list">
@@ -12,7 +53,7 @@
<button
mat-flat-button
color="primary"
aria-label="Edit Contact"
aria-label="Edit security settings"
(click)="editSecurity()"
>
<mat-icon>edit</mat-icon>
@@ -13,12 +13,11 @@
// limitations under the License.
import { Component, effect } from '@angular/core';
import { RegistrarService } from 'src/app/registrar/registrar.service';
import {
SecurityService,
RegistrarService,
SecuritySettings,
apiToUiConverter,
} from './security.service';
} from 'src/app/registrar/registrar.service';
import { SecurityService, apiToUiConverter } from './security.service';
@Component({
selector: 'app-security',
@@ -43,4 +42,8 @@ export default class SecurityComponent {
editSecurity() {
this.securityService.isEditingSecurity = true;
}
editEppPassword() {
this.securityService.isEditingPassword = true;
}
}
@@ -14,24 +14,14 @@
import { Injectable } from '@angular/core';
import { switchMap } from 'rxjs';
import { RegistrarService } from 'src/app/registrar/registrar.service';
import {
IpAllowListItem,
RegistrarService,
SecuritySettings,
SecuritySettingsBackendModel,
} from 'src/app/registrar/registrar.service';
import { BackendService } from 'src/app/shared/services/backend.service';
export interface ipAllowListItem {
value: string;
}
export interface SecuritySettings {
clientCertificate?: string;
failoverClientCertificate?: string;
ipAddressAllowList?: Array<ipAllowListItem>;
}
export interface SecuritySettingsBackendModel {
clientCertificate?: string;
failoverClientCertificate?: string;
ipAddressAllowList?: Array<string>;
}
export function apiToUiConverter(
securitySettings: SecuritySettingsBackendModel = {}
): SecuritySettings {
@@ -48,7 +38,7 @@ export function uiToApiConverter(
return Object.assign({}, securitySettings, {
ipAddressAllowList: (securitySettings.ipAddressAllowList || [])
.filter((s) => s.value)
.map((ipAllowItem: ipAllowListItem) => ipAllowItem.value),
.map((ipAllowItem: IpAllowListItem) => ipAllowItem.value),
});
}
@@ -58,6 +48,7 @@ export function uiToApiConverter(
export class SecurityService {
securitySettings: SecuritySettings = {};
isEditingSecurity: boolean = false;
isEditingPassword: boolean = false;
constructor(
private backend: BackendService,
@@ -76,4 +67,6 @@ export class SecurityService {
})
);
}
saveEppPassword() {}
}
@@ -15,13 +15,12 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { RegistrarService } from 'src/app/registrar/registrar.service';
import {
SecurityService,
IpAllowListItem,
RegistrarService,
SecuritySettings,
apiToUiConverter,
ipAllowListItem,
} from './security.service';
} from 'src/app/registrar/registrar.service';
import { SecurityService, apiToUiConverter } from './security.service';
@Component({
selector: 'app-security-edit',
@@ -58,7 +57,7 @@ export default class SecurityEditComponent {
this.securityService.isEditingSecurity = false;
}
removeIpEntry(ip: ipAllowListItem) {
removeIpEntry(ip: IpAllowListItem) {
this.dataSource.ipAddressAllowList =
this.dataSource.ipAddressAllowList?.filter((item) => item !== ip);
}
@@ -15,11 +15,11 @@
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, catchError, of, throwError } from 'rxjs';
import { SecuritySettingsBackendModel } from 'src/app/settings/security/security.service';
import { DomainListResult } from 'src/app/domains/domainList.service';
import {
Registrar,
SecuritySettingsBackendModel,
WhoisRegistrarFields,
} from '../../registrar/registrar.service';
import { Contact } from '../../settings/contact/contact.service';
+2 -2
View File
@@ -130,7 +130,6 @@ dependencies {
testRuntimeOnly files(sourceSets.test.resources.srcDirs)
implementation deps['com.beust:jcommander']
implementation deps['com.github.ben-manes.caffeine:caffeine']
implementation deps['com.google.api:gax']
implementation deps['com.google.api.grpc:proto-google-common-protos']
@@ -200,7 +199,6 @@ dependencies {
implementation deps['javax.persistence:javax.persistence-api']
implementation deps['jakarta.servlet:jakarta.servlet-api']
implementation deps['javax.xml.bind:jaxb-api']
implementation deps['jline:jline']
implementation deps['joda-time:joda-time']
implementation deps['org.apache.avro:avro']
testImplementation deps['org.apache.beam:beam-runners-core-construction-java']
@@ -226,6 +224,8 @@ dependencies {
testImplementation deps['com.fasterxml.jackson.core:jackson-databind']
implementation deps['org.hibernate:hibernate-core']
implementation deps['org.hibernate:hibernate-hikaricp']
implementation deps['org.jcommander:jcommander']
implementation deps['org.jline:jline']
implementation deps['org.joda:joda-money']
implementation deps['org.json:json']
implementation deps['org.jsoup:jsoup']
+122 -128
View File
@@ -7,8 +7,6 @@ args4j:args4j:2.0.23=soy
args4j:args4j:2.0.26=css
args4j:args4j:2.33=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
cglib:cglib-nodep:2.2=css
com.101tec:zkclient:0.10=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.beust:jcommander:1.60=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.charleskorn.kaml:kaml:0.20.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.16.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.16.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -39,66 +37,66 @@ com.google.api-client:google-api-client-jackson2:2.0.1=compileClasspath,deploy_j
com.google.api-client:google-api-client-java6:2.1.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api-client:google-api-client-servlet:2.4.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:1.35.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.172.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.172.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.108.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.12.20=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.30.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.172.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.172.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.109.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.16.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.32.1-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.173.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.173.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.108.5=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.12.22=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.32.1-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.37.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.173.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.173.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.109.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.16.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:1.64.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.34.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.108.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.12.20=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1:2.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1beta1:2.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-executor-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.127.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.127.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.36.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:api-common:2.28.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.45.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.45.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.36.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.108.5=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.12.22=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1:2.41.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1beta2:2.41.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-executor-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.32.1-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.41.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.131.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.131.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.37.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.32.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:api-common:2.29.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.46.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.46.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-admin-directory:directory_v1-rev20240304-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-appengine:v1-rev20240226-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20230812-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20230806-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20240124-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20240128-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dataflow:v1b3-rev20240113-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dns:v2beta1-rev99-1.25.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-drive:v2-rev393-1.25.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-gmail:v1-rev20231218-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-groupssettings:v1-rev20210624-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-healthcare:v1-rev20240110-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-healthcare:v1-rev20240130-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-iamcredentials:v1-rev20211203-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-monitoring:v3-rev20240303-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-pubsub:v1-rev20220904-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sheets:v4-rev20230815-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sheets:v4-rev20240319-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sqladmin:v1beta4-rev20240304-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240307-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.25=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240205-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.26=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.26=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.26=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.26=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
@@ -112,35 +110,35 @@ com.google.closure-stylesheets:closure-stylesheets:1.5.0=css
com.google.cloud.bigdataoss:gcsio:2.2.16=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:util:2.2.16=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigtable:bigtable-client-core-config:1.28.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.17.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.17.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable-stats:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.35.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.35.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.35.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.16.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.18.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.17.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable-stats:2.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.32.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.32.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.16.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:1.82.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-monitoring:3.34.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-nio:0.127.14=testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.126.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsublite:1.12.20=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-secretmanager:2.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.56.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.36.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:3.36.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-nio:0.127.15=testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.126.5=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsublite:1.12.22=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-secretmanager:2.41.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.58.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.32.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.41.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:grpc-gcp:1.5.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.16.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.16.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.1=css
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.7=css,soy
com.google.common.html.types:types:1.0.6=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51=annotationProcessor,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51.1=annotationProcessor,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
@@ -152,7 +150,7 @@ com.google.errorprone:error_prone_type_annotations:2.23.0=annotationProcessor,er
com.google.errorprone:javac-shaded:9-dev-r4023-3=annotationProcessor,testAnnotationProcessor
com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.escapevelocity:escapevelocity:0.9.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:1.12.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:23.5.26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger-system-backend:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:google-extensions:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -168,10 +166,10 @@ com.google.guava:guava:33.0.0-jre=annotationProcessor,testAnnotationProcessor
com.google.guava:guava:33.1.0-jre=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.gwt:gwt-user:2.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:1.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:1.43.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-appengine:1.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-gson:1.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-jackson2:1.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-jackson2:1.43.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-protobuf:1.43.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client:1.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.inject.extensions:guice-multibindings:4.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
@@ -179,8 +177,7 @@ com.google.inject:guice:4.1.0=compileClasspath,deploy_jar,nonprodCompileClasspat
com.google.inject:guice:5.1.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.inject:guice:7.0.0=soy
com.google.j2objc:j2objc-annotations:1.3=checkstyle,soy
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.javascript:closure-compiler-externs:v20160713=css
com.google.javascript:closure-compiler-unshaded:v20160713=css
com.google.javascript:closure-compiler:v20210505=closureCompiler
@@ -251,10 +248,6 @@ guru.nidi:graphviz-java-all-j2v8:0.18.1=testRuntimeClasspath
guru.nidi:graphviz-java:0.18.1=testRuntimeClasspath
info.picocli:picocli:4.6.2=checkstyle
io.apicurio:apicurio-registry-protobuf-schema-utilities:3.0.0.M2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.confluent:common-config:5.3.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.confluent:common-utils:5.3.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.confluent:kafka-avro-serializer:5.3.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.confluent:kafka-schema-registry-client:5.3.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.classgraph:classgraph:4.8.162=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.eisop:dataflow-errorprone:3.34.0-eisop1=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,deploy_jar,errorprone,nonprodAnnotationProcessor,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -268,11 +261,10 @@ io.grpc:grpc-googleapis:1.62.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspa
io.grpc:grpc-grpclb:1.62.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-inprocess:1.62.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-netty-shaded:1.62.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-netty:1.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf-lite:1.60.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-netty:1.61.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf-lite:1.62.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf:1.62.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-rls:1.62.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-rls:1.61.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-services:1.61.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-services:1.62.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-stub:1.62.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -305,6 +297,8 @@ io.opencensus:opencensus-exporter-stats-stackdriver:0.31.0=compileClasspath,depl
io.opencensus:opencensus-impl-core:0.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-impl:0.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-proto:0.2.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.outfoxx:swiftpoet:1.3.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
jakarta-regexp:jakarta-regexp:1.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -327,7 +321,6 @@ javax.servlet:servlet-api:2.5=compileClasspath,deploy_jar,nonprodCompileClasspat
javax.validation:validation-api:1.0.0.GA=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.xml.bind:jaxb-api:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.xml.bind:jaxb-api:2.4.0-b180830.0359=jaxb
jline:jline:1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
joda-time:joda-time:2.10.14=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
junit:junit:4.13.2=nonprodCompileClasspath,nonprodRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.arnx:nashorn-promise:0.1.1=testRuntimeClasspath
@@ -338,37 +331,37 @@ net.java.dev.javacc:javacc:4.1=css
net.java.dev.jna:jna:5.13.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
net.ltgt.gradle.incap:incap:0.2=annotationProcessor,testAnnotationProcessor
net.sf.saxon:Saxon-HE:10.6=checkstyle
org.antlr:antlr4-runtime:4.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.antlr:antlr4-runtime:4.9.3=checkstyle
org.apache.arrow:arrow-format:5.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:5.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:5.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-format:15.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:15.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:15.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.avro:avro:1.8.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-construction-java:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-direct-java:2.54.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-fn-execution:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-kafka:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.54.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-construction-java:2.54.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-direct-java:2.55.1=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-fn-execution:2.54.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.55.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-guava-32_1_2-jre:0.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-compress:1.24.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-csv:1.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-exec:1.3=testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.13.0=testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.14.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
org.apache.commons:commons-lang3:3.9=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
org.apache.commons:commons-text:1.11.0=testCompileClasspath,testRuntimeClasspath
org.apache.ftpserver:ftplet-api:1.2.0=testCompileClasspath,testRuntimeClasspath
org.apache.ftpserver:ftpserver-core:1.2.0=testCompileClasspath,testRuntimeClasspath
@@ -381,10 +374,10 @@ org.apache.sshd:sshd-scp:2.12.1=testCompileClasspath,testRuntimeClasspath
org.apache.sshd:sshd-sftp:2.12.1=testCompileClasspath,testRuntimeClasspath
org.apache.tomcat:tomcat-annotations-api:11.0.0-M18=testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.bouncycastle:bcpg-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.78=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.78=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.78=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.78=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.3=compileClasspath,nonprodCompileClasspath,testCompileClasspath
org.checkerframework:checker-compat-qual:2.5.5=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
@@ -397,17 +390,19 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,deploy_jar,nonpr
org.codehaus.mojo:animal-sniffer-annotations:1.23=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.easymock:easymock:3.0=css
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-webapp:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-http:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-io:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-security:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-server:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-session:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-util:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-xml:12.0.7=testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections-api:11.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections:11.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-webapp:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-http:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-io:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-security:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-server:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-session:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-util:12.0.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-xml:12.0.8=testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.11.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.11.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -428,6 +423,7 @@ org.javassist:javassist:3.28.0-GA=checkstyle
org.jboss.logging:jboss-logging:3.4.3.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jboss:jandex:2.4.2.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jcommander:jcommander:1.83=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-bom:1.4.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.6.10=annotationProcessor,testAnnotationProcessor
org.jetbrains.kotlin:kotlin-reflect:1.9.20=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
@@ -445,6 +441,7 @@ org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.0.1=deploy_jar,nonprodRun
org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.jetbrains:annotations:13.0=annotationProcessor,testAnnotationProcessor
org.jetbrains:annotations:17.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jline:jline:3.25.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.joda:joda-money:1.0.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.json:json:20160212=soy
org.json:json:20231013=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -482,7 +479,7 @@ org.ow2.asm:asm:7.0=soy
org.ow2.asm:asm:9.2=compileClasspath,nonprodCompileClasspath
org.ow2.asm:asm:9.6=deploy_jar,jacocoAnt,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
org.postgresql:postgresql:42.7.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.seleniumhq.selenium:selenium-api:3.141.59=testCompileClasspath,testRuntimeClasspath
@@ -501,9 +498,6 @@ org.slf4j:slf4j-api:2.0.12=compileClasspath,nonprodCompileClasspath,nonprodRunti
org.slf4j:slf4j-api:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.springframework:spring-core:5.3.27=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.springframework:spring-expression:5.3.27=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.springframework:spring-jcl:5.3.27=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.testcontainers:database-commons:1.19.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.testcontainers:jdbc:1.19.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.testcontainers:junit-jupiter:1.19.7=testCompileClasspath,testRuntimeClasspath
@@ -17,12 +17,21 @@ package google.registry.bsa;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Throwables.getStackTraceAsString;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static google.registry.bsa.BsaTransactions.bsaQuery;
import static google.registry.bsa.ReservedDomainsUtils.getAllReservedNames;
import static google.registry.bsa.ReservedDomainsUtils.isReservedDomain;
import static google.registry.bsa.persistence.BsaLabelUtils.isLabelBlocked;
import static google.registry.bsa.persistence.Queries.batchReadBsaLabelText;
import static google.registry.bsa.persistence.Queries.queryMissedRegisteredUnblockables;
import static google.registry.bsa.persistence.Queries.queryUnblockableDomainByLabels;
import static google.registry.model.tld.Tld.isEnrolledWithBsa;
import static google.registry.model.tld.Tlds.getTldEntitiesOfType;
import static google.registry.persistence.transaction.TransactionManagerFactory.replicaTm;
import static google.registry.request.Action.Method.GET;
import static google.registry.request.Action.Method.POST;
import static google.registry.util.BatchedStreams.toBatches;
import static javax.servlet.http.HttpServletResponse.SC_OK;
import com.google.common.base.Joiner;
@@ -38,9 +47,12 @@ import google.registry.bsa.api.UnblockableDomain;
import google.registry.bsa.api.UnblockableDomain.Reason;
import google.registry.bsa.persistence.DownloadScheduler;
import google.registry.bsa.persistence.Queries;
import google.registry.bsa.persistence.Queries.DomainLifeSpan;
import google.registry.config.RegistryConfig.Config;
import google.registry.model.ForeignKeyUtils;
import google.registry.model.domain.Domain;
import google.registry.model.tld.Tld;
import google.registry.model.tld.Tld.TldType;
import google.registry.persistence.VKey;
import google.registry.request.Action;
import google.registry.request.Response;
@@ -70,7 +82,6 @@ public class BsaValidateAction implements Runnable {
private final int transactionBatchSize;
private final Duration maxStaleness;
private final Clock clock;
private final BsaLock bsaLock;
private final Response response;
@Inject
@@ -81,7 +92,6 @@ public class BsaValidateAction implements Runnable {
@Config("bsaTxnBatchSize") int transactionBatchSize,
@Config("bsaValidationMaxStaleness") Duration maxStaleness,
Clock clock,
BsaLock bsaLock,
Response response) {
this.gcsClient = gcsClient;
this.idnChecker = idnChecker;
@@ -89,18 +99,13 @@ public class BsaValidateAction implements Runnable {
this.transactionBatchSize = transactionBatchSize;
this.maxStaleness = maxStaleness;
this.clock = clock;
this.bsaLock = bsaLock;
this.response = response;
}
@Override
public void run() {
try {
if (!bsaLock.executeWithLock(this::runWithinLock)) {
String message = "BSA validation did not run: another BSA related task is running";
logger.atInfo().log("%s.", message);
emailSender.sendNotification(message, /* body= */ "");
}
validate();
} catch (Throwable throwable) {
logger.atWarning().withCause(throwable).log("Failed to validate block lists.");
emailSender.sendNotification("BSA validation aborted", getStackTraceAsString(throwable));
@@ -110,21 +115,22 @@ public class BsaValidateAction implements Runnable {
response.setStatus(SC_OK);
}
/** Executes the validation action while holding the BSA lock. */
Void runWithinLock() {
/** Performs validation of BSA data in the database. */
void validate() {
Optional<String> downloadJobName =
bsaQuery(DownloadScheduler::fetchMostRecentDownloadJobIdIfCompleted);
if (downloadJobName.isEmpty()) {
logger.atInfo().log("Cannot validate: block list downloads not found.");
emailSender.sendNotification(
"BSA validation does not run: block list downloads not found", "");
return null;
return;
}
logger.atInfo().log("Validating BSA with latest download: %s", downloadJobName.get());
ImmutableList.Builder<String> errorsBuilder = new ImmutableList.Builder<>();
errorsBuilder.addAll(checkBsaLabels(downloadJobName.get()));
errorsBuilder.addAll(checkUnblockableDomains());
errorsBuilder.addAll(checkWronglyReportedUnblockableDomains());
errorsBuilder.addAll(checkMissingUnblockableDomains());
ImmutableList<String> errors = errorsBuilder.build();
@@ -136,7 +142,6 @@ public class BsaValidateAction implements Runnable {
emailValidationResults(resultSummary, downloadJobName.get(), errors);
}
logger.atInfo().log("%s (latest download: %s)", resultSummary, downloadJobName.get());
return null;
}
void emailValidationResults(String subject, String jobName, ImmutableList<String> results) {
@@ -173,7 +178,7 @@ public class BsaValidateAction implements Runnable {
return errors.build();
}
ImmutableList<String> checkUnblockableDomains() {
ImmutableList<String> checkWronglyReportedUnblockableDomains() {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
Optional<UnblockableDomain> lastRead = Optional.empty();
ImmutableList<UnblockableDomain> batch;
@@ -263,6 +268,84 @@ public class BsaValidateAction implements Runnable {
return labelsBuilder.build();
}
ImmutableList<String> checkMissingUnblockableDomains() {
DateTime now = clock.nowUtc();
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
errors.addAll(checkForMissingReservedUnblockables(now));
errors.addAll(checkForMissingRegisteredUnblockables(now));
return errors.build();
}
ImmutableList<String> checkForMissingRegisteredUnblockables(DateTime now) {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
ImmutableList<Tld> bsaEnabledTlds =
getTldEntitiesOfType(TldType.REAL).stream()
.filter(tld -> isEnrolledWithBsa(tld, now))
.collect(toImmutableList());
DateTime stalenessThreshold = now.minus(maxStaleness);
bsaEnabledTlds.stream()
.map(Tld::getTldStr)
.map(tld -> bsaQuery(() -> queryMissedRegisteredUnblockables(tld, now)))
.flatMap(ImmutableList::stream)
.filter(domainLifeSpan -> domainLifeSpan.creationTime().isBefore(stalenessThreshold))
.map(DomainLifeSpan::domainName)
.forEach(
domainName ->
errors.add(
String.format(
"Registered domain %s missing or not recorded as REGISTERED", domainName)));
return errors.build();
}
ImmutableList<String> checkForMissingReservedUnblockables(DateTime now) {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
try (Stream<ImmutableList<String>> reservedNames =
toBatches(
getAllReservedNames(now).filter(BsaValidateAction::isBlockedByBsa),
transactionBatchSize)) {
reservedNames
.map(this::checkOneBatchReservedDomainsForMissingUnblockables)
.forEach(errors::addAll);
}
return errors.build();
}
ImmutableList<String> checkOneBatchReservedDomainsForMissingUnblockables(
ImmutableList<String> batch) {
ImmutableSet<String> labels =
batch.stream()
.map(InternetDomainName::from)
.map(d -> d.parts().get(0))
.collect(toImmutableSet());
ImmutableMap<String, UnblockableDomain> persistedUnblockables =
bsaQuery(
() ->
queryUnblockableDomainByLabels(labels)
.collect(toImmutableMap(UnblockableDomain::domainName, x -> x)));
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
ImmutableSet<UnblockableDomain.Reason> acceptableReasons =
ImmutableSet.of(Reason.REGISTERED, Reason.RESERVED);
for (var domainName : batch) {
if (!persistedUnblockables.containsKey(domainName)) {
errors.add(String.format("Missing unblockable domain: %s is reserved.", domainName));
continue;
}
var unblockable = persistedUnblockables.get(domainName);
if (!acceptableReasons.contains(unblockable.reason())) {
errors.add(
String.format(
"Wrong unblockable reason: %s should be reserved or registered, found %s.",
domainName, unblockable.reason()));
}
}
return errors.build();
}
static boolean isBlockedByBsa(String domainInBsaEnrolledTld) {
InternetDomainName domainName = InternetDomainName.from(domainInBsaEnrolledTld);
return isLabelBlocked(domainName.parts().get(0));
}
static String parseBlockListLine(String line) {
int firstComma = line.indexOf(',');
checkArgument(firstComma > 0, "Invalid block list line: %s", line);
@@ -19,12 +19,14 @@ import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.bsa.BsaStringUtils.DOMAIN_SPLITTER;
import static google.registry.bsa.BsaTransactions.bsaQuery;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import google.registry.bsa.api.UnblockableDomain;
import google.registry.model.CreateAutoTimestamp;
import java.sql.Timestamp;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -66,6 +68,11 @@ public final class Queries {
.collect(toImmutableList());
}
public static Stream<UnblockableDomain> queryUnblockableDomainByLabels(
ImmutableCollection<String> labels) {
return queryBsaUnblockableDomainByLabels(labels).map(BsaUnblockableDomain::toUnblockableDomain);
}
static Stream<BsaUnblockableDomain> queryBsaUnblockableDomainByLabels(
ImmutableCollection<String> labels) {
return ((Stream<?>)
@@ -141,4 +148,55 @@ public final class Queries {
.setParameter("tlds", tlds)
.getResultList());
}
/**
* Finds all currently registered domains that match BSA labels but are not recorded as
* unblockable.
*
* @return The missing unblockables and their creation and deletion time.
*/
public static ImmutableList<DomainLifeSpan> queryMissedRegisteredUnblockables(
String tld, DateTime now) {
String sqlTemplate =
"""
SELECT l.domain_name, creation_time, deletion_time
FROM
(SELECT d.domain_name, d.creation_time, d.deletion_time
FROM
"Domain" d
JOIN
(SELECT concat(label, '.', :tld) AS domain_name from "BsaLabel") b
ON b.domain_name = d.domain_name
WHERE deletion_time > ':now') l
LEFT OUTER JOIN
(SELECT concat(label, '.', tld) as domain_name
FROM "BsaUnblockableDomain"
WHERE tld = :tld and reason = 'REGISTERED') r
ON l.domain_name = r.domain_name
WHERE r.domain_name is null;
""";
// Native query: Hibernate's setParameter wrongly converts DateTime to bytea
String sql = sqlTemplate.replace(":now", now.toString());
return ((Stream<?>)
tm().getEntityManager()
.createNativeQuery(sql)
.setParameter("tld", tld)
.getResultStream())
.map(Object[].class::cast)
.map(
row ->
new DomainLifeSpan(
(String) row[0],
toDateTime((Timestamp) row[1]),
toDateTime((Timestamp) row[2])))
.collect(toImmutableList());
}
// For testing convenience: 'assertEquals' fails between `new DateTime(timestamp)` and below.
static DateTime toDateTime(Timestamp timestamp) {
return new DateTime(timestamp.getTime(), UTC);
}
public record DomainLifeSpan(String domainName, DateTime creationTime, DateTime deletionTime) {}
}
@@ -7,8 +7,8 @@
<sessions-enabled>true</sessions-enabled>
<instance-class>B4_1G</instance-class>
<basic-scaling>
<max-instances>100</max-instances>
<idle-timeout>10m</idle-timeout>
<max-instances>3</max-instances>
<idle-timeout>60m</idle-timeout>
</basic-scaling>
<system-properties>
@@ -7,8 +7,8 @@
<sessions-enabled>true</sessions-enabled>
<instance-class>B4</instance-class>
<basic-scaling>
<max-instances>100</max-instances>
<idle-timeout>10m</idle-timeout>
<max-instances>3</max-instances>
<idle-timeout>60m</idle-timeout>
</basic-scaling>
<system-properties>
@@ -42,7 +42,7 @@ public final class StaticPremiumListPricingEngine implements PremiumPricingEngin
tld.getPremiumListName().flatMap(pl -> PremiumListDao.getPremiumPrice(pl, label));
return DomainPrices.create(
premiumPrice.isPresent(),
premiumPrice.orElse(tld.getCreateBillingCost()),
premiumPrice.orElse(tld.getCreateBillingCost(priceTime)),
premiumPrice.orElse(tld.getStandardRenewCost(priceTime)));
}
}
@@ -74,7 +74,6 @@ import google.registry.tldconfig.idn.IdnTableEnum;
import google.registry.util.Idn;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
@@ -138,10 +137,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
try {
String thisYaml = mapper.writeValueAsString(this);
String otherYaml = mapper.writeValueAsString(tldToCompare);
// Since Jackson uses getters and not field values to construct the YAML representation, an
// explicit check of the createBillingCostTransitions is necessary since this field is
// auto-populated in the getter when the field is set to null.
return thisYaml.equals(otherYaml) && createBillingCostTransitionsEqual(tldToCompare);
return thisYaml.equals(otherYaml);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
@@ -465,6 +461,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
// TODO(sarahbot@): Remove this field and make createBillingCostTransitions not-null once all TLDs
// are populated with a create cost transition map
/** The per-year billing cost for registering a new domain name. */
@Deprecated
@Type(type = JodaMoneyType.TYPE_NAME)
@Columns(
columns = {
@@ -473,11 +470,13 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
})
Money createBillingCost = DEFAULT_CREATE_BILLING_COST;
// TODO(sarahbot@): Make this field not null and add a default value once field is populated on
// all existing TLDs
// TODO(sarahbot@): Make this field not null in the database
// TODO(sarahbot@): Rename this field to createBillingCost once the old createBillingCost has been
// removed
/** A property that transitions to different create billing costs at different times. */
@JsonDeserialize(using = TimedTransitionPropertyMoneyDeserializer.class)
TimedTransitionProperty<Money> createBillingCostTransitions;
TimedTransitionProperty<Money> createBillingCostTransitions =
TimedTransitionProperty.withInitialValue(DEFAULT_CREATE_BILLING_COST);
/** The one-time billing cost for restoring a domain name from the redemption grace period. */
@Type(type = JodaMoneyType.TYPE_NAME)
@@ -684,24 +683,20 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
* domain create.
*/
@VisibleForTesting
public Money getCreateBillingCost(DateTime now) {
return createBillingCostTransitions.getValueAtTime(now);
}
// This getter is still necessary for the Jackson deserialization in the ConfigureTldCommand
// TODO(sarahbot@): Remove this getter once the deprecated createBillingCost field is removed from
// the schema
@Deprecated
public Money getCreateBillingCost() {
return createBillingCost;
}
public ImmutableSortedMap<DateTime, Money> getCreateBillingCostTransitions() {
return Objects.requireNonNullElseGet(
createBillingCostTransitions,
() -> TimedTransitionProperty.withInitialValue(getCreateBillingCost()))
.toValueMap();
}
public boolean createBillingCostTransitionsEqual(Tld newTld) {
if (createBillingCostTransitions == null) {
return false;
}
return createBillingCostTransitions
.toValueMap()
.equals(newTld.getCreateBillingCostTransitions());
return createBillingCostTransitions.toValueMap();
}
/**
@@ -1171,16 +1166,14 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
// and cloned it into a new builder, to block re-building a Tld in an invalid state.
instance.tldStateTransitions.checkValidity();
// TODO(sarahbot@): Remove null check when createBillingCostTransitions field is made not-null
if (instance.createBillingCostTransitions != null) {
instance.createBillingCostTransitions.checkValidity();
}
checkArgumentNotNull(
instance.getCreateBillingCostTransitions(),
"CreateBillingCostTransitions cannot be null");
instance.createBillingCostTransitions.checkValidity();
instance.renewBillingCostTransitions.checkValidity();
instance.eapFeeSchedule.checkValidity();
// All costs must be in the expected currency.
checkArgumentNotNull(instance.getCurrency(), "Currency must be set");
checkArgument(
instance.getCreateBillingCost().getCurrencyUnit().equals(instance.currency),
"Create cost must be in the tld's currency");
checkArgument(
instance.getRestoreBillingCost().getCurrencyUnit().equals(instance.currency),
"Restore cost must be in the TLD's currency");
@@ -1195,6 +1188,9 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
checkArgument(
instance.getRenewBillingCostTransitions().values().stream().allMatch(currencyCheck),
"Renew cost must be in the TLD's currency");
checkArgument(
instance.getCreateBillingCostTransitions().values().stream().allMatch(currencyCheck),
"Create cost must be in the TLD's currency");
checkArgument(
instance.eapFeeSchedule.toValueMap().values().stream().allMatch(currencyCheck),
"All EAP fees must be in the TLD's currency");
@@ -25,11 +25,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.CharMatcher;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Sets;
import com.google.common.collect.Sets.SetView;
import com.google.common.flogger.FluentLogger;
import google.registry.model.common.TimedTransitionProperty;
import google.registry.model.tld.Tld;
import google.registry.model.tld.label.PremiumList;
import google.registry.model.tld.label.PremiumListDao;
@@ -43,11 +41,9 @@ import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.inject.Inject;
import javax.inject.Named;
import org.joda.money.CurrencyUnit;
@@ -123,9 +119,7 @@ public class ConfigureTldCommand extends MutatingCommand {
checkName(name, tldData);
Tld oldTld = getTlds().contains(name) ? Tld.get(name) : null;
checkForMissingFields(
Stream.concat(tldData.keySet().stream(), Stream.of("createBillingCostTransitions"))
.collect(toImmutableSet()));
checkForMissingFields(tldData.keySet().stream().collect(toImmutableSet()));
Tld newTld = mapper.readValue(inputFile.toFile(), Tld.class);
if (oldTld != null) {
oldTldInBreakGlass = oldTld.getBreakglassMode();
@@ -156,14 +150,6 @@ public class ConfigureTldCommand extends MutatingCommand {
checkPremiumList(newTld);
checkDnsWriters(newTld);
checkCurrency(newTld);
// TODO(sarahbot@): Remove this once the createBillingCost field is removed
checkArgument(
Objects.equals(
TimedTransitionProperty.fromValueMap(newTld.getCreateBillingCostTransitions())
.getValueAtTime(clock.nowUtc()),
newTld.getCreateBillingCost()),
"The createBillingCostTransitions map must have the same current cost as the"
+ " createBillingCost field");
// bsaEnrollStartTime only exists in DB. Need to carry it over to the updated copy. See Tld.java
// for more information.
Optional<DateTime> bsaEnrollTime =
@@ -259,9 +245,6 @@ public class ConfigureTldCommand extends MutatingCommand {
private void checkCurrency(Tld newTld) {
CurrencyUnit currencyUnit = newTld.getCurrency();
checkArgument(
currencyUnit.equals(newTld.getCreateBillingCost().getCurrencyUnit()),
"createBillingCost must use the same currency as the TLD");
checkArgument(
currencyUnit.equals(newTld.getRestoreBillingCost().getCurrencyUnit()),
"restoreBillingCost must use the same currency as the TLD");
@@ -271,19 +254,38 @@ public class ConfigureTldCommand extends MutatingCommand {
checkArgument(
currencyUnit.equals(newTld.getRegistryLockOrUnlockBillingCost().getCurrencyUnit()),
"registryLockOrUnlockBillingCost must use the same currency as the TLD");
ImmutableSortedMap<DateTime, Money> renewBillingCostTransitions =
newTld.getRenewBillingCostTransitions();
for (Money renewBillingCost : renewBillingCostTransitions.values()) {
checkArgument(
renewBillingCost.getCurrencyUnit().equals(currencyUnit),
"All Money values in the renewBillingCostTransitions map must use the TLD's currency"
+ " unit");
}
ImmutableSortedMap<DateTime, Money> eapFeeSchedule = newTld.getEapFeeScheduleAsMap();
for (Money eapFee : eapFeeSchedule.values()) {
checkArgument(
eapFee.getCurrencyUnit().equals(currencyUnit),
"All Money values in the eapFeeSchedule map must use the TLD's currency unit");
}
ImmutableSet<CurrencyUnit> currencies =
newTld.getRenewBillingCostTransitions().values().stream()
.map(Money::getCurrencyUnit)
.distinct()
.collect(toImmutableSet());
checkArgument(
currencies.size() == 1 && currencies.contains(currencyUnit),
"All Money values in the renewBillingCostTransitions map must use the TLD's currency unit"
+ " %s. Found %s currency unit(s) in the renewBillingCostTransitionsMap",
currencyUnit,
currencies);
ImmutableSet<CurrencyUnit> createCurrencies =
newTld.getCreateBillingCostTransitions().values().stream()
.map(Money::getCurrencyUnit)
.distinct()
.collect(toImmutableSet());
checkArgument(
createCurrencies.size() == 1 && createCurrencies.contains(currencyUnit),
"All Money values in the createBillingCostTransitions map must use the TLD's currency unit"
+ " %s. Found %s currency unit(s) in the createBillingCostTransitionsMap",
currencyUnit,
createCurrencies);
ImmutableSet<CurrencyUnit> eapCurrencies =
newTld.getEapFeeScheduleAsMap().values().stream()
.map(Money::getCurrencyUnit)
.distinct()
.collect(toImmutableSet());
checkArgument(
eapCurrencies.size() == 1 && eapCurrencies.contains(currencyUnit),
"All Money values in the eapFeeSchedule map must use the TLD's currency unit"
+ " %s. Found %s currency unit(s) in the eapFeeSchedule",
currencyUnit,
eapCurrencies);
}
}
@@ -16,14 +16,12 @@ package google.registry.tools;
import static com.google.common.base.StandardSystemProperty.USER_HOME;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static java.nio.charset.StandardCharsets.US_ASCII;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterDescription;
import com.beust.jcommander.Parameters;
import com.google.auto.value.AutoValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Ascii;
import com.google.common.collect.ImmutableList;
@@ -32,28 +30,31 @@ import com.google.common.escape.Escaper;
import com.google.common.escape.Escapers;
import google.registry.util.Clock;
import google.registry.util.SystemClock;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.StreamTokenizer;
import java.io.StringReader;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import jline.Completor;
import jline.ConsoleReader;
import jline.ConsoleReaderInputStream;
import jline.FileNameCompletor;
import jline.History;
import org.jline.builtins.Completers.FileNameCompleter;
import org.jline.reader.Candidate;
import org.jline.reader.Completer;
import org.jline.reader.EndOfFileException;
import org.jline.reader.LineReader;
import org.jline.reader.LineReaderBuilder;
import org.jline.reader.ParsedLine;
import org.jline.reader.UserInterruptException;
import org.jline.reader.impl.LineReaderImpl;
import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
import org.jline.terminal.impl.DumbTerminal;
import org.joda.time.DateTime;
import org.joda.time.Duration;
@@ -87,87 +88,64 @@ public class ShellCommand implements Command {
* The runner we received in the constructor.
*
* <p>We might want to update this runner based on flags (e.g. --encapsulate_output), but these
* flags aren't available in the constructor so we have to do it in the {@link #run} function.
* flags aren't available in the constructor, so we have to do it in the {@link #run} function.
*/
private final CommandRunner originalRunner;
private final BufferedReader lineReader;
private final ConsoleReader consoleReader;
private final LineReader lineReader;
private final Clock clock;
private String prompt = null;
@Parameter(
names = {"--dont_exit_on_idle"},
description =
"Prevents the shell from exiting on PROD after the 1 hour idle delay. "
+ "Will instead warn you and require re-running the command.")
"""
Prevents the shell from exiting on PROD after the 1 hour idle delay.
Will instead warn you and require re-running the command.""")
boolean dontExitOnIdle = false;
@Parameter(
names = {"--encapsulate_output"},
description =
"Encapsulate command standard output and error by combining the two streams to standard "
+ "output and inserting a prefix ('out:' or 'err:') at the beginning of every line "
+ "of normal output and adding a line consisting of either 'SUCCESS' or "
+ "'FAILURE <exception-name> <error-message>' at the end of the output for a "
+ "command, allowing the output to be easily parsed by wrapper scripts.")
"""
Encapsulate command standard output and error by combining the two streams to
standard output and inserting a prefix ('out:' or 'err:') at the beginning of every
line of normal output and adding a line consisting of either 'SUCCESS' or
'FAILURE <exception-name> <error-message>' at the end of the output for a
command, allowing the output to be easily parsed by wrapper scripts.""")
boolean encapsulateOutput = false;
public ShellCommand(CommandRunner runner) throws IOException {
this.originalRunner = runner;
InputStream in = System.in;
if (System.console() != null) {
consoleReader = new ConsoleReader();
// There are 104 different commands. We want the threshold to be more than that
consoleReader.setAutoprintThreshhold(200);
consoleReader.setDefaultPrompt("nom > ");
consoleReader.setHistory(new History(new File(USER_HOME.value(), HISTORY_FILE)));
in = new ConsoleReaderInputStream(consoleReader);
} else {
consoleReader = null;
}
this.lineReader = new BufferedReader(new InputStreamReader(in, US_ASCII));
this.clock = new SystemClock();
ShellCommand(CommandRunner runner) throws IOException {
this(TerminalBuilder.terminal(), new SystemClock(), runner);
prompt = "nom > ";
lineReader.variable(LineReader.HISTORY_FILE, Path.of(USER_HOME.value(), HISTORY_FILE));
}
@VisibleForTesting
ShellCommand(BufferedReader bufferedReader, Clock clock, CommandRunner runner) {
ShellCommand(Terminal terminal, Clock clock, CommandRunner runner) {
this.originalRunner = runner;
this.lineReader = bufferedReader;
this.lineReader = LineReaderBuilder.builder().terminal(terminal).build();
this.clock = clock;
this.consoleReader = null;
}
private void setPrompt(RegistryToolEnvironment environment, boolean alert) {
if (consoleReader == null) {
// Do not set the prompt in tests.
if (lineReader.getTerminal() instanceof DumbTerminal) {
return;
}
if (alert) {
consoleReader.setDefaultPrompt(
String.format("nom@%s%s%s > ", ALERT_COLOR, environment, RESET));
} else {
consoleReader.setDefaultPrompt(
String.format(
"nom@%s%s%s > ", NON_ALERT_COLOR, Ascii.toLowerCase(environment.toString()), RESET));
}
prompt =
alert
? String.format("nom@%s%s%s > ", ALERT_COLOR, environment, RESET)
: String.format(
"nom@%s%s%s > ", NON_ALERT_COLOR, Ascii.toLowerCase(environment.toString()), RESET);
}
public ShellCommand buildCompletions(JCommander jcommander) {
if (consoleReader != null) {
@SuppressWarnings("unchecked")
ImmutableList<Completor> completors = ImmutableList.copyOf(consoleReader.getCompletors());
completors
.forEach(consoleReader::removeCompletor);
consoleReader.addCompletor(new JCommanderCompletor(jcommander));
}
((LineReaderImpl) lineReader).setCompleter(new JCommanderCompleter(jcommander));
return this;
}
private static class OutputEncapsulator implements CommandRunner {
private final CommandRunner runner;
private OutputEncapsulator(CommandRunner runner) {
this.runner = runner;
}
private record OutputEncapsulator(CommandRunner runner) implements CommandRunner {
/**
* Emit a success command separator.
@@ -233,26 +211,33 @@ public class ShellCommand implements Command {
// haven't been processed in the constructor.
CommandRunner runner =
encapsulateOutput ? new OutputEncapsulator(originalRunner) : originalRunner;
// On Production we want to be extra careful - to prevent accidental use.
// On Production, we want to be extra careful - to prevent accidental use.
boolean beExtraCareful = (RegistryToolEnvironment.get() == RegistryToolEnvironment.PRODUCTION);
setPrompt(RegistryToolEnvironment.get(), beExtraCareful);
String line;
DateTime lastTime = clock.nowUtc();
while ((line = getLine()) != null) {
while (true) {
try {
line = lineReader.readLine(prompt);
} catch (UserInterruptException | EndOfFileException e) {
break;
}
// Make sure we're not idle for too long. Only relevant when we're "extra careful"
if (!dontExitOnIdle
&& beExtraCareful
&& lastTime.plus(IDLE_THRESHOLD).isBefore(clock.nowUtc())) {
throw new RuntimeException(
"Been idle for too long, while in 'extra careful' mode. "
+ "The last command was saved in history. Please rerun the shell and try again.");
"""
Been idle for too long, while in 'extra careful' mode.
The last command was saved in history. Please rerun the shell and try again.""");
}
lastTime = clock.nowUtc();
String[] lineArgs = parseCommand(line);
if (lineArgs.length == 0) {
continue;
} else if (lineArgs.length == 1 && "exit".equals(lineArgs[0])) {
break;
}
try {
runner.run(lineArgs);
} catch (Exception e) {
@@ -265,14 +250,6 @@ public class ShellCommand implements Command {
}
}
private String getLine() {
try {
return lineReader.readLine();
} catch (IOException e) {
return null;
}
}
@VisibleForTesting
static String[] parseCommand(String line) {
ImmutableList.Builder<String> resultBuilder = new ImmutableList.Builder<>();
@@ -296,10 +273,10 @@ public class ShellCommand implements Command {
return resultBuilder.build().toArray(new String[0]);
}
static class JCommanderCompletor implements Completor {
static class JCommanderCompleter implements Completer {
private static final ParamDoc DEFAULT_PARAM_DOC =
ParamDoc.create("[No documentation available]", ImmutableList.of());
new ParamDoc("[No documentation available]", ImmutableList.of());
/**
* Documentation for all the known command + argument combinations.
@@ -320,7 +297,7 @@ public class ShellCommand implements Command {
*/
private final ImmutableTable<String, String, ParamDoc> commandFlagDocs;
private final FileNameCompletor filenameCompletor = new FileNameCompletor();
private final FileNameCompleter filenameCompleter = new FileNameCompleter();
/**
* Holds all the information about a parameter we need for completion.
@@ -332,15 +309,11 @@ public class ShellCommand implements Command {
*
* <p>For now - "all possible options" are only known for enum parameters.
*/
@AutoValue
abstract static class ParamDoc {
abstract String documentation();
abstract ImmutableList<String> options();
record ParamDoc(String documentation, ImmutableList<String> options) {
static ParamDoc create(@Nullable ParameterDescription parameter) {
if (parameter == null) {
return create("[None]", ImmutableList.of());
return new ParamDoc("[None]", ImmutableList.of());
}
String type = parameter.getParameterized().getGenericType().toString();
Class<?> clazz = parameter.getParameterized().getType();
@@ -350,31 +323,22 @@ public class ShellCommand implements Command {
Arrays.stream(clazz.getEnumConstants())
.map(Object::toString)
.collect(toImmutableList());
type = options.stream().collect(Collectors.joining(", "));
type = String.join(", ", options);
}
if (type.startsWith("class ")) {
type = type.substring(6);
}
return create(
String.format(
"%s\n (%s)",
parameter.getDescription(),
type),
options);
}
static ParamDoc create(String documentation, ImmutableList<String> options) {
return new AutoValue_ShellCommand_JCommanderCompletor_ParamDoc(documentation, options);
return new ParamDoc(String.format("%s\n (%s)", parameter.getDescription(), type), options);
}
}
/**
* Populates the completions and documentation based on the JCommander.
*
* The input data is copied, so changing the jcommander after creation of the
* JCommanderCompletor doesn't change the completions.
* <p>The input data is copied, so changing the jcommander after creation of the
* JCommanderCompleter doesn't change the completions.
*/
JCommanderCompletor(JCommander jcommander) {
JCommanderCompleter(JCommander jcommander) {
ImmutableTable.Builder<String, String, ParamDoc> builder = new ImmutableTable.Builder<>();
// Go over all the commands
@@ -383,7 +347,13 @@ public class ShellCommand implements Command {
JCommander subCommander = entry.getValue();
// Add the "main" parameters documentation
builder.put(command, "", ParamDoc.create(subCommander.getMainParameter()));
builder.put(
command,
"",
ParamDoc.create(
subCommander.getMainParameter() == null
? null
: subCommander.getMainParameterValue()));
// For each command - go over the parameters (arguments / flags)
for (ParameterDescription parameter : subCommander.getParameters()) {
@@ -399,53 +369,26 @@ public class ShellCommand implements Command {
}
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public int complete(String buffer, int location, List completions) {
// We just defer to the other function because of the warnings (the use of a naked List by
// jline)
return completeInternal(buffer, location, completions);
}
/**
* Given a string, finds all the possible completions to the end of that string.
*
* @param buffer the command line.
* @param location the location in the command line we want to complete
* @param completions a list to fill with the completion results
* @return the number of character back from the location that are part of the completions
*/
int completeInternal(String buffer, int location, List<String> completions) {
String truncatedBuffer = buffer.substring(0, location);
String[] parsedBuffer = parseCommand(truncatedBuffer);
int argumentIndex = parsedBuffer.length - 1;
if (argumentIndex < 0 || !truncatedBuffer.endsWith(parsedBuffer[argumentIndex])) {
argumentIndex += 1;
}
public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) {
int argumentIndex = line.wordIndex();
// The argument we want to complete (only partially written, might even be empty)
String partialArgument =
argumentIndex < parsedBuffer.length ? parsedBuffer[argumentIndex] : "";
int argumentStart = location - partialArgument.length();
String partialArgument = line.word();
// The command name. Null if we're at the first argument
String command = argumentIndex == 0 ? null : parsedBuffer[0];
String command = argumentIndex == 0 ? null : line.words().getFirst();
// The previous argument before it - used for context. Null if we're at the first argument
String previousArgument = argumentIndex <= 1 ? null : parsedBuffer[argumentIndex - 1];
String previousArgument = argumentIndex <= 1 ? null : line.words().get(argumentIndex - 1);
// If it's obviously a file path (starts with something "file path like") - complete as a file
if (partialArgument.startsWith("./")
|| partialArgument.startsWith("~/")
|| partialArgument.startsWith("/")) {
int offset =
filenameCompletor.complete(partialArgument, partialArgument.length(), completions);
if (offset >= 0) {
return argumentStart + offset;
}
return -1;
filenameCompleter.complete(reader, line, candidates);
}
// Complete based on flag data
completions.addAll(getCompletions(command, previousArgument, partialArgument));
return argumentStart;
getCompletions(command, previousArgument, partialArgument).stream()
.map(Candidate::new)
.forEach(candidates::add);
}
/**
@@ -453,7 +396,7 @@ public class ShellCommand implements Command {
*
* @param command the name of the command we're running. Null if not yet known (it is in 'word')
* @param context the previous argument for context. Null if we're the first.
* @param word the (partial) word to complete. Can be the command, if "command" is null, or any
* @param word the (partial) word to complete. Can be the command if "command" is null, or any
* "regular" argument, if "command" isn't null.
* @return list of all possible completions to 'word'
*/
@@ -488,19 +431,14 @@ public class ShellCommand implements Command {
}
private List<String> getCommandCompletions(String word) {
return commandFlagDocs
.rowKeySet()
.stream()
return commandFlagDocs.rowKeySet().stream()
.filter(s -> s.startsWith(word))
.map(s -> s + " ")
.collect(toImmutableList());
}
private List<String> getFlagCompletions(String command, String word) {
return commandFlagDocs
.row(command)
.keySet()
.stream()
return commandFlagDocs.row(command).keySet().stream()
.filter(s -> s.startsWith(word))
.map(s -> s + " ")
.collect(toImmutableList());
@@ -513,19 +451,15 @@ public class ShellCommand implements Command {
//
// We want documentation for a flag if the previous argument was a flag, but the value of the
// flag wasn't set. So if the previous argument is "--flag" then we want documentation of that
// flag, but if it's "--flag=value" then that flag is set and we want documentation of the
// flag, but if it's "--flag=value" then that flag is set, and we want documentation of the
// main parameters.
boolean isFlagParameter =
context != null
&& context.startsWith("-")
&& context.indexOf('=') == -1;
context != null && context.startsWith("-") && context.indexOf('=') == -1;
ParamDoc paramDoc =
Optional.ofNullable(commandFlagDocs.get(command, isFlagParameter ? context : ""))
.orElse(DEFAULT_PARAM_DOC);
if (!word.isEmpty()) {
return paramDoc
.options()
.stream()
return paramDoc.options().stream()
.filter(s -> s.startsWith(word))
.map(s -> s + " ")
.collect(toImmutableList());
@@ -548,10 +482,6 @@ public class ShellCommand implements Command {
private final byte[] prefix;
private final ByteArrayOutputStream lastLine = new ByteArrayOutputStream();
// Flag to keep track of whether the last character written was a newline. We initialize this
// to "true" because we always want the first line of output to be escaped with a leading space.
boolean lastWasNewline = true;
EncapsulatingOutputStream(OutputStream out, String identifier) {
super(out);
this.prefix = identifier.getBytes(UTF_8);
@@ -581,7 +511,7 @@ public class ShellCommand implements Command {
// (System.out)
}
/** Dump the accumulated last line of output, if there was one. */
/** Dump the accumulated last line of output if there was one. */
public void dumpLastLine() throws IOException {
if (lastLine.size() > 0) {
out.write(prefix);
@@ -35,9 +35,8 @@ public final class ParameterFactory implements IStringConverterFactory {
/** Returns JCommander converter for a given type, or {@code null} if none exists. */
@Nullable
@Override
@SuppressWarnings("unchecked")
public <T> Class<? extends IStringConverter<T>> getConverter(@Nullable Class<T> type) {
return (Class<? extends IStringConverter<T>>) CONVERTERS.get(type);
public Class<? extends IStringConverter<?>> getConverter(@Nullable Class<?> type) {
return CONVERTERS.get(type);
}
private static final ImmutableMap<Class<?>, Class<? extends IStringConverter<?>>> CONVERTERS =
@@ -53,4 +52,6 @@ public final class ParameterFactory implements IStringConverterFactory {
.put(Path.class, PathParameter.class)
.put(YearMonth.class, YearMonthParameter.class)
.build();
}
@@ -15,17 +15,23 @@
package google.registry.bsa;
import static com.google.common.base.Throwables.getStackTraceAsString;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
import static google.registry.bsa.persistence.BsaTestingUtils.persistDownloadSchedule;
import static google.registry.bsa.persistence.BsaTestingUtils.persistUnblockableDomain;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistActiveDomain;
import static google.registry.testing.DatabaseHelper.persistDeletedDomain;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.startsWith;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
@@ -43,13 +49,15 @@ import google.registry.bsa.persistence.BsaTestingUtils;
import google.registry.gcs.GcsUtils;
import google.registry.groups.GmailClient;
import google.registry.model.domain.Domain;
import google.registry.model.tld.label.ReservationType;
import google.registry.persistence.transaction.JpaTestExtensions;
import google.registry.persistence.transaction.JpaTestExtensions.JpaIntegrationWithCoverageExtension;
import google.registry.request.Response;
import google.registry.testing.FakeClock;
import google.registry.tldconfig.idn.IdnTableEnum;
import google.registry.util.EmailMessage;
import java.util.concurrent.Callable;
import java.util.Optional;
import java.util.stream.Stream;
import javax.mail.internet.InternetAddress;
import org.joda.time.DateTime;
import org.joda.time.Duration;
@@ -82,8 +90,6 @@ public class BsaValidateActionTest {
@Mock Response response;
@Mock private BsaLock bsaLock;
@Mock private InternetAddress emailRecipient;
@Captor ArgumentCaptor<EmailMessage> emailCaptor = ArgumentCaptor.forClass(EmailMessage.class);
@@ -104,7 +110,6 @@ public class BsaValidateActionTest {
/* transactionBatchSize= */ 500,
MAX_STALENESS,
fakeClock,
bsaLock,
response);
createTld("app");
}
@@ -269,7 +274,7 @@ public class BsaValidateActionTest {
persistUnblockableDomain(UnblockableDomain.of("label", "app", Reason.REGISTERED));
when(idnChecker.getAllValidIdns(anyString())).thenReturn(ImmutableSet.of(IdnTableEnum.JA));
assertThat(action.checkUnblockableDomains()).isEmpty();
assertThat(action.checkWronglyReportedUnblockableDomains()).isEmpty();
}
@Test
@@ -280,26 +285,95 @@ public class BsaValidateActionTest {
persistUnblockableDomain(UnblockableDomain.of("label", "app", Reason.RESERVED));
when(idnChecker.getAllValidIdns(anyString())).thenReturn(ImmutableSet.of(IdnTableEnum.JA));
assertThat(action.checkUnblockableDomains())
assertThat(action.checkWronglyReportedUnblockableDomains())
.containsExactly("label.app: should be REGISTERED, found RESERVED");
}
@Test
void notificationSent_cannotAcquireLock() {
when(bsaLock.executeWithLock(any())).thenReturn(false);
action.run();
verify(gmailClient, times(1))
.sendEmail(
EmailMessage.create(
"BSA validation did not run: another BSA related task is running",
"",
emailRecipient));
void checkForMissingReservedUnblockables_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistResource(
createTld("dev").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("registered-reserved");
persistBsaLabel("reserved-only");
persistBsaLabel("reserved-missing");
persistBsaLabel("invalid-in-app");
persistUnblockableDomain(UnblockableDomain.of("registered-reserved", "app", Reason.REGISTERED));
persistUnblockableDomain(UnblockableDomain.of("reserved-only", "app", Reason.RESERVED));
persistUnblockableDomain(UnblockableDomain.of("invalid-in-app", "dev", Reason.RESERVED));
createReservedList(
"rl",
Stream.of("registered-reserved", "reserved-only", "reserved-missing")
.collect(toImmutableMap(x -> x, x -> ReservationType.RESERVED_FOR_SPECIFIC_USE)));
addReservedListsToTld("app", ImmutableList.of("rl"));
ImmutableList<String> errors = action.checkForMissingReservedUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly("Missing unblockable domain: reserved-missing.app is reserved.");
}
@Test
void checkForMissingReservedUnblockablesInOneTld_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistResource(
createTld("dev").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("reserved-missing-in-app");
persistUnblockableDomain(
UnblockableDomain.of("reserved-missing-in-app", "dev", Reason.REGISTERED));
createReservedList(
"rl",
Stream.of("reserved-missing-in-app")
.collect(toImmutableMap(x -> x, x -> ReservationType.RESERVED_FOR_SPECIFIC_USE)));
addReservedListsToTld("app", ImmutableList.of("rl"));
addReservedListsToTld("dev", ImmutableList.of("rl"));
ImmutableList<String> errors = action.checkForMissingReservedUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly("Missing unblockable domain: reserved-missing-in-app.app is reserved.");
}
@Test
void checkForMissingReservedUnblockables_unblockedReservedNotReported() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
createReservedList(
"rl",
Stream.of("reserved-only")
.collect(toImmutableMap(x -> x, x -> ReservationType.RESERVED_FOR_SPECIFIC_USE)));
addReservedListsToTld("app", ImmutableList.of("rl"));
ImmutableList<String> errors = action.checkForMissingReservedUnblockables(fakeClock.nowUtc());
assertThat(errors).isEmpty();
}
@Test
void checkForMissingRegisteredUnblockables_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("registered");
persistBsaLabel("registered-missing");
persistUnblockableDomain(UnblockableDomain.of("registered", "app", Reason.REGISTERED));
persistUnblockableDomain(UnblockableDomain.of("registered-missing", "app", Reason.RESERVED));
persistActiveDomain("registered.app");
persistActiveDomain("registered-missing.app");
ImmutableList<String> errors = action.checkForMissingRegisteredUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly(
"Registered domain registered-missing.app missing or not recorded as REGISTERED");
}
@Test
void notificationSent_abortedByException() {
action = spy(action);
RuntimeException throwable = new RuntimeException("Error");
when(bsaLock.executeWithLock(any())).thenThrow(throwable);
doThrow(throwable).when(action).validate();
action.run();
verify(gmailClient, times(1))
.sendEmail(
@@ -309,12 +383,6 @@ public class BsaValidateActionTest {
@Test
void notificationSent_noDownloads() {
when(bsaLock.executeWithLock(any()))
.thenAnswer(
args -> {
args.getArgument(0, Callable.class).call();
return true;
});
action.run();
verify(gmailClient, times(1))
.sendEmail(
@@ -324,12 +392,6 @@ public class BsaValidateActionTest {
@Test
void notificationSent_withValidationError() {
when(bsaLock.executeWithLock(any()))
.thenAnswer(
args -> {
args.getArgument(0, Callable.class).call();
return true;
});
persistDownloadSchedule(DownloadStage.DONE);
action = spy(action);
doReturn(ImmutableList.of("Error line 1.", "Error line 2"))
@@ -347,12 +409,6 @@ public class BsaValidateActionTest {
@Test
void notification_notSent_WhenNoError() {
when(bsaLock.executeWithLock(any()))
.thenAnswer(
args -> {
args.getArgument(0, Callable.class).call();
return true;
});
persistDownloadSchedule(DownloadStage.DONE);
action = spy(action);
doReturn(ImmutableList.of()).when(action).checkBsaLabels(anyString());
@@ -28,7 +28,6 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.google.common.truth.Truth;
import google.registry.keyring.api.Keyring;
import google.registry.request.UrlConnectionService;
import google.registry.testing.FakeClock;
@@ -117,8 +116,7 @@ class BsaCredentialTest {
void fetchNewAuthToken_whenStatusIsNotOK_throwsRetriableException() throws Exception {
setupHttp();
when(connection.getResponseCode()).thenReturn(202);
Truth.assertThat(
assertThrows(BsaException.class, () -> credential.getAuthToken()).isRetriable())
assertThat(assertThrows(BsaException.class, () -> credential.getAuthToken()).isRetriable())
.isTrue();
}
@@ -21,18 +21,22 @@ import static google.registry.bsa.persistence.Queries.batchReadBsaLabelText;
import static google.registry.bsa.persistence.Queries.deleteBsaLabelByLabels;
import static google.registry.bsa.persistence.Queries.queryBsaLabelByLabels;
import static google.registry.bsa.persistence.Queries.queryBsaUnblockableDomainByLabels;
import static google.registry.bsa.persistence.Queries.queryMissedRegisteredUnblockables;
import static google.registry.bsa.persistence.Queries.queryNewlyCreatedDomains;
import static google.registry.bsa.persistence.Queries.queryUnblockablesByNames;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.testing.DatabaseHelper.createTlds;
import static google.registry.testing.DatabaseHelper.newDomain;
import static google.registry.testing.DatabaseHelper.persistActiveDomain;
import static google.registry.testing.DatabaseHelper.persistDomainAsDeleted;
import static google.registry.testing.DatabaseHelper.persistNewRegistrar;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import google.registry.bsa.api.UnblockableDomain;
import google.registry.bsa.persistence.BsaUnblockableDomain.Reason;
import google.registry.bsa.persistence.Queries.DomainLifeSpan;
import google.registry.persistence.transaction.JpaTestExtensions;
import google.registry.persistence.transaction.JpaTestExtensions.JpaIntegrationWithCoverageExtension;
import google.registry.testing.FakeClock;
@@ -200,16 +204,14 @@ class QueriesTest {
createTlds("tld");
persistNewRegistrar("TheRegistrar");
// time 0:
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
// time 0, deletion time 1
persistDomainAsDeleted(
newDomain("will-delete.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
fakeClock.advanceOneMilli();
// time 1
persistResource(
newDomain("d2.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d2.tld", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
// Now is time 2
assertThat(
@@ -226,16 +228,14 @@ class QueriesTest {
createTlds("tld");
persistNewRegistrar("TheRegistrar");
// time 0:
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
// time 0, deletion time 1
persistDomainAsDeleted(
newDomain("will-delete.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
fakeClock.advanceOneMilli();
// time 1
persistResource(
newDomain("d2.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d2.tld", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
// Now is time 2, ask for domains created since time 1
assertThat(
@@ -251,10 +251,8 @@ class QueriesTest {
DateTime testStartTime = fakeClock.nowUtc();
createTlds("tld", "tld2");
persistNewRegistrar("TheRegistrar");
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistResource(
newDomain("d2.tld2").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
persistActiveDomain("d2.tld2", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
assertThat(
bsaQuery(
@@ -263,4 +261,38 @@ class QueriesTest {
ImmutableList.of("tld"), testStartTime, fakeClock.nowUtc())))
.containsExactly("d1.tld");
}
@Test
void queryMissedRegisteredUnblockables_success() {
createTlds("tld", "tld2");
persistNewRegistrar("TheRegistrar");
DateTime time1 = fakeClock.nowUtc();
persistActiveDomain("unblocked1.tld", fakeClock.nowUtc());
persistActiveDomain("unblocked2.tld2", fakeClock.nowUtc());
persistActiveDomain("label1.tld", fakeClock.nowUtc());
persistActiveDomain("label2.tld2", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
DateTime time2 = fakeClock.nowUtc();
persistDomainAsDeleted(
newDomain("label3.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
// Deleted in the future
persistDomainAsDeleted(
newDomain("label3.tld2").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusHours(1));
fakeClock.advanceOneMilli();
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld", fakeClock.nowUtc())))
.containsExactly(new DomainLifeSpan("label1.tld", time1, END_OF_TIME));
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld2", fakeClock.nowUtc())))
.containsExactly(
new DomainLifeSpan("label2.tld2", time1, END_OF_TIME),
new DomainLifeSpan("label3.tld2", time2, time2.plusHours(1)));
BsaTestingUtils.persistUnblockableDomain(
UnblockableDomain.of("label2", "tld2", UnblockableDomain.Reason.REGISTERED));
BsaTestingUtils.persistUnblockableDomain(
UnblockableDomain.of("label3", "tld2", UnblockableDomain.Reason.RESERVED));
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld2", fakeClock.nowUtc())))
.containsExactly(new DomainLifeSpan("label3.tld2", time2, time2.plusHours(1)));
}
}
@@ -14,6 +14,7 @@
package google.registry.flows;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.model.EppResourceUtils.loadByForeignKey;
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
import static google.registry.model.eppoutput.Result.Code.SUCCESS_AND_CLOSE;
@@ -35,7 +36,6 @@ import static org.joda.money.CurrencyUnit.USD;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Ordering;
import com.google.common.truth.Truth;
import com.google.re2j.Matcher;
import com.google.re2j.Pattern;
import google.registry.model.billing.BillingBase.Reason;
@@ -494,8 +494,7 @@ class EppLifecycleDomainTest extends EppTestCase {
// Make sure that in the future, the domain expiration is unchanged after deletion
Domain clonedDomain = domain.cloneProjectedAtTime(deleteTime.plusYears(5));
Truth.assertThat(clonedDomain.getRegistrationExpirationTime())
.isEqualTo(createTime.plusYears(2));
assertThat(clonedDomain.getRegistrationExpirationTime()).isEqualTo(createTime.plusYears(2));
}
@Test
@@ -751,7 +751,8 @@ class DomainCheckFlowTest extends ResourceCheckFlowTestCase<DomainCheckFlow, Dom
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -1344,7 +1345,12 @@ class DomainCheckFlowTest extends ResourceCheckFlowTestCase<DomainCheckFlow, Dom
// Note that the response xml expects to see "11.10" with two digits after the decimal point.
// This works because Money.getAmount(), used in the flow, returns a BigDecimal that is set to
// display the number of digits that is conventional for the given currency.
persistResource(Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 11.1)).build());
persistResource(
Tld.get("tld")
.asBuilder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 11.1)))
.build());
setEppInput("domain_check_fee_fractional.xml");
runFlowAssertResponse(loadFile("domain_check_fee_fractional_response.xml"));
}
@@ -134,7 +134,8 @@ public class DomainClaimsCheckFlowTest extends ResourceFlowTestCase<DomainClaims
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -1086,7 +1086,12 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
@Test
void testFailure_wrongFeeAmount_v06() {
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6", "CURRENCY", "USD"));
persistResource(Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build());
persistResource(
Tld.get("tld")
.asBuilder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 20)))
.build());
persistContactsAndHosts();
EppException thrown = assertThrows(FeesMismatchException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
@@ -1107,7 +1112,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 8))
.setCreateBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 8)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6", "CURRENCY", "USD"));
@@ -1134,7 +1139,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 100))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 100)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6", "CURRENCY", "USD"));
@@ -1146,7 +1152,12 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
@Test
void testFailure_wrongFeeAmount_v11() {
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.11", "CURRENCY", "USD"));
persistResource(Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build());
persistResource(
Tld.get("tld")
.asBuilder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 20)))
.build());
persistContactsAndHosts();
EppException thrown = assertThrows(FeesMismatchException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
@@ -1167,7 +1178,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 8))
.setCreateBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 8)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.11", "CURRENCY", "USD"));
@@ -1194,7 +1205,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 100))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 100)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.11", "CURRENCY", "USD"));
@@ -1206,7 +1218,12 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
@Test
void testFailure_wrongFeeAmount_v12() {
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12", "CURRENCY", "USD"));
persistResource(Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build());
persistResource(
Tld.get("tld")
.asBuilder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 20)))
.build());
persistContactsAndHosts();
EppException thrown = assertThrows(FeesMismatchException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
@@ -1227,7 +1244,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 8))
.setCreateBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 8)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12", "CURRENCY", "USD"));
@@ -1254,7 +1271,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setDefaultPromoTokens(ImmutableList.of(defaultToken.createVKey()))
.setCreateBillingCost(Money.of(USD, 100))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 100)))
.build());
// Expects fee of $26
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12", "CURRENCY", "USD"));
@@ -2981,7 +2999,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -186,7 +186,8 @@ class DomainFlowUtilsTest extends ResourceFlowTestCase<DomainInfoFlow, Domain> {
.asBuilder()
.setTldType(tldType)
.setCurrency(CHF)
.setCreateBillingCost(Money.ofMajor(CHF, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800)))
@@ -51,7 +51,6 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Iterables;
import com.google.common.truth.Truth;
import google.registry.flows.EppException;
import google.registry.flows.EppRequestSource;
import google.registry.flows.FlowUtils.NotLoggedInException;
@@ -1033,7 +1032,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
Tld.get("tld")
.asBuilder()
.setCurrency(EUR)
.setCreateBillingCost(Money.of(EUR, 13))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13)))
.setRestoreBillingCost(Money.of(EUR, 11))
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
@@ -1052,7 +1052,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
Tld.get("tld")
.asBuilder()
.setCurrency(EUR)
.setCreateBillingCost(Money.of(EUR, 13))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13)))
.setRestoreBillingCost(Money.of(EUR, 11))
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
@@ -1071,7 +1072,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
Tld.get("tld")
.asBuilder()
.setCurrency(EUR)
.setCreateBillingCost(Money.of(EUR, 13))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13)))
.setRestoreBillingCost(Money.of(EUR, 11))
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
@@ -1114,7 +1116,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -1344,7 +1347,7 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
// We still need to verify that the bulk token is removed as it's not being tested as a part of
// doSuccessfulTest
Domain domain = reloadResourceByForeignKey();
Truth.assertThat(domain.getCurrentBulkToken()).isEmpty();
assertThat(domain.getCurrentBulkToken()).isEmpty();
}
@Test
@@ -559,7 +559,8 @@ class DomainRestoreRequestFlowTest extends ResourceFlowTestCase<DomainRestoreReq
Tld.get("tld")
.asBuilder()
.setCurrency(EUR)
.setCreateBillingCost(Money.of(EUR, 13))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13)))
.setRestoreBillingCost(Money.of(EUR, 11))
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
@@ -702,7 +703,8 @@ class DomainRestoreRequestFlowTest extends ResourceFlowTestCase<DomainRestoreReq
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -1070,7 +1070,8 @@ class DomainTransferRequestFlowTest
Tld.get("tld")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.ofMajor(JPY, 800))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
.setRenewBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800)))
@@ -14,11 +14,11 @@
package google.registry.model.console;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static org.junit.jupiter.api.Assertions.assertThrows;
import com.google.common.truth.Truth;
import google.registry.model.EntityTestCase;
import org.junit.jupiter.api.Test;
@@ -57,10 +57,10 @@ public class UserDaoTest extends EntityTestCase {
UserDao.saveUser(user);
User fromDb = UserDao.loadUser("email@email.com").get();
// nonexistent one should never exist
Truth.assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
// now try deleting the one that does exist
tm().transact(() -> tm().delete(fromDb));
Truth.assertThat(UserDao.loadUser("email@email.com")).isEmpty();
assertThat(UserDao.loadUser("email@email.com")).isEmpty();
}
@Test
@@ -65,7 +65,8 @@ class RegistrarTest extends EntityTestCase {
newTld("xn--q9jyb4c", "MINNA")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.of(JPY, new BigDecimal(1300)))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(JPY, new BigDecimal(1300))))
.setRestoreBillingCost(Money.of(JPY, new BigDecimal(1700)))
.setServerStatusChangeBillingCost(Money.of(JPY, new BigDecimal(1900)))
.setRegistryLockOrUnlockBillingCost(Money.of(JPY, new BigDecimal(2700)))
@@ -223,14 +223,6 @@ public final class TldTest extends EntityTestCase {
.isFalse();
}
@Test
void testSettingCreateBillingCost() {
Tld registry = Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 42)).build();
assertThat(registry.getCreateBillingCost()).isEqualTo(Money.of(USD, 42));
// The default value of 17 is set in createTld().
assertThat(registry.getRestoreBillingCost()).isEqualTo(Money.of(USD, 17));
}
@Test
void testSetCreateBillingCostTransitions() {
ImmutableSortedMap<DateTime, Money> createCostTransitions =
@@ -246,6 +238,10 @@ public final class TldTest extends EntityTestCase {
Tld registry =
Tld.get("tld").asBuilder().setCreateBillingCostTransitions(createCostTransitions).build();
assertThat(registry.getCreateBillingCostTransitions()).isEqualTo(createCostTransitions);
assertThat(registry.getCreateBillingCost(fakeClock.nowUtc().minus(Duration.standardDays(5))))
.isEqualTo(Money.of(USD, 8));
assertThat(registry.getCreateBillingCost(fakeClock.nowUtc().plusMonths(8)))
.isEqualTo(Money.of(USD, 3));
}
@Test
@@ -275,7 +271,7 @@ public final class TldTest extends EntityTestCase {
void testSettingRestoreBillingCost() {
Tld registry = Tld.get("tld").asBuilder().setRestoreBillingCost(Money.of(USD, 42)).build();
// The default value of 13 is set in createTld().
assertThat(registry.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(registry.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
assertThat(registry.getRestoreBillingCost()).isEqualTo(Money.of(USD, 42));
}
@@ -595,7 +591,13 @@ public final class TldTest extends EntityTestCase {
void testFailure_pricingEngineIsRequired() {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class, () -> new Tld.Builder().setTldStr("invalid").build());
IllegalArgumentException.class,
() ->
new Tld.Builder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 13)))
.setTldStr("invalid")
.build());
assertThat(thrown)
.hasMessageThat()
.contains("All registries must have a configured pricing engine");
@@ -680,8 +682,13 @@ public final class TldTest extends EntityTestCase {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class,
() -> Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(EUR, 42)).build());
assertThat(thrown).hasMessageThat().contains("cost must be in the tld's currency");
() ->
Tld.get("tld")
.asBuilder()
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 42)))
.build());
assertThat(thrown).hasMessageThat().contains("cost must be in the TLD's currency");
}
@Test
@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
import com.google.common.truth.Truth;
import google.registry.model.ImmutableObject;
import google.registry.persistence.VKey;
import google.registry.persistence.transaction.JpaTestExtensions.JpaUnitTestExtension;
@@ -328,10 +327,10 @@ public class TransactionManagerTest {
@Test
void loadSingleton_returnsValue_orEmpty() {
assertEntityNotExist(theEntity);
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
tm().transact(() -> tm().insert(theEntity));
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).hasValue(theEntity);
assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).hasValue(theEntity);
}
@Test
@@ -15,7 +15,6 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.testing.DatabaseHelper.persistSimpleResources;
@@ -24,6 +23,7 @@ import static google.registry.testing.FullFieldsTestEntityHelper.makeDomain;
import static google.registry.testing.FullFieldsTestEntityHelper.makeHistoryEntry;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrarPocs;
import static google.registry.testing.GsonSubject.assertAboutJson;
import static org.mockito.Mockito.verify;
import com.google.gson.JsonObject;
@@ -221,7 +221,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
}
private void assertProperResponseForCatLol(String queryString, String expectedOutputFile) {
assertThat(generateActualJson(queryString))
assertAboutJson()
.that(generateActualJson(queryString))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -238,7 +239,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testInvalidDomain_returns400() {
assertThat(generateActualJson("invalid/domain/name"))
assertAboutJson()
.that(generateActualJson("invalid/domain/name"))
.isEqualTo(
generateExpectedJsonError(
"invalid/domain/name is not a valid domain name: Domain names can only contain a-z,"
@@ -249,7 +251,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testUnknownDomain_returns400() {
assertThat(generateActualJson("missingdomain.com"))
assertAboutJson()
.that(generateActualJson("missingdomain.com"))
.isEqualTo(
generateExpectedJsonError(
"missingdomain.com is not a valid domain name: Domain name is under tld com which"
@@ -299,7 +302,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testIdnDomain_works() {
login("idnregistrar");
assertThat(generateActualJson("cat.みんな"))
assertAboutJson()
.that(generateActualJson("cat.みんな"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -317,7 +321,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testIdnDomainWithPercentEncoding_works() {
login("idnregistrar");
assertThat(generateActualJson("cat.%E3%81%BF%E3%82%93%E3%81%AA"))
assertAboutJson()
.that(generateActualJson("cat.%E3%81%BF%E3%82%93%E3%81%AA"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -335,7 +340,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testPunycodeDomain_works() {
login("idnregistrar");
assertThat(generateActualJson("cat.xn--q9jyb4c"))
assertAboutJson()
.that(generateActualJson("cat.xn--q9jyb4c"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -353,7 +359,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testMultilevelDomain_works() {
login("1tldregistrar");
assertThat(generateActualJson("cat.1.tld"))
assertAboutJson()
.that(generateActualJson("cat.1.tld"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -379,7 +386,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
@Test
void testDeletedDomain_notFound() {
assertThat(generateActualJson("dodo.lol"))
assertAboutJson()
.that(generateActualJson("dodo.lol"))
.isEqualTo(generateExpectedJsonError("dodo.lol not found", 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@@ -410,7 +418,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
void testDeletedDomain_works_loggedInAsCorrectRegistrar() {
login("evilregistrar");
action.includeDeletedParam = Optional.of(true);
assertThat(generateActualJson("dodo.lol"))
assertAboutJson()
.that(generateActualJson("dodo.lol"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -429,7 +438,8 @@ class RdapDomainActionTest extends RdapActionBaseTestCase<RdapDomainAction> {
void testDeletedDomain_works_loggedInAsAdmin() {
loginAsAdmin();
action.includeDeletedParam = Optional.of(true);
assertThat(generateActualJson("dodo.lol"))
assertAboutJson()
.that(generateActualJson("dodo.lol"))
.isEqualTo(
addBoilerplate(
jsonFileBuilder()
@@ -15,7 +15,6 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.rdap.RdapTestHelper.parseJsonObject;
import static google.registry.request.Action.Method.POST;
import static google.registry.testing.DatabaseHelper.createTld;
@@ -27,6 +26,7 @@ import static google.registry.testing.FullFieldsTestEntityHelper.makeDomain;
import static google.registry.testing.FullFieldsTestEntityHelper.makeHistoryEntry;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrarPocs;
import static google.registry.testing.GsonSubject.assertAboutJson;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
@@ -481,7 +481,9 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
private void runSuccessfulTest(RequestType requestType, String queryString, JsonObject expected) {
rememberWildcardType(queryString);
assertThat(generateActualJson(requestType, queryString)).isEqualTo(wrapInSearchReply(expected));
assertAboutJson()
.that(generateActualJson(requestType, queryString))
.isEqualTo(wrapInSearchReply(expected));
assertThat(response.getStatus()).isEqualTo(200);
}
@@ -514,7 +516,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
String nextQuery,
String filename) {
rememberWildcardType(queryString);
assertThat(generateActualJson(requestType, queryString))
assertAboutJson()
.that(generateActualJson(requestType, queryString))
.isEqualTo(
jsonFileBuilder()
.addDomain("domain1.lol", domainRoid1)
@@ -528,7 +531,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
private void runNotFoundTest(RequestType requestType, String queryString, String errorMessage) {
rememberWildcardType(queryString);
assertThat(generateActualJson(requestType, queryString))
assertAboutJson()
.that(generateActualJson(requestType, queryString))
.isEqualTo(generateExpectedJsonError(errorMessage, 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@@ -645,7 +649,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testInvalidRequest_rejected() {
assertThat(generateActualJson(RequestType.NONE, null))
assertAboutJson()
.that(generateActualJson(RequestType.NONE, null))
.isEqualTo(
generateExpectedJsonError(
"You must specify either name=XXXX, nsLdhName=YYYY or nsIp=ZZZZ", 400));
@@ -655,7 +660,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testInvalidWildcard_rejected() {
assertThat(generateActualJson(RequestType.NAME, "exam*ple"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "exam*ple"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of a label, but"
@@ -667,7 +673,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testMultipleWildcards_rejected() {
assertThat(generateActualJson(RequestType.NAME, "*.*"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "*.*"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of a label, but"
@@ -680,7 +687,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testNoCharactersToMatch_rejected() {
rememberWildcardType("*");
assertThat(generateActualJson(RequestType.NAME, "*"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "*"))
.isEqualTo(
generateExpectedJsonError(
"Initial search string is required for wildcard domain searches without a TLD"
@@ -693,7 +701,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testFewerThanTwoCharactersToMatch_rejected() {
rememberWildcardType("a*");
assertThat(generateActualJson(RequestType.NAME, "a*"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "a*"))
.isEqualTo(
generateExpectedJsonError(
"Initial search string must be at least 2 characters for wildcard domain searches"
@@ -846,7 +855,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testDomainMatch_catstar_lol_found_sql() {
rememberWildcardType("cat*.lol");
assertThat(generateActualJson(RequestType.NAME, "cat*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "cat*.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsCatStarReplySql());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(2L));
@@ -855,7 +865,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testDomainMatch_cstar_lol_found_sql() {
rememberWildcardType("c*.lol");
assertThat(generateActualJson(RequestType.NAME, "c*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "c*.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsCatStarReplySql());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(2L));
@@ -870,7 +881,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testDomainMatch_star_lol_found_sql() {
rememberWildcardType("*.lol");
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "*.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsCatStarReplySql());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(2L));
@@ -880,7 +892,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testDomainMatch_star_lol_found_sameRegistrarRequested_sql() {
action.registrarParam = Optional.of("evilregistrar");
rememberWildcardType("*.lol");
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "*.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsCatStarReplySql());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(2L));
@@ -897,7 +910,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testDomainMatch_cat_star_found_sql() {
rememberWildcardType("cat.*");
assertThat(generateActualJson(RequestType.NAME, "cat.*"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "cat.*"))
.isEqualTo(
jsonFileBuilder()
.addDomain("cat.1.test", "39-1_TEST")
@@ -934,7 +948,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testDomainMatch_catstar_found_sql() {
rememberWildcardType("cat*");
assertThat(generateActualJson(RequestType.NAME, "cat*"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "cat*"))
.isEqualTo(
jsonFileBuilder()
.addDomain("cat.1.test", "39-1_TEST")
@@ -1058,7 +1073,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
// our way through all of them.
createManyDomainsAndHosts(4, 50, 2);
rememberWildcardType("domain*.lol");
assertThat(generateActualJson(RequestType.NAME, "domain*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "domain*.lol"))
.isEqualTo(
jsonFileBuilder()
.addDomain("domain100.lol", "AC-LOL")
@@ -1106,7 +1122,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testDomainMatch_tldSearchOrderedProperly_sql() {
createManyDomainsAndHosts(4, 1, 2);
rememberWildcardType("*.lol");
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "*.lol"))
.isEqualTo(
jsonFileBuilder()
.addDomain("cat.lol", "C-LOL")
@@ -1139,7 +1156,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testDomainMatch_truncatedResultsAfterMultipleChunks_sql() {
createManyDomainsAndHosts(5, 6, 2);
rememberWildcardType("domain*.lol");
assertThat(generateActualJson(RequestType.NAME, "domain*.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NAME, "domain*.lol"))
.isEqualTo(
jsonFileBuilder()
.addDomain("domain12.lol", "5A-LOL")
@@ -1197,7 +1215,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testNameserverMatch_foundMultiple() {
rememberWildcardType("ns1.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "ns1.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "ns1.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 1);
@@ -1207,7 +1226,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testNameserverMatch_foundMultiple_sameRegistrarRequested() {
action.registrarParam = Optional.of("TheRegistrar");
rememberWildcardType("ns1.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "ns1.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "ns1.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 1);
@@ -1251,7 +1271,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testNameserverMatchWithNoPrefixAndDomainSuffix_found() {
rememberWildcardType("*.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "*.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "*.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 2);
@@ -1260,7 +1281,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testNameserverMatchWithOneCharacterPrefixAndDomainSuffix_found() {
rememberWildcardType("n*.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "n*.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "n*.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 2);
@@ -1270,7 +1292,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testNameserverMatchWithOneCharacterPrefixAndDomainSuffix_found_sameRegistrarRequested() {
action.registrarParam = Optional.of("TheRegistrar");
rememberWildcardType("n*.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "n*.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "n*.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 2);
@@ -1286,7 +1309,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testNameserverMatchWithTwoCharacterPrefixAndDomainSuffix_found() {
rememberWildcardType("ns*.cat.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "ns*.cat.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "ns*.cat.lol"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_NAME, 2, 2);
@@ -1563,7 +1587,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
// not trigger the truncation warning because all the domains will be duplicates.
createManyDomainsAndHosts(4, 1, 36);
rememberWildcardType("ns*.domain1.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "ns*.domain1.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "ns*.domain1.lol"))
.isEqualTo(
jsonFileBuilder()
.addDomain("domain1.lol", "8F-LOL")
@@ -1579,7 +1604,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testNameserverMatch_incompleteResultsSet() {
createManyDomainsAndHosts(2, 1, 41);
rememberWildcardType("ns*.domain1.lol");
assertThat(generateActualJson(RequestType.NS_LDH_NAME, "ns*.domain1.lol"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_LDH_NAME, "ns*.domain1.lol"))
.isEqualTo(
jsonFileBuilder()
.addDomain("domain1.lol", "97-LOL")
@@ -1621,7 +1647,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
@Test
void testAddressMatchV4Address_foundMultiple() {
rememberWildcardType("1.2.3.4");
assertThat(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_ADDRESS, 2, 1);
@@ -1631,7 +1658,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
void testAddressMatchV4Address_foundMultiple_sameRegistrarRequested() {
action.registrarParam = Optional.of("TheRegistrar");
rememberWildcardType("1.2.3.4");
assertThat(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
.isEqualTo(generateExpectedJsonForTwoDomainsNsReply());
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(SearchType.BY_NAMESERVER_ADDRESS, 2, 1);
@@ -1711,7 +1739,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
login("evilregistrar");
persistDomainAsDeleted(domainCatExample, clock.nowUtc().minusDays(1));
rememberWildcardType("1.2.3.4");
assertThat(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
assertAboutJson()
.that(generateActualJson(RequestType.NS_IP, "1.2.3.4"))
.isEqualTo(
wrapInSearchReply(
jsonFileBuilder()
@@ -15,7 +15,6 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.rdap.RdapTestHelper.loadJsonFile;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistResource;
@@ -25,6 +24,7 @@ import static google.registry.testing.FullFieldsTestEntityHelper.makeDomain;
import static google.registry.testing.FullFieldsTestEntityHelper.makeHost;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrarPocs;
import static google.registry.testing.GsonSubject.assertAboutJson;
import static org.mockito.Mockito.verify;
import com.google.common.collect.ImmutableList;
@@ -170,7 +170,8 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
String rdapStatus,
String address,
String fileName) {
assertThat(generateActualJson(handleQuery))
assertAboutJson()
.that(generateActualJson(handleQuery))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
handleQuery, fullName, rdapStatus, address, fileName));
@@ -178,7 +179,8 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
}
private void runNotFoundTest(String handleQuery) {
assertThat(generateActualJson(handleQuery))
assertAboutJson()
.that(generateActualJson(handleQuery))
.isEqualTo(generateExpectedJsonError(handleQuery + " not found", 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@@ -305,7 +307,8 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
@Test
void testRegistrarByName_found() {
assertThat(generateActualJson("IDN%20Registrar"))
assertAboutJson()
.that(generateActualJson("IDN%20Registrar"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"102", "IDN Registrar", "active", null, "rdap_registrar.json"));
@@ -364,9 +367,11 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
@Test
void testQueryParameter_ignored() {
login("evilregistrar");
assertThat(generateActualJson(techContact.getRepoId() + "?key=value")).isEqualTo(
generateExpectedJsonWithTopLevelEntries(
techContact.getRepoId(), "rdap_associated_contact.json"));
assertAboutJson()
.that(generateActualJson(techContact.getRepoId() + "?key=value"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
techContact.getRepoId(), "rdap_associated_contact.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@@ -15,7 +15,6 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.rdap.RdapTestHelper.loadJsonFile;
import static google.registry.rdap.RdapTestHelper.parseJsonObject;
import static google.registry.request.Action.Method.GET;
@@ -27,6 +26,7 @@ import static google.registry.testing.FullFieldsTestEntityHelper.makeAndPersistD
import static google.registry.testing.FullFieldsTestEntityHelper.makeHistoryEntry;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrarPocs;
import static google.registry.testing.GsonSubject.assertAboutJson;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
@@ -285,14 +285,16 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Nullable String address,
String fileName) {
rememberWildcardType(queryString);
assertThat(generateActualJsonWithFullName(queryString))
assertAboutJson()
.that(generateActualJsonWithFullName(queryString))
.isEqualTo(generateExpectedJsonForEntity(handle, fullName, status, address, fileName));
assertThat(response.getStatus()).isEqualTo(200);
}
private void runNotFoundNameTest(String queryString) {
rememberWildcardType(queryString);
assertThat(generateActualJsonWithFullName(queryString))
assertAboutJson()
.that(generateActualJsonWithFullName(queryString))
.isEqualTo(generateExpectedJsonError("No entities found", 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@@ -323,14 +325,16 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Nullable String address,
String fileName) {
rememberWildcardType(queryString);
assertThat(generateActualJsonWithHandle(queryString))
assertAboutJson()
.that(generateActualJsonWithHandle(queryString))
.isEqualTo(generateExpectedJsonForEntity(handle, fullName, status, address, fileName));
assertThat(response.getStatus()).isEqualTo(200);
}
private void runNotFoundHandleTest(String queryString) {
rememberWildcardType(queryString);
assertThat(generateActualJsonWithHandle(queryString))
assertAboutJson()
.that(generateActualJsonWithHandle(queryString))
.isEqualTo(generateExpectedJsonError("No entities found", 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@@ -393,17 +397,18 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testInvalidRequest_rejected() {
action.run();
assertThat(parseJsonObject(response.getPayload()))
assertAboutJson()
.that(parseJsonObject(response.getPayload()))
.isEqualTo(
generateExpectedJsonError(
"You must specify either fn=XXXX or handle=YYYY", 400));
generateExpectedJsonError("You must specify either fn=XXXX or handle=YYYY", 400));
assertThat(response.getStatus()).isEqualTo(400);
verifyErrorMetrics(Optional.empty(), 400);
}
@Test
void testNameMatch_suffixRejected() {
assertThat(generateActualJsonWithFullName("exam*ple"))
assertAboutJson()
.that(generateActualJsonWithFullName("exam*ple"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of the query,"
@@ -415,7 +420,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testHandleMatch_suffixRejected() {
assertThat(generateActualJsonWithHandle("exam*ple"))
assertAboutJson()
.that(generateActualJsonWithHandle("exam*ple"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of the query,"
@@ -427,7 +433,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testMultipleWildcards_rejected() {
assertThat(generateActualJsonWithHandle("*.*"))
assertAboutJson()
.that(generateActualJsonWithHandle("*.*"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of the query,"
@@ -440,11 +447,10 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testNoCharactersToMatch_rejected() {
rememberWildcardType("*");
assertThat(generateActualJsonWithHandle("*"))
assertAboutJson()
.that(generateActualJsonWithHandle("*"))
.isEqualTo(
generateExpectedJsonError(
"Initial search string must be at least 2 characters",
422));
generateExpectedJsonError("Initial search string must be at least 2 characters", 422));
assertThat(response.getStatus()).isEqualTo(422);
verifyErrorMetrics(Optional.empty(), 422);
}
@@ -452,11 +458,10 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testFewerThanTwoCharactersToMatch_rejected() {
rememberWildcardType("a*");
assertThat(generateActualJsonWithHandle("a*"))
assertAboutJson()
.that(generateActualJsonWithHandle("a*"))
.isEqualTo(
generateExpectedJsonError(
"Initial search string must be at least 2 characters",
422));
generateExpectedJsonError("Initial search string must be at least 2 characters", 422));
assertThat(response.getStatus()).isEqualTo(422);
verifyErrorMetrics(Optional.empty(), 422);
}
@@ -464,11 +469,11 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
@Test
void testInvalidSubtype_rejected() {
action.subtypeParam = Optional.of("Space Aliens");
assertThat(generateActualJsonWithFullName("Blinky (赤ベイ)"))
assertAboutJson()
.that(generateActualJsonWithFullName("Blinky (赤ベイ)"))
.isEqualTo(
generateExpectedJsonError(
"Subtype parameter must specify contacts, registrars or all",
400));
"Subtype parameter must specify contacts, registrars or all", 400));
assertThat(response.getStatus()).isEqualTo(400);
metricSearchType = SearchType.NONE; // Error occurs before search type is set.
verifyErrorMetrics(Optional.empty(), 400);
@@ -569,7 +574,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
void testNameMatchContact_found_wildcardBoth() {
login("2-RegistrarTest");
rememberWildcardType("Blin*");
assertThat(generateActualJsonWithFullName("Blin*"))
assertAboutJson()
.that(generateActualJsonWithFullName("Blin*"))
.isEqualTo(generateExpectedJson("rdap_multiple_contacts2.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(2);
@@ -661,7 +667,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
createManyContactsAndRegistrars(4, 0, registrarTest);
rememberWildcardType("Entity *");
// JsonObject foo = generateActualJsonWithFullName("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(generateExpectedJson("rdap_nontruncated_contacts.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(4);
@@ -672,7 +679,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
login("2-RegistrarTest");
createManyContactsAndRegistrars(5, 0, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(
generateExpectedJson(
"fn=Entity+*&cursor=YzpFbnRpdHkgNA%3D%3D", "rdap_truncated_contacts.json"));
@@ -685,7 +693,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
login("2-RegistrarTest");
createManyContactsAndRegistrars(9, 0, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(
generateExpectedJson(
"fn=Entity+*&cursor=YzpFbnRpdHkgNA%3D%3D", "rdap_truncated_contacts.json"));
@@ -717,7 +726,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
void testNameMatchRegistrars_nonTruncated() {
createManyContactsAndRegistrars(0, 4, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(generateExpectedJson("rdap_nontruncated_registrars.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(0);
@@ -727,7 +737,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
void testNameMatchRegistrars_truncated() {
createManyContactsAndRegistrars(0, 5, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(
generateExpectedJson(
"fn=Entity+*&cursor=cjpFbnRpdHkgNA%3D%3D", "rdap_truncated_registrars.json"));
@@ -739,7 +750,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
void testNameMatchRegistrars_reallyTruncated() {
createManyContactsAndRegistrars(0, 9, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(
generateExpectedJson(
"fn=Entity+*&cursor=cjpFbnRpdHkgNA%3D%3D", "rdap_truncated_registrars.json"));
@@ -800,7 +812,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
login("2-RegistrarTest");
createManyContactsAndRegistrars(3, 3, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(
generateExpectedJson(
"fn=Entity+*&cursor=cjpFbnRpdHkgNA%3D%3D", "rdap_truncated_mixed_entities.json"));
@@ -830,7 +843,8 @@ class RdapEntitySearchActionTest extends RdapSearchActionTestCase<RdapEntitySear
action.subtypeParam = Optional.of("contacts");
createManyContactsAndRegistrars(4, 4, registrarTest);
rememberWildcardType("Entity *");
assertThat(generateActualJsonWithFullName("Entity *"))
assertAboutJson()
.that(generateActualJsonWithFullName("Entity *"))
.isEqualTo(generateExpectedJson("rdap_nontruncated_contacts.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(4);
@@ -16,7 +16,6 @@ package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapDataStructures.EventAction.TRANSFER;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.testing.DatabaseHelper.persistSimpleResources;
@@ -24,6 +23,7 @@ import static google.registry.testing.FullFieldsTestEntityHelper.makeAndPersistH
import static google.registry.testing.FullFieldsTestEntityHelper.makeDomain;
import static google.registry.testing.FullFieldsTestEntityHelper.makeHistoryEntry;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.GsonSubject.assertAboutJson;
import static google.registry.testing.TestDataHelper.loadFile;
import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
@@ -299,57 +299,65 @@ class RdapJsonFormatterTest {
@Test
void testRegistrar() {
assertThat(rdapJsonFormatter.createRdapRegistrarEntity(registrar, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapRegistrarEntity(registrar, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_registrar.json"));
}
@Test
void testRegistrar_summary() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter.createRdapRegistrarEntity(registrar, OutputDataType.SUMMARY).toJson())
.isEqualTo(loadJson("rdapjson_registrar_summary.json"));
}
@Test
void testHost_ipv4() {
assertThat(rdapJsonFormatter.createRdapNameserver(hostIpv4, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostIpv4, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_host_ipv4.json"));
}
@Test
void testHost_ipv6() {
assertThat(rdapJsonFormatter.createRdapNameserver(hostIpv6, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostIpv6, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_host_ipv6.json"));
}
@Test
void testHost_both() {
assertThat(rdapJsonFormatter.createRdapNameserver(hostBoth, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostBoth, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_host_both.json"));
}
@Test
void testHost_both_summary() {
assertThat(rdapJsonFormatter.createRdapNameserver(hostBoth, OutputDataType.SUMMARY).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostBoth, OutputDataType.SUMMARY).toJson())
.isEqualTo(loadJson("rdapjson_host_both_summary.json"));
}
@Test
void testHost_noAddresses() {
assertThat(
rdapJsonFormatter.createRdapNameserver(hostNoAddresses, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostNoAddresses, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_host_no_addresses.json"));
}
@Test
void testHost_notLinked() {
assertThat(rdapJsonFormatter.createRdapNameserver(hostNotLinked, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapNameserver(hostNotLinked, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_host_not_linked.json"));
}
@Test
void testHost_superordinateHasPendingTransfer() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapNameserver(hostSuperordinatePendingTransfer, OutputDataType.FULL)
.toJson())
@@ -358,7 +366,8 @@ class RdapJsonFormatterTest {
@Test
void testRegistrant() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactRegistrant,
@@ -370,7 +379,8 @@ class RdapJsonFormatterTest {
@Test
void testRegistrant_summary() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactRegistrant,
@@ -383,7 +393,8 @@ class RdapJsonFormatterTest {
@Test
void testRegistrant_loggedOut() {
rdapJsonFormatter.rdapAuthorization = RdapAuthorization.PUBLIC_AUTHORIZATION;
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactRegistrant,
@@ -402,7 +413,8 @@ class RdapJsonFormatterTest {
rdapJsonFormatter.fullServletPath =
rdapJsonFormatter.fullServletPath.substring(
0, rdapJsonFormatter.fullServletPath.length() - 1);
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactRegistrant,
@@ -414,7 +426,8 @@ class RdapJsonFormatterTest {
@Test
void testAdmin() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactAdmin, ImmutableSet.of(RdapEntity.Role.ADMIN), OutputDataType.FULL)
@@ -424,7 +437,8 @@ class RdapJsonFormatterTest {
@Test
void testTech() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(
contactTech, ImmutableSet.of(RdapEntity.Role.TECH), OutputDataType.FULL)
@@ -434,7 +448,8 @@ class RdapJsonFormatterTest {
@Test
void testRolelessContact() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(contactTech, ImmutableSet.of(), OutputDataType.FULL)
.toJson())
@@ -443,7 +458,8 @@ class RdapJsonFormatterTest {
@Test
void testUnlinkedContact() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapContactEntity(contactNotLinked, ImmutableSet.of(), OutputDataType.FULL)
.toJson())
@@ -452,13 +468,15 @@ class RdapJsonFormatterTest {
@Test
void testDomain_full() {
assertThat(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_domain_full.json"));
}
@Test
void testDomain_summary() {
assertThat(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.SUMMARY).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.SUMMARY).toJson())
.isEqualTo(loadJson("rdapjson_domain_summary.json"));
}
@@ -476,13 +494,15 @@ class RdapJsonFormatterTest {
@Test
void testDomain_logged_out() {
rdapJsonFormatter.rdapAuthorization = RdapAuthorization.PUBLIC_AUTHORIZATION;
assertThat(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.FULL).toJson())
assertAboutJson()
.that(rdapJsonFormatter.createRdapDomain(domainFull, OutputDataType.FULL).toJson())
.isEqualTo(loadJson("rdapjson_domain_logged_out.json"));
}
@Test
void testDomain_noNameserversNoTransfersMultipleRoleContact() {
assertThat(
assertAboutJson()
.that(
rdapJsonFormatter
.createRdapDomain(domainNoNameserversNoTransfers, OutputDataType.FULL)
.toJson())
@@ -491,7 +511,8 @@ class RdapJsonFormatterTest {
@Test
void testError() {
assertThat(
assertAboutJson()
.that(
RdapObjectClasses.ErrorResponse.create(
SC_BAD_REQUEST, "Invalid Domain Name", "Not a valid domain name")
.toJson())
@@ -500,7 +521,8 @@ class RdapJsonFormatterTest {
@Test
void testTopLevel() {
assertThat(
assertAboutJson()
.that(
TopLevelReplyObject.create(
new ReplyPayloadBase(BoilerplateType.OTHER) {
@JsonableElement public static final String key = "value";
@@ -512,7 +534,8 @@ class RdapJsonFormatterTest {
@Test
void testTopLevel_domain() {
assertThat(
assertAboutJson()
.that(
TopLevelReplyObject.create(
new ReplyPayloadBase(BoilerplateType.DOMAIN) {
@JsonableElement public static final String key = "value";
@@ -15,11 +15,11 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.rdap.RdapTestHelper.loadJsonFile;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.GsonSubject.assertAboutJson;
import static org.mockito.Mockito.verify;
import com.google.common.collect.ImmutableMap;
@@ -105,132 +105,149 @@ class RdapNameserverActionTest extends RdapActionBaseTestCase<RdapNameserverActi
@Test
void testInvalidNameserver_returns400() {
assertThat(generateActualJson("invalid/host/name"))
assertAboutJson()
.that(generateActualJson("invalid/host/name"))
.isEqualTo(
generateExpectedJsonError(
"invalid/host/name is not a valid nameserver: Invalid host name",
400));
"invalid/host/name is not a valid nameserver: Invalid host name", 400));
assertThat(response.getStatus()).isEqualTo(400);
}
@Test
void testUnknownNameserver_returns404() {
assertThat(generateActualJson("ns1.missing.com")).isEqualTo(
generateExpectedJsonError("ns1.missing.com not found", 404));
assertAboutJson()
.that(generateActualJson("ns1.missing.com"))
.isEqualTo(generateExpectedJsonError("ns1.missing.com not found", 404));
assertThat(response.getStatus()).isEqualTo(404);
}
@Test
void testValidNameserver_works() {
assertThat(generateActualJson("ns1.cat.lol"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("ns1.cat.lol"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testTrailingDot_getsIgnored() {
assertThat(generateActualJson("ns1.cat.lol."))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("ns1.cat.lol."))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testUpperCase_getsCanonicalized() {
assertThat(generateActualJson("Ns1.CaT.lOl."))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("Ns1.CaT.lOl."))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testQueryParameter_getsIgnored() {
assertThat(generateActualJson("ns1.cat.lol?key=value"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("ns1.cat.lol?key=value"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.lol",
ImmutableMap.of(
"HANDLE", "2-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "1.2.3.4",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testIdnNameserver_works() {
assertThat(generateActualJson("ns1.cat.みんな"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.みんな",
ImmutableMap.of(
"PUNYCODENAME", "ns1.cat.xn--q9jyb4c",
"HANDLE", "5-ROID",
"ADDRESSTYPE", "v6",
"ADDRESS", "bad:f00d:cafe::15:beef",
"STATUS", "active"),
"rdap_host_unicode.json"));
assertAboutJson()
.that(generateActualJson("ns1.cat.みんな"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.みんな",
ImmutableMap.of(
"PUNYCODENAME", "ns1.cat.xn--q9jyb4c",
"HANDLE", "5-ROID",
"ADDRESSTYPE", "v6",
"ADDRESS", "bad:f00d:cafe::15:beef",
"STATUS", "active"),
"rdap_host_unicode.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testPunycodeNameserver_works() {
assertThat(generateActualJson("ns1.cat.xn--q9jyb4c"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.cat.みんな",
ImmutableMap.of(
"PUNYCODENAME", "ns1.cat.xn--q9jyb4c",
"HANDLE", "5-ROID",
"ADDRESSTYPE", "v6",
"ADDRESS", "bad:f00d:cafe::15:beef",
"STATUS", "active"),
"rdap_host_unicode.json"));
assertAboutJson()
.that(generateActualJson("ns1.cat.xn--q9jyb4c"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.cat.みんな",
ImmutableMap.of(
"PUNYCODENAME", "ns1.cat.xn--q9jyb4c",
"HANDLE", "5-ROID",
"ADDRESSTYPE", "v6",
"ADDRESS", "bad:f00d:cafe::15:beef",
"STATUS", "active"),
"rdap_host_unicode.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testMultilevelNameserver_works() {
assertThat(generateActualJson("ns1.domain.1.tld"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.domain.1.tld",
ImmutableMap.of(
"HANDLE", "8-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "5.6.7.8",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("ns1.domain.1.tld"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.domain.1.tld",
ImmutableMap.of(
"HANDLE", "8-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "5.6.7.8",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
void testExternalNameserver_works() {
assertThat(generateActualJson("ns1.domain.external"))
.isEqualTo(generateExpectedJsonWithTopLevelEntries(
"ns1.domain.external",
ImmutableMap.of(
"HANDLE", "C-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "9.10.11.12",
"STATUS", "active"),
"rdap_host.json"));
assertAboutJson()
.that(generateActualJson("ns1.domain.external"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"ns1.domain.external",
ImmutableMap.of(
"HANDLE", "C-ROID",
"ADDRESSTYPE", "v4",
"ADDRESS", "9.10.11.12",
"STATUS", "active"),
"rdap_host.json"));
assertThat(response.getStatus()).isEqualTo(200);
}
@@ -267,7 +284,8 @@ class RdapNameserverActionTest extends RdapActionBaseTestCase<RdapNameserverActi
void testDeletedNameserver_found_loggedInAsCorrectRegistrar() {
login("TheRegistrar");
action.includeDeletedParam = Optional.of(true);
assertThat(generateActualJson("nsdeleted.cat.lol"))
assertAboutJson()
.that(generateActualJson("nsdeleted.cat.lol"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"nsdeleted.cat.lol",
@@ -284,7 +302,8 @@ class RdapNameserverActionTest extends RdapActionBaseTestCase<RdapNameserverActi
void testDeletedNameserver_found_loggedInAsAdmin() {
loginAsAdmin();
action.includeDeletedParam = Optional.of(true);
assertThat(generateActualJson("nsdeleted.cat.lol"))
assertAboutJson()
.that(generateActualJson("nsdeleted.cat.lol"))
.isEqualTo(
generateExpectedJsonWithTopLevelEntries(
"nsdeleted.cat.lol",
@@ -15,7 +15,6 @@
package google.registry.rdap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.rdap.RdapTestHelper.assertThat;
import static google.registry.rdap.RdapTestHelper.loadJsonFile;
import static google.registry.rdap.RdapTestHelper.parseJsonObject;
import static google.registry.request.Action.Method.GET;
@@ -26,6 +25,7 @@ import static google.registry.testing.DatabaseHelper.persistSimpleResources;
import static google.registry.testing.FullFieldsTestEntityHelper.makeDomain;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrar;
import static google.registry.testing.FullFieldsTestEntityHelper.makeRegistrarPocs;
import static google.registry.testing.GsonSubject.assertAboutJson;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
@@ -246,7 +246,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testInvalidRequest_rejected() {
action.run();
assertThat(parseJsonObject(response.getPayload()))
assertAboutJson()
.that(parseJsonObject(response.getPayload()))
.isEqualTo(generateExpectedJsonError("You must specify either name=XXXX or ip=YYYY", 400));
assertThat(response.getStatus()).isEqualTo(400);
verifyErrorMetrics(Optional.empty(), 400);
@@ -254,7 +255,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testInvalidSuffix_rejected() {
assertThat(generateActualJsonWithName("exam*ple"))
assertAboutJson()
.that(generateActualJsonWithName("exam*ple"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of a label, but"
@@ -267,7 +269,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNonexistentDomainSuffix_unprocessable() {
assertThat(generateActualJsonWithName("exam*.foo.bar"))
assertAboutJson()
.that(generateActualJsonWithName("exam*.foo.bar"))
.isEqualTo(
generateExpectedJsonError(
"A suffix after a wildcard in a nameserver lookup must be an in-bailiwick domain",
@@ -278,7 +281,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testMultipleWildcards_rejected() {
assertThat(generateActualJsonWithName("*.*"))
assertAboutJson()
.that(generateActualJsonWithName("*.*"))
.isEqualTo(
generateExpectedJsonError(
"Query can only have a single wildcard, and it must be at the end of a label, but"
@@ -291,7 +295,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNoCharactersToMatch_rejected() {
assertThat(generateActualJsonWithName("*"))
assertAboutJson()
.that(generateActualJsonWithName("*"))
.isEqualTo(
generateExpectedJsonError("Initial search string must be at least 2 characters", 422));
assertThat(response.getStatus()).isEqualTo(422);
@@ -300,7 +305,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testFewerThanTwoCharactersToMatch_rejected() {
assertThat(generateActualJsonWithName("a*"))
assertAboutJson()
.that(generateActualJsonWithName("a*"))
.isEqualTo(
generateExpectedJsonError("Initial search string must be at least 2 characters", 422));
assertThat(response.getStatus()).isEqualTo(422);
@@ -309,7 +315,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_lol_found() {
assertThat(generateActualJsonWithName("ns1.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.lol"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host_linked.json"));
@@ -319,7 +326,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_lol_foundWithUpperCase() {
assertThat(generateActualJsonWithName("Ns1.CaT.lOl"))
assertAboutJson()
.that(generateActualJsonWithName("Ns1.CaT.lOl"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host_linked.json"));
@@ -345,7 +353,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns2_cat_lol_found() {
assertThat(generateActualJsonWithName("ns2.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("ns2.cat.lol"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns2.cat.lol",
@@ -368,7 +377,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_external_found() {
assertThat(generateActualJsonWithName("ns1.cat.external"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.external"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.external", null, "8-ROID", null, null, "rdap_host_external.json"));
@@ -378,7 +388,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_idn_unicode_found() {
assertThat(generateActualJsonWithName("ns1.cat.みんな"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.みんな"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.みんな",
@@ -395,7 +406,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_idn_punycode_found() {
assertThat(generateActualJsonWithName("ns1.cat.xn--q9jyb4c"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.xn--q9jyb4c"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.みんな",
@@ -410,7 +422,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_ns1_cat_1_test_found() {
assertThat(generateActualJsonWithName("ns1.cat.1.test"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.1.test"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.1.test", null, "E-ROID", "v4", "1.2.3.6", "rdap_host.json"));
@@ -502,7 +515,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_nontruncatedResultSet() {
createManyHosts(4);
assertThat(generateActualJsonWithName("nsx*.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("nsx*.cat.lol"))
.isEqualTo(loadJsonFile("rdap_nontruncated_hosts.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(4);
@@ -511,7 +525,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_truncatedResultSet() {
createManyHosts(5);
assertThat(generateActualJsonWithName("nsx*.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("nsx*.cat.lol"))
.isEqualTo(
loadJsonFile(
"rdap_truncated_hosts.json", "QUERY", "name=nsx*.cat.lol&cursor=bnN4NC5jYXQubG9s"));
@@ -522,7 +537,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatch_reallyTruncatedResultSet() {
createManyHosts(9);
assertThat(generateActualJsonWithName("nsx*.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("nsx*.cat.lol"))
.isEqualTo(
loadJsonFile(
"rdap_truncated_hosts.json", "QUERY", "name=nsx*.cat.lol&cursor=bnN4NC5jYXQubG9s"));
@@ -534,7 +550,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatchDeletedHost_foundTheOtherHost() {
persistResource(hostNs1CatLol.asBuilder().setDeletionTime(clock.nowUtc().minusDays(1)).build());
assertThat(generateActualJsonWithName("ns*.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("ns*.cat.lol"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns2.cat.lol",
@@ -550,7 +567,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatchDeletedHost_notFound() {
persistResource(hostNs1CatLol.asBuilder().setDeletionTime(clock.nowUtc().minusDays(1)).build());
assertThat(generateActualJsonWithName("ns1.cat.lol"))
assertAboutJson()
.that(generateActualJsonWithName("ns1.cat.lol"))
.isEqualTo(generateExpectedJsonError("No nameservers found", 404));
assertThat(response.getStatus()).isEqualTo(404);
verifyErrorMetrics();
@@ -559,7 +577,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testNameMatchDeletedHostWithWildcard_notFound() {
persistResource(hostNs1CatLol.asBuilder().setDeletionTime(clock.nowUtc().minusDays(1)).build());
assertThat(generateActualJsonWithName("cat.lo*"))
assertAboutJson()
.that(generateActualJsonWithName("cat.lo*"))
.isEqualTo(generateExpectedJsonError("No nameservers found", 404));
assertThat(response.getStatus()).isEqualTo(404);
verifyErrorMetrics();
@@ -727,7 +746,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatchV4Address_found() {
assertThat(generateActualJsonWithIp("1.2.3.4"))
assertAboutJson()
.that(generateActualJsonWithIp("1.2.3.4"))
.isEqualTo(
generateExpectedJsonForNameserver(
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host_linked.json"));
@@ -753,7 +773,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatchV6Address_foundMultiple() {
assertThat(generateActualJsonWithIp("bad:f00d:cafe::15:beef"))
assertAboutJson()
.that(generateActualJsonWithIp("bad:f00d:cafe::15:beef"))
.isEqualTo(loadJsonFile("rdap_multiple_hosts.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(2);
@@ -769,7 +790,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatchDeletedHost_notFound() {
persistResource(hostNs1CatLol.asBuilder().setDeletionTime(clock.nowUtc().minusDays(1)).build());
assertThat(generateActualJsonWithIp("1.2.3.4"))
assertAboutJson()
.that(generateActualJsonWithIp("1.2.3.4"))
.isEqualTo(generateExpectedJsonError("No nameservers found", 404));
assertThat(response.getStatus()).isEqualTo(404);
verifyErrorMetrics();
@@ -778,7 +800,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatch_nontruncatedResultSet() {
createManyHosts(4);
assertThat(generateActualJsonWithIp("5.5.5.1"))
assertAboutJson()
.that(generateActualJsonWithIp("5.5.5.1"))
.isEqualTo(loadJsonFile("rdap_nontruncated_hosts.json"));
assertThat(response.getStatus()).isEqualTo(200);
verifyMetrics(4);
@@ -787,7 +810,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatch_truncatedResultSet() {
createManyHosts(5);
assertThat(generateActualJsonWithIp("5.5.5.1"))
assertAboutJson()
.that(generateActualJsonWithIp("5.5.5.1"))
.isEqualTo(
loadJsonFile(
"rdap_truncated_hosts.json", "QUERY", "ip=5.5.5.1&cursor=MTctUk9JRA%3D%3D"));
@@ -798,7 +822,8 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
@Test
void testAddressMatch_reallyTruncatedResultSet() {
createManyHosts(9);
assertThat(generateActualJsonWithIp("5.5.5.1"))
assertAboutJson()
.that(generateActualJsonWithIp("5.5.5.1"))
.isEqualTo(
loadJsonFile(
"rdap_truncated_hosts.json", "QUERY", "ip=5.5.5.1&cursor=MTctUk9JRA%3D%3D"));
@@ -20,7 +20,6 @@ import static google.registry.testing.TestDataHelper.loadFile;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
import com.google.common.collect.Streams;
import com.google.common.truth.Truth;
import com.google.gson.Gson;
@@ -30,7 +29,6 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import google.registry.util.Clock;
import java.util.Map;
import java.util.Objects;
/** Test helper methods for RDAP tests. */
class RdapTestHelper {
@@ -242,82 +240,4 @@ class RdapTestHelper {
return reply;
}
/** A small utility class to show nicer "huge JSON" diffs. */
static final class GsonSubject {
private JsonObject actual;
GsonSubject(JsonObject actual) {
this.actual = actual;
}
void isEqualTo(JsonObject expected) {
if (actual.equals(expected)) {
return;
}
StringBuilder difference = new StringBuilder();
difference.append("Actual JSON different than expected:");
diff("", actual, expected, difference);
throw new AssertionError(difference.toString());
}
private String jsonifyAndIndent(JsonElement element) {
String json = GSON.toJson(element);
return json.replaceAll("\n", "\n ");
}
private JsonElement getOrNull(JsonArray jsonArray, int index) {
if (index >= jsonArray.size()) {
return null;
}
return jsonArray.get(index);
}
/** Writes down a human-readable diff between actual and expected into the StringBuilder. */
private void diff(
String name, JsonElement actual, JsonElement expected, StringBuilder builder) {
if (Objects.equals(actual, expected)) {
return;
}
if (actual == null) {
builder.append(String.format("Missing: %s ->%s\n\n", name, jsonifyAndIndent(expected)));
return;
}
if (expected == null) {
builder.append(String.format("Unexpected: %s -> %s\n\n", name, jsonifyAndIndent(actual)));
return;
}
if (actual.isJsonObject() && expected.isJsonObject()) {
// We put the "expected" first in the union so that the "expected" keys will all be first
// and in order
for (String key :
Sets.union(expected.getAsJsonObject().keySet(), actual.getAsJsonObject().keySet())) {
diff(
name + "." + key,
actual.getAsJsonObject().get(key),
expected.getAsJsonObject().get(key),
builder);
}
return;
}
if (actual.isJsonArray() && expected.isJsonArray()) {
int commonSize = Math.max(actual.getAsJsonArray().size(), expected.getAsJsonArray().size());
for (int i = 0; i < commonSize; i++) {
diff(
String.format("%s[%s]", name, i),
getOrNull(actual.getAsJsonArray(), i),
getOrNull(expected.getAsJsonArray(), i),
builder);
}
return;
}
builder.append(
String.format(
"Actual: %s -> %s\nExpected: %s\n\n",
name, jsonifyAndIndent(actual), jsonifyAndIndent(expected)));
}
}
static GsonSubject assertThat(JsonObject actual) {
return new GsonSubject(actual);
}
}
@@ -28,7 +28,6 @@ import static org.joda.time.DateTimeConstants.TUESDAY;
import static org.joda.time.Duration.standardDays;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.truth.Truth;
import google.registry.model.common.Cursor;
import google.registry.model.common.Cursor.CursorType;
import google.registry.model.tld.Tld;
@@ -95,7 +94,7 @@ public class PendingDepositCheckerTest {
createTldWithEscrowEnabled("lol");
clock.advanceOneMilli();
Tld registry = Tld.get("lol");
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
checker.getTldsAndWatermarksPendingDepositForRdeAndBrda();
assertThat(loadByKey(Cursor.createScopedVKey(RDE_STAGING, registry)).getCursorTime())
.isEqualTo(DateTime.parse("2000-01-01TZ"));
@@ -122,9 +121,9 @@ public class PendingDepositCheckerTest {
clock.advanceOneMilli();
setCursor(registry, RDE_STAGING, DateTime.parse("2000-01-02TZ")); // assume rde is already done
clock.advanceOneMilli();
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
assertThat(checker.getTldsAndWatermarksPendingDepositForRdeAndBrda()).isEmpty();
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
}
@Test
@@ -19,7 +19,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import com.google.common.truth.Truth;
import google.registry.request.HttpException.BadRequestException;
import google.registry.testing.FakeClock;
import google.registry.util.Clock;
@@ -45,14 +44,13 @@ class ReportingModuleTest {
@Test
void testEmptyYearMonthParameter_returnsEmptyYearMonthOptional() {
when(req.getParameter("yearMonth")).thenReturn("");
Truth.assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
}
@Test
void testValidYearMonthParameter_returnsThatMonth() {
when(req.getParameter("yearMonth")).thenReturn("2017-05");
Truth.assertThat(ReportingModule.provideYearMonthOptional(req))
.hasValue(new YearMonth(2017, 5));
assertThat(ReportingModule.provideYearMonthOptional(req)).hasValue(new YearMonth(2017, 5));
}
@Test
@@ -83,13 +81,13 @@ class ReportingModuleTest {
@Test
void testEmptyDateParameter_returnsEmptyDateOptional() {
when(req.getParameter("date")).thenReturn("");
Truth.assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
}
@Test
void testValidDateParameter_returnsThatDate() {
when(req.getParameter("date")).thenReturn("2017-05-13");
Truth.assertThat(ReportingModule.provideDateOptional(req)).hasValue(new LocalDate(2017, 5, 13));
assertThat(ReportingModule.provideDateOptional(req)).hasValue(new LocalDate(2017, 5, 13));
}
@Test
@@ -244,6 +244,7 @@ public final class DatabaseHelper {
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 11)))
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(USD)))
.setCreateBillingCost(Money.of(USD, 13))
.setCreateBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 13)))
.setRestoreBillingCost(Money.of(USD, 17))
.setServerStatusChangeBillingCost(Money.of(USD, 19))
// Always set a default premium list. Tests that don't want it can delete it.
@@ -0,0 +1,118 @@
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.testing;
import static com.google.common.truth.Truth.assertAbout;
import com.google.common.collect.Sets;
import com.google.common.truth.FailureMetadata;
import com.google.common.truth.SimpleSubjectBuilder;
import com.google.common.truth.Subject;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.util.Objects;
import java.util.Optional;
/** A Truth subject to show nicer "huge JSON" diffs. */
public class GsonSubject extends Subject {
private JsonObject actual;
private static final Gson GSON =
new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
private String customDisplaySubject;
public GsonSubject(FailureMetadata failureMetadata, JsonObject actual) {
super(failureMetadata, actual);
this.actual = actual;
}
@Override
protected String actualCustomStringRepresentation() {
return Optional.ofNullable(customDisplaySubject).orElse(String.valueOf(actual));
}
public GsonSubject withCustomDisplaySubject(String customDisplaySubject) {
this.customDisplaySubject = customDisplaySubject;
return this;
}
private String jsonifyAndIndent(JsonElement element) {
String json = GSON.toJson(element);
return json.replaceAll("\n", "\n ");
}
private JsonElement getOrNull(JsonArray jsonArray, int index) {
if (index >= jsonArray.size()) {
return null;
}
return jsonArray.get(index);
}
/** Writes down a human-readable diff between actual and expected into the StringBuilder. */
private void diff(String name, JsonElement actual, JsonElement expected, StringBuilder builder) {
if (Objects.equals(actual, expected)) {
return;
}
if (actual == null) {
builder.append(String.format("Missing: %s ->%s\n\n", name, jsonifyAndIndent(expected)));
return;
}
if (expected == null) {
builder.append(String.format("Unexpected: %s -> %s\n\n", name, jsonifyAndIndent(actual)));
return;
}
if (actual.isJsonObject() && expected.isJsonObject()) {
// We put the "expected" first in the union so that the "expected" keys will all be first
// and in order
for (String key :
Sets.union(expected.getAsJsonObject().keySet(), actual.getAsJsonObject().keySet())) {
diff(
name + "." + key,
actual.getAsJsonObject().get(key),
expected.getAsJsonObject().get(key),
builder);
}
return;
}
if (actual.isJsonArray() && expected.isJsonArray()) {
int commonSize = Math.max(actual.getAsJsonArray().size(), expected.getAsJsonArray().size());
for (int i = 0; i < commonSize; i++) {
diff(
String.format("%s[%s]", name, i),
getOrNull(actual.getAsJsonArray(), i),
getOrNull(expected.getAsJsonArray(), i),
builder);
}
return;
}
builder.append(
String.format(
"Actual: %s -> %s\nExpected: %s\n\n",
name, jsonifyAndIndent(actual), jsonifyAndIndent(expected)));
}
public static SimpleSubjectBuilder<GsonSubject, JsonObject> assertAboutJson() {
return assertAbout(jsonObject());
}
public static Factory<GsonSubject, JsonObject> jsonObject() {
return GsonSubject::new;
}
}
@@ -90,7 +90,7 @@ class CheckDomainClaimsCommandTest extends EppToolCommandTestCase<CheckDomainCla
@Test
void testFailure_unknownFlag() {
assertThrows(
ParameterException.class,
IllegalArgumentException.class,
() -> runCommand("--client=NewRegistrar", "--unrecognized=foo", "example.tld"));
}
}
@@ -90,7 +90,7 @@ class CheckDomainCommandTest extends EppToolCommandTestCase<CheckDomainCommand>
@Test
void testFailure_unknownFlag() {
assertThrows(
ParameterException.class,
IllegalArgumentException.class,
() -> runCommand("--client=NewRegistrar", "--unrecognized=foo", "example.tld"));
}
}
@@ -104,6 +104,12 @@ public abstract class CommandTestCase<C extends Command> {
} finally {
// Reset back to UNITTEST environment.
RegistryToolEnvironment.UNITTEST.setup(systemPropertyExtension);
// Reset the "force" field because it gets flipped every time the "--force" flag is present.
// If we force-run the same command multiple times in the same test method, the second run
// will flip the boolean again to false and not run as forced.
if (command instanceof ConfirmingCommand cc) {
cc.force = false;
}
}
}
@@ -89,7 +89,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
Tld tld = Tld.get("tld");
assertThat(tld).isNotNull();
assertThat(tld.getDriveFolderId()).isEqualTo("driveFolder");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(tld, "tld.yaml");
assertThat(tld.getBreakglassMode()).isFalse();
}
@@ -101,7 +101,8 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
runCommandForced("--input=" + tldFile);
Tld tld = Tld.get("jpy");
assertThat(tld).isNotNull();
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(JPY, new BigDecimal("250")));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc()))
.isEqualTo(Money.of(JPY, new BigDecimal("250")));
assertThat(tld.getEapFeeFor(DateTime.now(UTC)).getCost()).isEqualTo(new BigDecimal(0));
testTldConfiguredSuccessfully(tld, "jpy.yaml");
}
@@ -109,12 +110,12 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
@Test
void testSuccess_updateTld() throws Exception {
Tld tld = createTld("tld");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
File tldFile = tmpDir.resolve("tld.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "tld.yaml"));
runCommandForced("--input=" + tldFile);
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isFalse();
assertThat(tld.getBsaEnrollStartTime()).isEmpty();
@@ -139,8 +140,6 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
tld.asBuilder()
.setIdnTables(ImmutableSet.of(JA, UNCONFUSABLE_LATIN, EXTENDED_LATIN))
.setAllowedFullyQualifiedHostNames(ImmutableSet.of("zeta", "alpha", "gamma", "beta"))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 13)))
.build());
File tldFile = tmpDir.resolve("idns.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "idns.yaml"));
@@ -150,22 +149,6 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
.hasLogAtLevelWithMessage(INFO, "TLD YAML file contains no new changes");
}
@Test
void testSuccess_addCreateCostTransitions_hasDiff() throws Exception {
Tld tld = createTld("idns");
persistResource(
tld.asBuilder()
.setIdnTables(ImmutableSet.of(JA, UNCONFUSABLE_LATIN, EXTENDED_LATIN))
.setAllowedFullyQualifiedHostNames(ImmutableSet.of("zeta", "alpha", "gamma", "beta"))
.build());
File tldFile = tmpDir.resolve("idns.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "idns.yaml"));
runCommandForced("--input=" + tldFile);
Tld updatedTld = Tld.get("idns");
testTldConfiguredSuccessfully(updatedTld, "idns.yaml");
assertThat(tld.createBillingCostTransitionsEqual(updatedTld)).isFalse();
}
@Test
void testSuccess_outOfOrderFieldsOnCreate() throws Exception {
File tldFile = tmpDir.resolve("outoforderfields.yaml").toFile();
@@ -176,21 +159,21 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
// TLD's YAML will contain the fields in the correct order
assertThat(tld).isNotNull();
assertThat(tld.getDriveFolderId()).isEqualTo("driveFolder");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
assertThat(tld.getPremiumListName().get()).isEqualTo("test");
}
@Test
void testSuccess_outOfOrderFieldsOnUpdate() throws Exception {
Tld tld = createTld("outoforderfields");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
File tldFile = tmpDir.resolve("outoforderfields.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "outoforderfields.yaml"));
runCommandForced("--input=" + tldFile);
Tld updatedTld = Tld.get("outoforderfields");
// Cannot test that created TLD converted to YAML is equal to original YAML since the created
// TLD's YAML will contain the fields in the correct order
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
}
@Test
@@ -231,19 +214,6 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
.isEqualTo(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 25)));
}
@Test
void testFailure_billingCostTransitionsDoesNotMatchCreateCost() throws Exception {
createTld("diffcostmap");
File tldFile = tmpDir.resolve("diffcostmap.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "diffcostmap.yaml"));
IllegalArgumentException thrown =
assertThrows(IllegalArgumentException.class, () -> runCommandForced("--input=" + tldFile));
assertThat(thrown.getMessage())
.isEqualTo(
"The createBillingCostTransitions map must have the same current cost as the"
+ " createBillingCost field");
}
@Test
void testFailure_fileMissingNullableFieldsOnCreate() throws Exception {
File tldFile = tmpDir.resolve("missingnullablefields.yaml").toFile();
@@ -296,7 +266,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
Tld tld = Tld.get("nullablefieldsallnull");
assertThat(tld).isNotNull();
assertThat(tld.getDriveFolderId()).isEqualTo(null);
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
// cannot test that created TLD converted to YAML is equal to original YAML since the created
// TLD's YAML will contain empty sets for some of the null fields
assertThat(tld.getIdnTables()).isEmpty();
@@ -314,7 +284,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
Tld updatedTld = Tld.get("nullablefieldsallnull");
assertThat(updatedTld).isNotNull();
assertThat(updatedTld.getDriveFolderId()).isEqualTo(null);
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
// cannot test that created TLD converted to YAML is equal to original YAML since the created
// TLD's YAML will contain empty sets for some of the null fields
assertThat(updatedTld.getIdnTables()).isEmpty();
@@ -387,7 +357,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
Tld tld = Tld.get(name);
assertThat(tld).isNotNull();
assertThat(tld.getDriveFolderId()).isEqualTo("driveFolder");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
String yaml = objectMapper.writeValueAsString(tld);
assertThat(yaml).isEqualTo(fileContents);
}
@@ -505,7 +475,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
assertThat(thrown.getMessage())
.isEqualTo(
"All Money values in the renewBillingCostTransitions map must use the TLD's currency"
+ " unit");
+ " unit USD. Found [EUR] currency unit(s) in the renewBillingCostTransitionsMap");
}
@Test
@@ -534,7 +504,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
assertThat(thrown.getMessage())
.isEqualTo(
"All Money values in the renewBillingCostTransitions map must use the TLD's currency"
+ " unit");
+ " unit USD. Found [EUR] currency unit(s) in the renewBillingCostTransitionsMap");
}
@Test
@@ -614,12 +584,12 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
@Test
void testSuccess_breakGlassFlag_startsBreakGlassMode() throws Exception {
Tld tld = createTld("tld");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
File tldFile = tmpDir.resolve("tld.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "tld.yaml"));
runCommandForced("--input=" + tldFile, "--break_glass=true");
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isTrue();
}
@@ -627,13 +597,13 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
@Test
void testSuccess_breakGlassFlag_continuesBreakGlassMode() throws Exception {
Tld tld = createTld("tld");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
persistResource(tld.asBuilder().setBreakglassMode(true).build());
File tldFile = tmpDir.resolve("tld.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "tld.yaml"));
runCommandForced("--input=" + tldFile, "--break_glass=true");
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isTrue();
}
@@ -712,13 +682,13 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
@Test
void testSuccess_breakGlassFlagFalse_endsBreakGlassMode() throws Exception {
Tld tld = createTld("tld");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
persistResource(tld.asBuilder().setBreakglassMode(true).build());
File tldFile = tmpDir.resolve("tld.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "tld.yaml"));
runCommandForced("--break_glass=false", "--input=" + tldFile);
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isFalse();
}
@@ -755,12 +725,12 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
@Test
void testSuccess_dryRunOnUpdate_noChanges() throws Exception {
Tld tld = createTld("tld");
assertThat(tld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(tld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
File tldFile = tmpDir.resolve("tld.yaml").toFile();
Files.asCharSink(tldFile, UTF_8).write(loadFile(getClass(), "tld.yaml"));
runCommandForced("--input=" + tldFile, "-d");
Tld notUpdatedTld = Tld.get("tld");
assertThat(notUpdatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 13));
assertThat(notUpdatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13));
}
@Test
@@ -787,7 +757,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
runCommandInEnvironment(
RegistryToolEnvironment.PRODUCTION, "--input=" + tldFile, "--break_glass=true", "-f");
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isTrue();
}
@@ -800,7 +770,7 @@ public class ConfigureTldCommandTest extends CommandTestCase<ConfigureTldCommand
runCommandInEnvironment(
RegistryToolEnvironment.PRODUCTION, "--input=" + tldFile, "--build_environment", "-f");
Tld updatedTld = Tld.get("tld");
assertThat(updatedTld.getCreateBillingCost()).isEqualTo(Money.of(USD, 25));
assertThat(updatedTld.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 25));
testTldConfiguredSuccessfully(updatedTld, "tld.yaml");
assertThat(updatedTld.getBreakglassMode()).isFalse();
}
@@ -50,8 +50,12 @@ class CreateAnchorTenantCommandTest extends EppToolCommandTestCase<CreateAnchorT
@Test
void testSuccess_multipleWordReason() throws Exception {
runCommandForced("--client=NewRegistrar", "--superuser",
"--reason=\"anchor tenant test\"", "--contact=jd1234", "--domain_name=example.tld");
runCommandForced(
"--client=NewRegistrar",
"--superuser",
"--reason=anchor tenant test",
"--contact=jd1234",
"--domain_name=example.tld");
eppVerifier
.expectSuperuser()
.verifySent("domain_create_anchor_tenant_multiple_word_reason.xml");
@@ -34,11 +34,11 @@ class CreateContactCommandTest extends EppToolCommandTestCase<CreateContactComma
runCommandForced(
"--client=NewRegistrar",
"--id=sh8013",
"--name=\"John Doe\"",
"--org=\"Example Inc.\"",
"--street=\"123 Example Dr.\"",
"--street=\"Floor 3\"",
"--street=\"Suite 100\"",
"--name=John Doe",
"--org=Example Inc.",
"--street=123 Example Dr.",
"--street=Floor 3",
"--street=Suite 100",
"--city=Dulles",
"--state=VA",
"--zip=20166-6503",
@@ -208,7 +208,7 @@ class CreateDomainCommandTest extends EppToolCommandTestCase<CreateDomainCommand
"--registrant=crr-admin",
"--admins=crr-admin",
"--techs=crr-tech",
"--reason=\"Creating test domain\"",
"--reason=Creating test domain",
"--registrar_request=false",
"example.tld");
eppVerifier.verifySent("domain_create_metadata.xml");
@@ -65,7 +65,7 @@ abstract class CreateOrUpdateReservedListCommandTestCase<
runCommandForced(
"--name=xn--q9jyb4c_common-reserved",
"--input=" + reservedTermsPath + "-nonexistent"));
assertThat(thrown).hasMessageThat().contains("-i not found");
assertThat(thrown).hasMessageThat().contains("--input not found");
}
@Test
@@ -115,15 +115,15 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
}
@Test
void testSuccess_quotedPassword() throws Exception {
void testSuccess_password() throws Exception {
runCommandForced(
"--name=blobio",
"--password=\"some_password\"",
"--password=some_password",
"--registrar_type=REAL",
"--iana_id=8",
"--passcode=01234",
"--icann_referral_email=foo@bar.test",
"--street=\"123 Fake St\"",
"--street=123 Fake St",
"--city Fakington",
"--state MA",
"--zip 00351",
@@ -593,7 +593,8 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
newTld("foo", "FOO")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.of(JPY, new BigDecimal(1300)))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(JPY, new BigDecimal(1300))))
.setRestoreBillingCost(Money.of(JPY, new BigDecimal(1700)))
.setServerStatusChangeBillingCost(Money.of(JPY, new BigDecimal(1900)))
.setRegistryLockOrUnlockBillingCost(Money.of(JPY, new BigDecimal(2700)))
@@ -630,9 +631,9 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
"--password=some_password",
"--registrar_type=REAL",
"--iana_id=8",
"--street=\"1234 Main St\"",
"--street \"4th Floor\"",
"--street \"Suite 1\"",
"--street=1234 Main St",
"--street 4th Floor",
"--street Suite 1",
"--city Brooklyn",
"--state NY",
"--zip 11223",
@@ -1154,7 +1155,7 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
() ->
runCommandForced(
"--name=blobio",
"--password=\"\"",
"--password=",
"--registrar_type=REAL",
"--iana_id=8",
"--passcode=01234",
@@ -1379,7 +1380,7 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
@Test
void testFailure_tooFewStreetLines() {
assertThrows(
IllegalArgumentException.class,
ParameterException.class,
() ->
runCommandForced(
"--name=blobio",
@@ -1579,7 +1580,7 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
@Test
void testFailure_unknownFlag() {
assertThrows(
ParameterException.class,
IllegalArgumentException.class,
() ->
runCommandForced(
"--name=blobio",
@@ -30,8 +30,7 @@ class DeleteDomainCommandTest extends EppToolCommandTestCase<DeleteDomainCommand
@Test
void testSuccess_multipleWordReason() throws Exception {
runCommandForced(
"--client=NewRegistrar", "--domain_name=example.tld", "--reason=\"Test test\"");
runCommandForced("--client=NewRegistrar", "--domain_name=example.tld", "--reason=Test test");
eppVerifier.verifySent("domain_delete_multiple_word_reason.xml");
}
@@ -30,8 +30,7 @@ class DeleteHostCommandTest extends EppToolCommandTestCase<DeleteHostCommand> {
@Test
void testSuccess_multipleWordReason() throws Exception {
runCommand(
"--client=NewRegistrar", "--host=ns1.example.tld", "--force", "--reason=\"Test test\"");
runCommand("--client=NewRegistrar", "--host=ns1.example.tld", "--force", "--reason=Test test");
eppVerifier.verifySent("host_delete_multiple_word_reason.xml");
}
@@ -182,14 +182,18 @@ class EnqueuePollMessageCommandTest extends CommandTestCase<EnqueuePollMessageCo
void testDomainIsRequired() {
ParameterException thrown =
assertThrows(ParameterException.class, () -> runCommandForced("--message=Foo bar"));
assertThat(thrown).hasMessageThat().contains("The following option is required: -d, --domain");
assertThat(thrown)
.hasMessageThat()
.contains("The following option is required: [-d | --domain]");
}
@Test
void testMessageIsRequired() {
ParameterException thrown =
assertThrows(ParameterException.class, () -> runCommandForced("--domain=example.tld"));
assertThat(thrown).hasMessageThat().contains("The following option is required: -m, --message");
assertThat(thrown)
.hasMessageThat()
.contains("The following option is required: [-m | --message]");
}
@Test
@@ -20,6 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import com.beust.jcommander.ParameterException;
import google.registry.tools.server.ToolsTestData;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -85,7 +86,7 @@ class ExecuteEppCommandTest extends EppToolCommandTestCase<ExecuteEppCommand> {
@Test
void testFailure_unknownFlag() {
assertThrows(
ParameterException.class,
FileNotFoundException.class, // --unrecognized=foo is treated as the main parameter.
() -> runCommand("--client=NewRegistrar", "--unrecognized=foo", "--force", "foo.xml"));
}
}
@@ -142,8 +142,7 @@ class GenerateAllocationTokensCommandTest extends CommandTestCase<GenerateAlloca
"--discount_premiums", "true",
"--discount_years", "6",
"--token_status_transitions",
String.format(
"\"%s=NOT_STARTED,%s=VALID,%s=ENDED\"", START_OF_TIME, promoStart, promoEnd));
String.format("%s=NOT_STARTED,%s=VALID,%s=ENDED", START_OF_TIME, promoStart, promoEnd));
assertAllocationTokens(
new AllocationToken.Builder()
.setToken("promo123456789ABCDEFG")
@@ -379,8 +378,8 @@ class GenerateAllocationTokensCommandTest extends CommandTestCase<GenerateAlloca
assertThat(thrown)
.hasMessageThat()
.isEqualTo(
"Invalid value for -t parameter. Allowed values:[BULK_PRICING, DEFAULT_PROMO, PACKAGE,"
+ " SINGLE_USE, UNLIMITED_USE, REGISTER_BSA]");
"Invalid value for --type parameter. Allowed values:[BULK_PRICING, DEFAULT_PROMO,"
+ " PACKAGE, SINGLE_USE, UNLIMITED_USE, REGISTER_BSA]");
}
@Test
@@ -410,7 +409,7 @@ class GenerateAllocationTokensCommandTest extends CommandTestCase<GenerateAlloca
"--type",
"BULK_PRICING",
String.format(
"--token_status_transitions=\"%s=NOT_STARTED,%s=VALID,%s=ENDED\"",
"--token_status_transitions=%s=NOT_STARTED,%s=VALID,%s=ENDED",
START_OF_TIME, fakeClock.nowUtc(), fakeClock.nowUtc().plusDays(1)))))
.hasMessageThat()
.isEqualTo(
@@ -48,7 +48,7 @@ public class GenerateEscrowDepositCommandTest
ParameterException.class,
() ->
runCommand("--watermark=2017-01-01T00:00:00Z", "--mode=thin", "-r 42", "-o test"));
assertThat(thrown).hasMessageThat().contains("The following option is required: -t, --tld");
assertThat(thrown).hasMessageThat().contains("The following option is required: [-t | --tld]");
}
@Test
@@ -89,7 +89,7 @@ public class GenerateEscrowDepositCommandTest
() -> runCommand("--tld=tld", "--mode=full", "-r 42", "-o test"));
assertThat(thrown)
.hasMessageThat()
.contains("The following option is required: -w, --watermark");
.contains("The following option is required: [-w | --watermark]");
}
@Test
@@ -109,7 +109,9 @@ public class GenerateEscrowDepositCommandTest
() ->
runCommand(
"--tld=tld", "--watermark=2017-01-01T00:00:00Z", "--mode=thin", "-r 42"));
assertThat(thrown).hasMessageThat().contains("The following option is required: -o, --outdir");
assertThat(thrown)
.hasMessageThat()
.contains("The following option is required: [-o | --outdir]");
}
@Test
@@ -156,7 +158,7 @@ public class GenerateEscrowDepositCommandTest
"-o test"));
assertThat(thrown)
.hasMessageThat()
.contains("Invalid value for -m parameter. Allowed values:[FULL, THIN]");
.contains("Invalid value for --mode parameter. Allowed values:[FULL, THIN]");
}
@Test
@@ -14,9 +14,9 @@
package google.registry.tools;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
import com.google.common.truth.Truth;
import google.registry.testing.FakeClock;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -53,6 +53,6 @@ public class GetEppResourceCommandTest {
@Test
public void readTimestampNotProvided_setToNow_noException() {
commandUnderTest.run();
Truth.assertThat(commandUnderTest.readTimestamp).isEqualTo(clock.nowUtc());
assertThat(commandUnderTest.readTimestamp).isEqualTo(clock.nowUtc());
}
}
@@ -205,7 +205,7 @@ class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--registrar=blobio",
"--email=contact@email.com",
"--certfile=" + getCertFilename()));
assertThat(thrown).hasMessageThat().contains("option is required: -a, --ip_allow_list");
assertThat(thrown).hasMessageThat().contains("option is required: [-a | --ip_allow_list]");
}
@Test
@@ -218,7 +218,7 @@ class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--ip_allow_list=1.1.1.1",
"--email=contact@email.com",
"--certfile=" + getCertFilename()));
assertThat(thrown).hasMessageThat().contains("option is required: -r, --registrar");
assertThat(thrown).hasMessageThat().contains("option is required: [-r | --registrar]");
}
@Test
@@ -244,7 +244,7 @@ class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--ip_allow_list=1.1.1.1",
"--certfile=" + getCertFilename(),
"--registrar=blobio"));
assertThat(thrown).hasMessageThat().contains("option is required: --email");
assertThat(thrown).hasMessageThat().contains("option is required: [--email]");
}
@Test
@@ -15,10 +15,9 @@
package google.registry.tools;
import static com.google.common.truth.Truth.assertThat;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.charset.StandardCharsets.US_ASCII;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.MissingCommandException;
@@ -28,15 +27,20 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import google.registry.testing.FakeClock;
import google.registry.testing.SystemPropertyExtension;
import google.registry.tools.ShellCommand.JCommanderCompletor;
import java.io.BufferedReader;
import google.registry.tools.ShellCommand.JCommanderCompleter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.jline.reader.Candidate;
import org.jline.reader.LineReaderBuilder;
import org.jline.reader.impl.DefaultParser;
import org.jline.terminal.Terminal;
import org.jline.terminal.impl.DumbTerminal;
import org.joda.time.DateTime;
import org.joda.time.Duration;
import org.junit.jupiter.api.AfterEach;
@@ -51,7 +55,8 @@ class ShellCommandTest {
final SystemPropertyExtension systemPropertyExtension = new SystemPropertyExtension();
CommandRunner cli = mock(CommandRunner.class);
private FakeClock clock = new FakeClock(DateTime.parse("2000-01-01TZ"));
private final FakeClock clock = new FakeClock(DateTime.parse("2000-01-01TZ"));
private final DelayingByteArrayInputStream input = new DelayingByteArrayInputStream(clock);
private PrintStream orgStdout;
private PrintStream orgStderr;
@@ -61,6 +66,7 @@ class ShellCommandTest {
@BeforeEach
void beforeEach() {
RegistryToolEnvironment.UNITTEST.setup(systemPropertyExtension);
orgStdout = System.out;
orgStderr = System.err;
}
@@ -82,27 +88,20 @@ class ShellCommandTest {
private ShellCommand createShellCommand(
CommandRunner commandRunner, Duration delay, String... commands) throws Exception {
ArrayDeque<String> queue = new ArrayDeque<String>(ImmutableList.copyOf(commands));
BufferedReader bufferedReader = mock(BufferedReader.class);
when(bufferedReader.readLine())
.thenAnswer(
(x) -> {
clock.advanceBy(delay);
if (queue.isEmpty()) {
throw new IOException();
}
return queue.poll();
});
return new ShellCommand(bufferedReader, clock, commandRunner);
input.setInput(commands);
input.setDelay(delay);
Terminal terminal = new DumbTerminal(input, System.out);
return new ShellCommand(terminal, clock, commandRunner);
}
@Test
void testCommandProcessing() throws Exception {
MockCli cli = new MockCli();
FakeCli cli = new FakeCli();
ShellCommand shellCommand =
createShellCommand(cli, Duration.ZERO, "test1 foo bar", "test2 foo bar");
createShellCommand(cli, Duration.ZERO, "test1 foo bar", "test2 foo bar", "exit");
shellCommand.run();
assertThat(cli.calls)
// "exit" causes the shell to exit and does not call cli.run.
.containsExactly(
ImmutableList.of("test1", "foo", "bar"), ImmutableList.of("test2", "foo", "bar"))
.inOrder();
@@ -111,7 +110,7 @@ class ShellCommandTest {
@Test
void testNoIdleWhenInAlpha() throws Exception {
RegistryToolEnvironment.ALPHA.setup(systemPropertyExtension);
MockCli cli = new MockCli();
FakeCli cli = new FakeCli();
ShellCommand shellCommand =
createShellCommand(cli, Duration.standardDays(1), "test1 foo bar", "test2 foo bar");
shellCommand.run();
@@ -120,7 +119,7 @@ class ShellCommandTest {
@Test
void testNoIdleWhenInSandbox() throws Exception {
RegistryToolEnvironment.SANDBOX.setup(systemPropertyExtension);
MockCli cli = new MockCli();
FakeCli cli = new FakeCli();
ShellCommand shellCommand =
createShellCommand(cli, Duration.standardDays(1), "test1 foo bar", "test2 foo bar");
shellCommand.run();
@@ -129,7 +128,7 @@ class ShellCommandTest {
@Test
void testIdleWhenOverHourInProduction() throws Exception {
RegistryToolEnvironment.PRODUCTION.setup(systemPropertyExtension);
MockCli cli = new MockCli();
FakeCli cli = new FakeCli();
ShellCommand shellCommand =
createShellCommand(cli, Duration.standardMinutes(61), "test1 foo bar", "test2 foo bar");
RuntimeException exception = assertThrows(RuntimeException.class, shellCommand::run);
@@ -139,7 +138,7 @@ class ShellCommandTest {
@Test
void testNoIdleWhenUnderHourInProduction() throws Exception {
RegistryToolEnvironment.PRODUCTION.setup(systemPropertyExtension);
MockCli cli = new MockCli();
FakeCli cli = new FakeCli();
ShellCommand shellCommand =
createShellCommand(cli, Duration.standardMinutes(59), "test1 foo bar", "test2 foo bar");
shellCommand.run();
@@ -149,7 +148,6 @@ class ShellCommandTest {
void testMultipleCommandInvocations() throws Exception {
RegistryCli cli =
new RegistryCli("unittest", ImmutableMap.of("test_command", TestCommand.class));
RegistryToolEnvironment.UNITTEST.setup(systemPropertyExtension);
cli.setEnvironment(RegistryToolEnvironment.UNITTEST);
cli.run(new String[] {"test_command", "-x", "xval", "arg1", "arg2"});
cli.run(new String[] {"test_command", "-x", "otherxval", "arg3"});
@@ -170,85 +168,83 @@ class ShellCommandTest {
assertThrows(MissingCommandException.class, () -> cli.run(new String[] {"bad_command"}));
}
private void performJCommanderCompletorTest(
String line, int expectedBackMotion, String... expectedCompletions) {
private void performJCommanderCompletorTest(String line, String... expectedCompletions) {
JCommander jcommander = new JCommander();
List<Candidate> candidates = Arrays.stream(expectedCompletions).map(Candidate::new).toList();
jcommander.setProgramName("test");
jcommander.addCommand("help", new HelpCommand(jcommander));
jcommander.addCommand("testCommand", new TestCommand());
jcommander.addCommand("testAnotherCommand", new TestAnotherCommand());
List<String> completions = new ArrayList<>();
assertThat(
line.length()
- new JCommanderCompletor(jcommander)
.completeInternal(line, line.length(), completions))
.isEqualTo(expectedBackMotion);
assertThat(completions).containsExactlyElementsIn(expectedCompletions);
List<Candidate> completions = new ArrayList<>();
new JCommanderCompleter(jcommander)
.complete(
LineReaderBuilder.builder().build(),
new DefaultParser().parse(line, line.length()),
completions);
assertThat(completions).containsExactlyElementsIn(candidates);
}
@Test
void testCompletion_commands() {
performJCommanderCompletorTest("", 0, "testCommand ", "testAnotherCommand ", "help ");
performJCommanderCompletorTest("n", 1);
performJCommanderCompletorTest("test", 4, "testCommand ", "testAnotherCommand ");
performJCommanderCompletorTest(" test", 4, "testCommand ", "testAnotherCommand ");
performJCommanderCompletorTest("testC", 5, "testCommand ");
performJCommanderCompletorTest("testA", 5, "testAnotherCommand ");
performJCommanderCompletorTest("", "testCommand ", "testAnotherCommand ", "help ");
performJCommanderCompletorTest("n");
performJCommanderCompletorTest("test", "testCommand ", "testAnotherCommand ");
performJCommanderCompletorTest(" test", "testCommand ", "testAnotherCommand ");
performJCommanderCompletorTest("testC", "testCommand ");
performJCommanderCompletorTest("testA", "testAnotherCommand ");
}
@Test
void testCompletion_help() {
performJCommanderCompletorTest("h", 1, "help ");
performJCommanderCompletorTest("help ", 0, "testCommand ", "testAnotherCommand ", "help ");
performJCommanderCompletorTest("help testC", 5, "testCommand ");
performJCommanderCompletorTest("help testCommand ", 0);
performJCommanderCompletorTest("h", "help ");
performJCommanderCompletorTest("help ", "testCommand ", "testAnotherCommand ", "help ");
performJCommanderCompletorTest("help testC", "testCommand ");
performJCommanderCompletorTest("help testCommand ");
}
@Test
void testCompletion_documentation() {
performJCommanderCompletorTest(
"testCommand ",
0,
"",
"Main parameter: normal argument\n (java.util.List<java.lang.String>)");
performJCommanderCompletorTest("testAnotherCommand ", 0, "", "Main parameter: [None]");
"Main parameter: normal arguments\n (java.util.List<java.lang.String>)");
performJCommanderCompletorTest("testAnotherCommand ", "", "Main parameter: [None]");
performJCommanderCompletorTest(
"testCommand -x ", 0, "", "Flag documentation: test parameter\n (java.lang.String)");
"testCommand -x ", "", "Flag documentation: test parameter\n (java.lang.String)");
performJCommanderCompletorTest(
"testAnotherCommand -x ", 0, "", "Flag documentation: [No documentation available]");
"testAnotherCommand -x ", "", "Flag documentation: [No documentation available]");
performJCommanderCompletorTest(
"testCommand x ",
0,
"",
"Main parameter: normal argument\n (java.util.List<java.lang.String>)");
performJCommanderCompletorTest("testAnotherCommand x ", 0, "", "Main parameter: [None]");
"Main parameter: normal arguments\n (java.util.List<java.lang.String>)");
performJCommanderCompletorTest("testAnotherCommand x ", "", "Main parameter: [None]");
}
@Test
void testCompletion_arguments() {
performJCommanderCompletorTest("testCommand -", 1, "-x ", "--xparam ", "--xorg ");
performJCommanderCompletorTest("testCommand --wrong", 7);
performJCommanderCompletorTest("testCommand noise --", 2, "--xparam ", "--xorg ");
performJCommanderCompletorTest("testAnotherCommand --o", 3);
performJCommanderCompletorTest("testCommand -", "-x ", "--xparam ", "--xorg ");
performJCommanderCompletorTest("testCommand --wrong");
performJCommanderCompletorTest("testCommand noise --", "--xparam ", "--xorg ");
performJCommanderCompletorTest("testAnotherCommand --o");
}
@Test
void testCompletion_enum() {
performJCommanderCompletorTest("testCommand --xorg P", 1, "PRIVATE ", "PUBLIC ");
performJCommanderCompletorTest("testCommand --xorg PU", 2, "PUBLIC ");
performJCommanderCompletorTest("testCommand --xorg P", "PRIVATE ", "PUBLIC ");
performJCommanderCompletorTest("testCommand --xorg PU", "PUBLIC ");
performJCommanderCompletorTest(
"testCommand --xorg ", 0, "", "Flag documentation: test organization\n (PRIVATE, PUBLIC)");
"testCommand --xorg ", "", "Flag documentation: test organization\n (PRIVATE, PUBLIC)");
}
@Test
void testEncapsulatedOutputStream_basicFuncionality() throws Exception {
void testEncapsulatedOutputStream_basicFunctionality() throws Exception {
ByteArrayOutputStream backing = new ByteArrayOutputStream();
try (PrintStream out =
new PrintStream(new ShellCommand.EncapsulatingOutputStream(backing, "out: "))) {
out.println("first line");
out.print("second line\ntrailing data");
}
assertThat(backing.toString("UTF-8"))
assertThat(backing.toString(US_ASCII))
.isEqualTo("out: first line\nout: second line\nout: trailing data\n");
}
@@ -256,51 +252,60 @@ class ShellCommandTest {
void testEncapsulatedOutputStream_emptyStream() throws Exception {
ByteArrayOutputStream backing = new ByteArrayOutputStream();
new PrintStream(new ShellCommand.EncapsulatingOutputStream(backing, "out: ")).close();
assertThat(backing.toString("UTF-8")).isEqualTo("");
assertThat(backing.toString(US_ASCII)).isEqualTo("");
}
@Test
void testEncapsulatedOutput_command() throws Exception {
RegistryToolEnvironment.ALPHA.setup(systemPropertyExtension);
captureOutput();
ShellCommand shellCommand =
new ShellCommand(
createShellCommand(
args -> {
System.out.println("first line");
System.err.println("second line");
System.out.print("fragmented ");
System.err.println("surprise!");
System.out.println("line");
});
},
Duration.ZERO,
"command1");
shellCommand.encapsulateOutput = true;
shellCommand.run();
assertThat(stderr.toString("UTF-8")).isEmpty();
assertThat(stdout.toString("UTF-8"))
assertThat(stderr.toString(US_ASCII)).isEmpty();
assertThat(stdout.toString(US_ASCII))
.isEqualTo(
"RUNNING \"command1\"\n"
+ "out: first line\nerr: second line\nerr: surprise!\nout: fragmented line\n"
+ "SUCCESS\n");
"""
RUNNING "command1"
out: first line
err: second line
err: surprise!
out: fragmented line
SUCCESS
""");
}
@Test
void testEncapsulatedOutput_throws() throws Exception {
RegistryToolEnvironment.ALPHA.setup(systemPropertyExtension);
captureOutput();
ShellCommand shellCommand =
new ShellCommand(
createShellCommand(
args -> {
System.out.println("first line");
throw new Exception("some error!");
});
},
Duration.ZERO,
"command1");
shellCommand.encapsulateOutput = true;
shellCommand.run();
assertThat(stderr.toString("UTF-8")).isEmpty();
assertThat(stdout.toString("UTF-8"))
assertThat(stderr.toString(US_ASCII)).isEmpty();
assertThat(stdout.toString(US_ASCII))
.isEqualTo(
"RUNNING \"command1\"\n"
+ "out: first line\n"
+ "FAILURE java.lang.Exception some error!\n");
"""
RUNNING "command1"
out: first line
FAILURE java.lang.Exception some error!
""");
}
@Test
@@ -308,16 +313,11 @@ class ShellCommandTest {
captureOutput();
ShellCommand shellCommand =
createShellCommand(
args -> {
System.out.println("first line");
},
Duration.ZERO,
"",
"do something");
args -> System.out.println("first line"), Duration.ZERO, "", "do something");
shellCommand.encapsulateOutput = true;
shellCommand.run();
assertThat(stderr.toString("UTF-8")).isEmpty();
assertThat(stdout.toString("UTF-8"))
assertThat(stderr.toString(US_ASCII)).isEmpty();
assertThat(stdout.toString(US_ASCII))
.isEqualTo("RUNNING \"do\" \"something\"\nout: first line\nSUCCESS\n");
}
@@ -327,10 +327,10 @@ class ShellCommandTest {
stderr = new ByteArrayOutputStream();
System.setOut(new PrintStream(stdout));
System.setErr(new PrintStream(stderr));
System.setIn(new ByteArrayInputStream("command1\n".getBytes(UTF_8)));
System.setIn(new ByteArrayInputStream("command1\n".getBytes(US_ASCII)));
}
static class MockCli implements CommandRunner {
static class FakeCli implements CommandRunner {
public ArrayList<ImmutableList<String>> calls = new ArrayList<>();
@Override
@@ -341,10 +341,12 @@ class ShellCommandTest {
@Parameters(commandDescription = "Test command")
static class TestCommand implements Command {
// List for recording command invocations by run().
//
// This has to be static because it gets populated by multiple TestCommand instances, which are
// created in RegistryCli by using reflection to call the constructor.
/**
* List for recording command invocations by {@link #run}.
*
* <p>This has to be static because it gets populated by multiple TestCommand instances, which
* are created in {@link RegistryCli} by using reflection to call the constructor.
*/
static final List<List<String>> commandInvocations = new ArrayList<>();
@Parameter(
@@ -356,7 +358,8 @@ class ShellCommandTest {
names = {"--xorg"},
description = "test organization")
OrgType orgType = OrgType.PRIVATE;
@Parameter(description = "normal argument")
@Parameter(description = "normal arguments")
List<String> args;
TestCommand() {}
@@ -382,4 +385,33 @@ class ShellCommandTest {
@Override
public void run() {}
}
@SuppressWarnings("InputStreamSlowMultibyteRead")
private static class DelayingByteArrayInputStream extends InputStream {
private final FakeClock clock;
private ByteArrayInputStream stream;
private Duration delay;
DelayingByteArrayInputStream(FakeClock clock) {
this.clock = clock;
}
void setInput(String... commands) {
this.stream =
new ByteArrayInputStream((String.join("\n", commands) + "\n").getBytes(US_ASCII));
}
void setDelay(Duration delay) {
this.delay = delay;
}
@Override
public int read() throws IOException {
int nextByte = stream.read();
if (nextByte == '\n') {
clock.advanceBy(delay);
}
return nextByte;
}
}
}
@@ -317,7 +317,7 @@ class UpdateAllocationTokensCommandTest extends CommandTestCase<UpdateAllocation
"token",
"--token_status_transitions",
String.format(
"\"%s=NOT_STARTED,%s=VALID,%s=CANCELLED\"", START_OF_TIME, now.minusDays(1), now));
"%s=NOT_STARTED,%s=VALID,%s=CANCELLED", START_OF_TIME, now.minusDays(1), now));
token = reloadResource(token);
assertThat(token.getTokenStatusTransitions().toValueMap())
.containsExactly(START_OF_TIME, NOT_STARTED, now.minusDays(1), VALID, now, CANCELLED);
@@ -336,8 +336,7 @@ class UpdateAllocationTokensCommandTest extends CommandTestCase<UpdateAllocation
"token",
"--token_status_transitions",
String.format(
"\"%s=NOT_STARTED,%s=ENDED,%s=VALID\"",
START_OF_TIME, now.minusDays(1), now)));
"%s=NOT_STARTED,%s=ENDED,%s=VALID", START_OF_TIME, now.minusDays(1), now)));
assertThat(thrown)
.hasMessageThat()
.isEqualTo("tokenStatusTransitions map cannot transition from NOT_STARTED to ENDED.");
@@ -364,8 +363,7 @@ class UpdateAllocationTokensCommandTest extends CommandTestCase<UpdateAllocation
"--prefix",
"token",
"--token_status_transitions",
String.format(
"\"%s=NOT_STARTED,%s=VALID,%s=ENDED\"", START_OF_TIME, now.minusDays(1), now));
String.format("%s=NOT_STARTED,%s=VALID,%s=ENDED", START_OF_TIME, now.minusDays(1), now));
token = reloadResource(token);
assertThat(token.getTokenStatusTransitions().toValueMap())
.containsExactly(START_OF_TIME, NOT_STARTED, now.minusDays(1), VALID, now, ENDED);
@@ -403,8 +401,7 @@ class UpdateAllocationTokensCommandTest extends CommandTestCase<UpdateAllocation
"token",
"--token_status_transitions",
String.format(
"\"%s=NOT_STARTED,%s=VALID,%s=ENDED\"",
START_OF_TIME, now.minusDays(1), now)));
"%s=NOT_STARTED,%s=VALID,%s=ENDED", START_OF_TIME, now.minusDays(1), now)));
assertThat(thrown)
.hasMessageThat()
.isEqualTo(
@@ -20,7 +20,6 @@ import static google.registry.testing.DatabaseHelper.persistResource;
import static org.junit.jupiter.api.Assertions.assertThrows;
import com.google.common.collect.ImmutableSet;
import com.google.common.truth.Truth;
import google.registry.model.billing.BillingBase.RenewalPriceBehavior;
import google.registry.model.domain.fee.FeeQueryCommandExtensionItem.CommandName;
import google.registry.model.domain.token.AllocationToken;
@@ -77,10 +76,10 @@ public class UpdateBulkPricingPackageCommandTest
tm().transact(() -> BulkPricingPackage.loadByTokenString("abc123"));
assertThat(bulkPricingPackageOptional).isPresent();
BulkPricingPackage bulkPricingPackage = bulkPricingPackageOptional.get();
Truth.assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
Truth.assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
Truth.assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
Truth.assertThat(bulkPricingPackage.getNextBillingDate())
assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
assertThat(bulkPricingPackage.getNextBillingDate())
.isEqualTo(DateTime.parse("2013-03-17T00:00:00Z"));
assertThat(bulkPricingPackage.getLastNotificationSent()).isEmpty();
}
@@ -108,7 +107,7 @@ public class UpdateBulkPricingPackageCommandTest
"--price=USD 1000.00",
"--next_billing_date=2012-03-17T00:00:00Z",
"nullPackage"));
Truth.assertThat(thrown.getMessage())
assertThat(thrown.getMessage())
.isEqualTo("BulkPricingPackage with token nullPackage does not exist");
}
@@ -125,10 +124,10 @@ public class UpdateBulkPricingPackageCommandTest
tm().transact(() -> BulkPricingPackage.loadByTokenString("abc123"));
assertThat(bulkPricingPackageOptional).isPresent();
BulkPricingPackage bulkPricingPackage = bulkPricingPackageOptional.get();
Truth.assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(100);
Truth.assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
Truth.assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
Truth.assertThat(bulkPricingPackage.getNextBillingDate())
assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(100);
assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
assertThat(bulkPricingPackage.getNextBillingDate())
.isEqualTo(DateTime.parse("2013-03-17T00:00:00Z"));
assertThat(bulkPricingPackage.getLastNotificationSent()).isEmpty();
}
@@ -146,10 +145,10 @@ public class UpdateBulkPricingPackageCommandTest
tm().transact(() -> BulkPricingPackage.loadByTokenString("abc123"));
assertThat(bulkPricingPackageOptional).isPresent();
BulkPricingPackage bulkPricingPackage = bulkPricingPackageOptional.get();
Truth.assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
Truth.assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
Truth.assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
Truth.assertThat(bulkPricingPackage.getNextBillingDate())
assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
assertThat(bulkPricingPackage.getNextBillingDate())
.isEqualTo(DateTime.parse("2012-11-12T05:00:00Z"));
assertThat(bulkPricingPackage.getLastNotificationSent()).isEmpty();
}
@@ -167,10 +166,10 @@ public class UpdateBulkPricingPackageCommandTest
tm().transact(() -> BulkPricingPackage.loadByTokenString("abc123"));
assertThat(bulkPricingPackageOptional).isPresent();
BulkPricingPackage bulkPricingPackage = bulkPricingPackageOptional.get();
Truth.assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
Truth.assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
Truth.assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 1000));
Truth.assertThat(bulkPricingPackage.getNextBillingDate())
assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 1000));
assertThat(bulkPricingPackage.getNextBillingDate())
.isEqualTo(DateTime.parse("2013-03-17T00:00:00Z"));
assertThat(bulkPricingPackage.getLastNotificationSent()).isEmpty();
}
@@ -183,12 +182,12 @@ public class UpdateBulkPricingPackageCommandTest
tm().transact(() -> BulkPricingPackage.loadByTokenString("abc123"));
assertThat(bulkPricingPackageOptional).isPresent();
BulkPricingPackage bulkPricingPackage = bulkPricingPackageOptional.get();
Truth.assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
Truth.assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
Truth.assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
Truth.assertThat(bulkPricingPackage.getNextBillingDate())
assertThat(bulkPricingPackage.getMaxDomains()).isEqualTo(200);
assertThat(bulkPricingPackage.getMaxCreates()).isEqualTo(1000);
assertThat(bulkPricingPackage.getBulkPrice()).isEqualTo(Money.of(CurrencyUnit.USD, 2000));
assertThat(bulkPricingPackage.getNextBillingDate())
.isEqualTo(DateTime.parse("2012-11-12T05:00:00Z"));
Truth.assertThat(bulkPricingPackage.getLastNotificationSent().get())
assertThat(bulkPricingPackage.getLastNotificationSent().get())
.isEqualTo(DateTime.parse("2010-11-12T05:00:00.000Z"));
}
}
@@ -213,7 +213,7 @@ class UpdateDomainCommandTest extends EppToolCommandTestCase<UpdateDomainCommand
"--client=NewRegistrar",
"--registrant=crr-admin",
"--password=2fooBAR",
"--reason=\"Testing domain update\"",
"--reason=Testing domain update",
"--registrar_request=false",
"example.tld");
eppVerifier.verifySent("domain_update_change_metadata.xml");
@@ -414,7 +414,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
.asBuilder()
.setBillingAccountMap(ImmutableMap.of(USD, "abc123", JPY, "789xyz"))
.build());
runCommand("--billing_account_map=\"\"", "--force", "NewRegistrar");
runCommand("--billing_account_map=", "--force", "NewRegistrar");
assertThat(loadRegistrar("NewRegistrar").getBillingAccountMap()).isEmpty();
}
@@ -449,7 +449,8 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
newTld("foo", "FOO")
.asBuilder()
.setCurrency(JPY)
.setCreateBillingCost(Money.of(JPY, new BigDecimal(1300)))
.setCreateBillingCostTransitions(
ImmutableSortedMap.of(START_OF_TIME, Money.of(JPY, new BigDecimal(1300))))
.setRestoreBillingCost(Money.of(JPY, new BigDecimal(1700)))
.setServerStatusChangeBillingCost(Money.of(JPY, new BigDecimal(1900)))
.setRegistryLockOrUnlockBillingCost(Money.of(JPY, new BigDecimal(2700)))
@@ -481,9 +482,9 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
@Test
void testSuccess_streetAddress() throws Exception {
runCommand(
"--street=\"1234 Main St\"",
"--street \"4th Floor\"",
"--street \"Suite 1\"",
"--street=1234 Main St",
"--street 4th Floor",
"--street Suite 1",
"--city Brooklyn",
"--state NY",
"--zip 11223",
@@ -901,7 +902,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
@Test
void testFailure_tooFewStreetLines() {
assertThrows(
IllegalArgumentException.class,
ParameterException.class,
() ->
runCommand(
"--street",
@@ -916,7 +917,7 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
@Test
void testFailure_unknownFlag() {
assertThrows(
ParameterException.class,
IllegalArgumentException.class,
() -> runCommand("--force", "--unrecognized_flag=foo", "NewRegistrar"));
}
@@ -31,8 +31,12 @@ class UpdateServerLocksCommandTest extends EppToolCommandTestCase<UpdateServerLo
@Test
void testSuccess_multipleWordReason() throws Exception {
runCommandForced("--client=NewRegistrar", "--registrar_request=false",
"--reason=\"Test this\"", "--domain_name=example.tld", "--apply=serverRenewProhibited");
runCommandForced(
"--client=NewRegistrar",
"--registrar_request=false",
"--reason=Test this",
"--domain_name=example.tld",
"--apply=serverRenewProhibited");
eppVerifier.verifySent("update_server_locks_multiple_word_reason.xml");
}
@@ -78,7 +78,7 @@ class VerifyOteCommandTest extends CommandTestCase<VerifyOteCommand> {
@Test
void testFailure_noRegistrarsNoCheckAll() {
IllegalArgumentException thrown =
assertThrows(IllegalArgumentException.class, () -> runCommand(""));
assertThrows(IllegalArgumentException.class, () -> runCommand());
assertThat(thrown)
.hasMessageThat()
.contains("Must provide at least one registrar name, or supply --check_all with no names.");
@@ -15,6 +15,7 @@
package google.registry.ui.server.registrar;
import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.common.truth.Truth.assertThat;
import static com.google.monitoring.metrics.contrib.LongMetricSubject.assertThat;
import static google.registry.request.auth.AuthenticatedRegistrarAccessor.Role.ADMIN;
import static google.registry.request.auth.AuthenticatedRegistrarAccessor.Role.OWNER;
@@ -32,7 +33,6 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.truth.Truth;
import google.registry.flows.certs.CertificateChecker;
import google.registry.groups.GmailClient;
import google.registry.model.registrar.RegistrarPoc;
@@ -167,7 +167,7 @@ public abstract class RegistrarSettingsActionTestCase {
void verifyNotificationEmailsSent() throws Exception {
ArgumentCaptor<EmailMessage> captor = ArgumentCaptor.forClass(EmailMessage.class);
verify(gmailClient).sendEmail(captor.capture());
Truth.assertThat(captor.getValue().recipients())
assertThat(captor.getValue().recipients())
.containsExactly(
new InternetAddress("notification@test.example"),
new InternetAddress("notification2@test.example"),
@@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
creationTime: "2022-09-01T00:00:00.000Z"
currency: "USD"
defaultPromoTokens: []
@@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
creationTime: "2022-09-01T00:00:00.000Z"
currency: "USD"
defaultPromoTokens: []
@@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
creationTime: "2022-09-01T00:00:00.000Z"
defaultPromoTokens: []
dnsAPlusAaaaTtl: null
@@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
creationTime: "2022-09-01T00:00:00.000Z"
currency: "USD"
defaultPromoTokens: []
@@ -30,6 +30,10 @@ currency: "USD"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
restoreBillingCost:
currency: "USD"
amount: 17.00
@@ -53,3 +53,7 @@ eapFeeSchedule:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 0.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
@@ -30,6 +30,10 @@ currency: "USD"
createBillingCost:
currency: "USD"
amount: 25.00
createBillingCostTransitions:
"1970-01-01T00:00:00.000Z":
currency: "USD"
amount: 25.00
restoreBillingCost:
currency: %RESTORECURRENCY%
amount: 70.00
+13 -12
View File
@@ -21,8 +21,8 @@ com.github.jnr:jnr-posix:3.1.19=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.github.jnr:jnr-unixsocket:0.38.22=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.github.jnr:jnr-x86asm:1.0.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.api-client:google-api-client:2.3.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:2.4.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sqladmin:v1beta4-rev20240304-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -30,14 +30,13 @@ com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,error
com.google.auto.value:auto-value-annotations:1.10.4=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,errorprone,testAnnotationProcessor
com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationProcessor
com.google.cloud.sql:jdbc-socket-factory-core:1.17.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.26.0=deploy_jar,runtimeClasspath
com.google.errorprone:error_prone_annotations:2.26.1=testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotations:2.26.1=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
@@ -50,8 +49,8 @@ com.google.guava:failureaccess:1.0.2=deploy_jar,runtimeClasspath,testCompileClas
com.google.guava:guava-parent:32.1.1-jre=annotationProcessor,errorprone,testAnnotationProcessor
com.google.guava:guava:31.0.1-jre=checkstyle
com.google.guava:guava:32.1.1-jre=annotationProcessor,errorprone,testAnnotationProcessor
com.google.guava:guava:33.0.0-android=deploy_jar,runtimeClasspath
com.google.guava:guava:33.1.0-jre=testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-android=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=testCompileClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-gson:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -65,7 +64,7 @@ com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnno
com.google.truth:truth:1.4.2=testCompileClasspath,testRuntimeClasspath
com.puppycrawl.tools:checkstyle:9.3=checkstyle
commons-beanutils:commons-beanutils:1.9.4=checkstyle
commons-codec:commons-codec:1.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
commons-codec:commons-codec:1.16.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
commons-collections:commons-collections:3.2.2=checkstyle
commons-logging:commons-logging:1.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
info.picocli:picocli:4.6.2=checkstyle
@@ -75,6 +74,8 @@ io.grpc:grpc-api:1.60.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-context:1.60.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-api:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-http-util:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
jakarta.inject:jakarta.inject-api:1.0.5=testCompileClasspath,testRuntimeClasspath
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
joda-time:joda-time:2.12.7=testCompileClasspath,testRuntimeClasspath
@@ -90,8 +91,8 @@ org.checkerframework:checker-compat-qual:2.5.3=testCompileClasspath,testRuntimeC
org.checkerframework:checker-qual:3.12.0=checkstyle
org.checkerframework:checker-qual:3.33.0=annotationProcessor,errorprone,testAnnotationProcessor
org.checkerframework:checker-qual:3.42.0=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.11.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.11.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
org.jacoco:org.jacoco.agent:0.8.11=jacocoAgent,jacocoAnt
org.jacoco:org.jacoco.ant:0.8.11=jacocoAnt
@@ -113,7 +114,7 @@ org.ow2.asm:asm-tree:9.6=jacocoAnt
org.ow2.asm:asm:9.2=deploy_jar,runtimeClasspath
org.ow2.asm:asm:9.6=jacocoAnt,testCompileClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,testAnnotationProcessor
org.postgresql:postgresql:42.7.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.36=testCompileClasspath
+2 -4
View File
@@ -39,16 +39,12 @@ ext {
// PINNED VERSIONS START HERE.
// Breaking changes causing compilation error.
// TODO: Upgrade to 1.8x+
'com.beust:jcommander:1.60',
// TODO: Migrate to com.google.cloud:google-cloud-dns if
// https://github.com/googleapis/google-cloud-java/issues/8929 is fixed.
// At least migrate to v2.
'com.google.apis:google-api-services-dns:v2beta1-rev99-1.25.0',
// TODO: Migrate to v3
'com.google.apis:google-api-services-drive:v2-rev393-1.25.0',
// TODO: Migrate to org.jline
'jline:jline:1.0',
// TODO: Remove after the legacy console is deleted.
'com.google.closure-stylesheets:closure-stylesheets:1.5.0',
@@ -221,6 +217,8 @@ ext {
'org.hamcrest:hamcrest-core:[2.2,)',
'org.hamcrest:hamcrest-library:[2.2,)',
'org.hamcrest:hamcrest:[2.2,)',
'org.jcommander:jcommander:[1.83,)',
'org.jline:jline:[3.0,)',
'org.joda:joda-money:[1.0.1,)',
'org.json:json:[20160810,)',
'org.jsoup:jsoup:[1.13.1,)',
+15
View File
@@ -49,6 +49,15 @@ tasks.register('buildNomulusImage', Exec) {
dependsOn(tasks.named('stage'))
}
tasks.register('tagNomulusImage', Exec) {
commandLine 'docker', 'tag', 'nomulus', "gcr.io/${rootProject.gcpProject}/nomulus"
dependsOn(tasks.named('buildNomulusImage'))
}
tasks.register('pushNomulusImage', Exec) {
commandLine 'docker', 'push', "gcr.io/${rootProject.gcpProject}/nomulus"
}
tasks.register('run', JavaExec) {
// We do the check when the task actually runs, not when we define it.
// This way if one doesn't set the value, one can still run other tasks.
@@ -66,4 +75,10 @@ tasks.register('run', JavaExec) {
dependsOn(tasks.named('stage'))
}
tasks.register('deployNomulus', Exec) {
dependsOn(tasks.named('pushNomulusImage'), tasks.named(":proxy:pushProxyImage"))
configure verifyDeploymentConfig
commandLine './deploy-nomulus-for-env.sh', "${rootProject.environment}"
}
project.build.dependsOn(tasks.named('buildNomulusImage'))
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
# Copyright 2024 The Nomulus Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This script prepares the proxy k8s manifest, pushes it to the clusters, and
# kills all running pods to force k8s to create new pods using the just-pushed
# manifest.
if [[ $# -ne 1 ]]; then
echo "Usage: $0 alpha|crash|qa"
exit 1
fi
environment=${1}
project="domain-registry-"${environment}
current_context=$(kubectl config current-context)
while read line
do
parts=(${line})
echo "Updating cluster ${parts[0]} in location ${parts[1]}..."
gcloud container clusters get-credentials "${parts[0]}" \
--project "${project}" --location "${parts[1]}"
sed s/GCP_PROJECT/${project}/g "./kubernetes/nomulus-deployment.yaml" | \
sed s/ENVIRONMENT/${environment}/g | \
kubectl apply -f -
kubectl apply -f "./kubernetes/nomulus-service.yaml"
#kubectl apply -f "./kubernetes/nomulus-gateway.yaml"
# Kills all running pods, new pods created will be pulling the new image.
kubectl delete pods --all
done < <(gcloud container clusters list --project ${project} | grep nomulus)
kubectl config use-context "$current_context"
+107 -113
View File
@@ -4,8 +4,6 @@
antlr:antlr:2.7.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
aopalliance:aopalliance:1.0=annotationProcessor,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
args4j:args4j:2.33=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.101tec:zkclient:0.10=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.beust:jcommander:1.60=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.charleskorn.kaml:kaml:0.20.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.16.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.16.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -36,65 +34,65 @@ com.google.api-client:google-api-client-jackson2:2.0.1=deploy_jar,runtimeClasspa
com.google.api-client:google-api-client-java6:2.1.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client-servlet:2.4.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:1.35.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.36.0-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.172.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.172.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.108.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.12.20=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.36.0-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.30.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.172.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.172.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.109.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.34.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.108.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.12.20=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1beta1:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-executor-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.36.0-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.28.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.32.1-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.173.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.173.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.33.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.108.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.12.22=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.32.1-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.37.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.173.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.173.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.33.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.33.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.109.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.16.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.108.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.12.22=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1beta2:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-executor-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.32.1-alpha=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.37.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.32.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.29.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-admin-directory:directory_v1-rev20240304-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-appengine:v1-rev20240226-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20230812-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20230806-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20240124-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20240128-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dataflow:v1b3-rev20240113-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dns:v2beta1-rev99-1.25.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-drive:v2-rev393-1.25.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-gmail:v1-rev20231218-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-groupssettings:v1-rev20210624-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-healthcare:v1-rev20240110-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-healthcare:v1-rev20240130-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-iamcredentials:v1-rev20211203-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-monitoring:v3-rev20240303-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-pubsub:v1-rev20220904-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sheets:v4-rev20230815-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sheets:v4-rev20240319-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sqladmin:v1beta4-rev20240304-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240307-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240205-2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor
@@ -106,29 +104,29 @@ com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationP
com.google.cloud.bigdataoss:gcsio:2.2.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:util:2.2.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.bigtable:bigtable-client-core-config:1.28.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.17.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable-stats:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.35.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.35.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.35.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:3.34.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.126.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsublite:1.12.20=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-secretmanager:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.56.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.18.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.17.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable-stats:2.33.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.33.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.32.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.32.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.16.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:3.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.126.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsublite:1.12.22=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-secretmanager:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.58.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.32.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:grpc-gcp:1.5.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.16.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.common.html.types:types:1.0.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.dagger:dagger:2.51=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.dagger:dagger:2.51.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.26.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -138,7 +136,7 @@ com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,tes
com.google.errorprone:error_prone_type_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.escapevelocity:escapevelocity:0.9.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:1.12.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:23.5.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:flogger-system-backend:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:flogger:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:google-extensions:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -150,17 +148,17 @@ com.google.guava:guava:32.1.1-jre=annotationProcessor,errorprone,testAnnotationP
com.google.guava:guava:33.1.0-jre=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.gwt:gwt-user:2.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:1.43.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-appengine:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-gson:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-jackson2:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-jackson2:1.43.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-protobuf:1.43.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject.extensions:guice-multibindings:4.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject:guice:4.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject:guice:5.1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.j2objc:j2objc-annotations:1.3=checkstyle
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.jsinterop:jsinterop-annotations:2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.monitoring-client:metrics:1.0.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.monitoring-client:stackdriver:1.0.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -210,10 +208,6 @@ commons-logging:commons-logging:1.2=deploy_jar,runtimeClasspath,testRuntimeClass
dnsjava:dnsjava:3.5.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
info.picocli:picocli:4.6.2=checkstyle
io.apicurio:apicurio-registry-protobuf-schema-utilities:3.0.0.M2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.confluent:common-config:5.3.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.confluent:common-utils:5.3.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.confluent:kafka-avro-serializer:5.3.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.confluent:kafka-schema-registry-client:5.3.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.github.classgraph:classgraph:4.8.162=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.github.eisop:dataflow-errorprone:3.34.0-eisop1=annotationProcessor,errorprone,testAnnotationProcessor
io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
@@ -227,10 +221,10 @@ io.grpc:grpc-googleapis:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-grpclb:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-inprocess:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-netty-shaded:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-netty:1.60.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-netty:1.61.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf-lite:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-rls:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-rls:1.61.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-services:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-stub:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-util:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -259,6 +253,8 @@ io.opencensus:opencensus-exporter-stats-stackdriver:0.31.0=deploy_jar,runtimeCla
io.opencensus:opencensus-impl-core:0.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-impl:0.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-proto:0.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.outfoxx:swiftpoet:1.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
jakarta-regexp:jakarta-regexp:1.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -275,46 +271,43 @@ javax.persistence:javax.persistence-api:2.2=deploy_jar,runtimeClasspath,testRunt
javax.servlet:servlet-api:2.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
javax.validation:validation-api:1.0.0.GA=deploy_jar,runtimeClasspath,testRuntimeClasspath
javax.xml.bind:jaxb-api:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
jline:jline:1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
joda-time:joda-time:2.10.14=deploy_jar,runtimeClasspath,testRuntimeClasspath
junit:junit:4.13.2=testRuntimeClasspath
net.bytebuddy:byte-buddy:1.12.18=deploy_jar,runtimeClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.13.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
net.sf.saxon:Saxon-HE:10.6=checkstyle
org.antlr:antlr4-runtime:4.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.antlr:antlr4-runtime:4.9.3=checkstyle
org.apache.arrow:arrow-format:5.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:5.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:5.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.arrow:arrow-format:15.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:15.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:15.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.avro:avro:1.8.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-construction-java:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-fn-execution:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-kafka:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.54.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.55.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-guava-32_1_2-jre:0.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-compress:1.24.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-csv:1.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.14.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.9=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.httpcomponents:httpclient:4.5.14=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.httpcomponents:httpcore:4.4.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.77=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.77=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.77=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.77=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.78=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.78=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.78=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.78=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.checkerframework:checker-qual:3.12.0=checkstyle
org.checkerframework:checker-qual:3.33.0=annotationProcessor,errorprone,testAnnotationProcessor
@@ -323,8 +316,10 @@ org.codehaus.jackson:jackson-core-asl:1.9.13=deploy_jar,runtimeClasspath,testRun
org.codehaus.jackson:jackson-mapper-asl:1.9.13=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections-api:11.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections:11.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.11.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.11.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -341,6 +336,7 @@ org.javassist:javassist:3.28.0-GA=checkstyle
org.jboss.logging:jboss-logging:3.4.3.Final=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jboss:jandex:2.4.2.Final=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jcommander:jcommander:1.83=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-bom:1.4.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.9.20=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.20=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -354,6 +350,7 @@ org.jetbrains.kotlinx:kotlinx-datetime:0.4.0=deploy_jar,runtimeClasspath,testRun
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.0.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jetbrains:annotations:17.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jline:jline:3.25.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.joda:joda-money:1.0.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.json:json:20231013=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jsoup:jsoup:1.17.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -367,15 +364,12 @@ org.ow2.asm:asm-tree:9.6=jacocoAnt
org.ow2.asm:asm-util:7.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.6=deploy_jar,jacocoAnt,runtimeClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,testAnnotationProcessor
org.postgresql:postgresql:42.7.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.springframework:spring-core:5.3.27=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.springframework:spring-expression:5.3.27=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.springframework:spring-jcl:5.3.27=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.testcontainers:database-commons:1.19.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.testcontainers:jdbc:1.19.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.testcontainers:postgresql:1.19.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
+69
View File
@@ -0,0 +1,69 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nomulus
labels:
app: nomulus
spec:
selector:
matchLabels:
app: nomulus
template:
metadata:
labels:
app: nomulus
spec:
containers:
- name: nomulus
image: gcr.io/GCP_PROJECT/nomulus
ports:
- containerPort: 8080
name: http
resources:
requests:
cpu: "500m"
args: [ENVIRONMENT]
- name: proxy
image: gcr.io/GCP_PROJECT/proxy
ports:
- containerPort: 30001
name: whois
- containerPort: 30002
name: epp
resources:
requests:
cpu: "500m"
args: [--env, ENVIRONMENT, --log, --local]
env:
- name: POD_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE_ID
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONTAINER_NAME
value: proxy
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: nomulus
labels:
app: nomulus
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nomulus
minReplicas: 1
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 100
+31
View File
@@ -0,0 +1,31 @@
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
name: nomulus
spec:
gatewayClassName: gke-l7-global-external-managed-mc
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
kinds:
- kind: HTTPRoute
---
kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
name: nomulus
labels:
app: nomulus
spec:
parentRefs:
- kind: Gateway
name: nomulus
rules:
- backendRefs:
- group: net.gke.io
kind: ServiceImport
name: nomulus
port: 80
+22
View File
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
name: nomulus
spec:
selector:
app: nomulus
ports:
- port: 80
targetPort: http
name: http
- port: 43
targetPort: whois
name: whois
- port: 700
targetPort: epp
name: epp
#---
#kind: ServiceExport
#apiVersion: net.gke.io/v1
#metadata:
# name: nomulus
+32 -31
View File
@@ -11,20 +11,20 @@ com.github.docker-java:docker-java-transport:3.3.6=testCompileClasspath,testRunt
com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.android:annotations:4.1.1.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:1.35.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.28.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.37.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.32.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.29.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor
@@ -32,12 +32,12 @@ com.google.auto.value:auto-value-annotations:1.10.4=deploy_jar,runtimeClasspath,
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,errorprone,testAnnotationProcessor
com.google.auto.value:auto-value:1.10.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationProcessor
com.google.cloud:google-cloud-tasks:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51.1=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
@@ -64,8 +64,7 @@ com.google.http-client:google-http-client-gson:1.44.1=deploy_jar,runtimeClasspat
com.google.http-client:google-http-client:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject:guice:5.1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.j2objc:j2objc-annotations:1.3=checkstyle
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.oauth-client:google-oauth-client:1.34.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java-util:3.25.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnnotationProcessor
@@ -98,19 +97,21 @@ io.grpc:grpc-services:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-stub:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-util:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-xds:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-boringssl-static:2.0.65.Final=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.netty:netty-tcnative-classes:2.0.65.Final=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-api:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-http-util:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-proto:0.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
jakarta.inject:jakarta.inject-api:1.0.5=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.activation:activation:1.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -129,9 +130,9 @@ org.apache.commons:commons-compress:1.24.0=testCompileClasspath,testRuntimeClass
org.apache.httpcomponents:httpclient:4.5.14=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.httpcomponents:httpcore:4.4.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.bouncycastle:bcpkix-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.3=compileClasspath,testCompileClasspath
org.checkerframework:checker-compat-qual:2.5.5=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
+32 -31
View File
@@ -11,20 +11,20 @@ com.github.docker-java:docker-java-transport:3.3.6=testCompileClasspath,testRunt
com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.android:annotations:4.1.1.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:1.35.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.31.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.28.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.37.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.32.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:api-common:2.29.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor
@@ -32,12 +32,12 @@ com.google.auto.value:auto-value-annotations:1.10.4=compileClasspath,deploy_jar,
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,errorprone,testAnnotationProcessor
com.google.auto.value:auto-value:1.10.4=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationProcessor
com.google.cloud:google-cloud-tasks:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51.1=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
@@ -64,8 +64,7 @@ com.google.http-client:google-http-client-gson:1.44.1=deploy_jar,runtimeClasspat
com.google.http-client:google-http-client:1.44.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject:guice:5.1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.j2objc:j2objc-annotations:1.3=checkstyle
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.monitoring-client:contrib:1.0.7=testCompileClasspath,testRuntimeClasspath
com.google.monitoring-client:metrics:1.0.7=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.oauth-client:google-oauth-client:1.34.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -101,19 +100,21 @@ io.grpc:grpc-services:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-stub:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-util:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-xds:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-boringssl-static:2.0.65.Final=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-classes:2.0.65.Final=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-api:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-http-util:0.31.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opencensus:opencensus-proto:0.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
jakarta.inject:jakarta.inject-api:1.0.5=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.activation:activation:1.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -134,9 +135,9 @@ org.apache.commons:commons-compress:1.24.0=testCompileClasspath,testRuntimeClass
org.apache.httpcomponents:httpclient:4.5.14=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apache.httpcomponents:httpcore:4.4.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.bouncycastle:bcpkix-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.3=compileClasspath,testCompileClasspath
org.checkerframework:checker-compat-qual:2.5.5=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
+11 -13
View File
@@ -18,19 +18,17 @@ task buildProxyImage(dependsOn: deployJar, type: Exec) {
commandLine 'docker', 'build', '-t', 'proxy', '.'
}
task deployProxy(dependsOn: buildProxyImage) {
task tagProxyImage(dependsOn: buildProxyImage, type: Exec) {
commandLine 'docker', 'tag', 'proxy', "gcr.io/${rootProject.gcpProject}/proxy"
}
task pushProxyImage(dependsOn: tagProxyImage, type: Exec) {
commandLine 'docker', 'push', "gcr.io/${rootProject.gcpProject}/proxy"
}
task deployProxy(dependsOn: pushProxyImage, type: Exec) {
configure verifyDeploymentConfig
doLast {
exec {
commandLine 'docker', 'tag', 'proxy', "gcr.io/${rootProject.gcpProject}/proxy"
}
exec {
commandLine 'docker', 'push', "gcr.io/${rootProject.gcpProject}/proxy"
}
exec {
commandLine './deploy-proxy-for-env.sh', "${rootProject.environment}"
}
}
commandLine './deploy-proxy-for-env.sh', "${rootProject.environment}"
}
project.build.dependsOn buildProxyImage
@@ -38,7 +36,6 @@ project.build.dependsOn buildProxyImage
dependencies {
def deps = rootProject.dependencyMap
implementation deps['com.beust:jcommander']
implementation deps['com.google.api-client:google-api-client']
implementation deps['com.google.apis:google-api-services-cloudkms']
implementation deps['com.google.apis:google-api-services-monitoring']
@@ -77,6 +74,7 @@ dependencies {
testImplementation deps['com.google.monitoring-client:contrib']
testImplementation deps['com.google.truth:truth']
testImplementation deps['junit:junit']
implementation deps['org.jcommander:jcommander']
testImplementation deps['org.junit.jupiter:junit-jupiter-api']
testImplementation deps['org.junit.jupiter:junit-jupiter-engine']
testImplementation deps['org.junit.jupiter:junit-jupiter-params']
+2 -2
View File
@@ -18,8 +18,8 @@
# manifest.
if [[ $# -ne 1 ]]; then
echo "Usage: $0 alpha|crash"
exit 1
echo "Usage: $0 alpha|crash|qa"
exit 1
fi
environment=${1}
+45 -44
View File
@@ -2,10 +2,9 @@
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
aopalliance:aopalliance:1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.beust:jcommander:1.60=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.16.1=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.16.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.16.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.0=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.17.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.17.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ben-manes.caffeine:caffeine:3.0.5=annotationProcessor,errorprone,testAnnotationProcessor
com.github.ben-manes.caffeine:caffeine:3.1.8=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-api:3.3.6=testCompileClasspath,testRuntimeClasspath
@@ -14,26 +13,26 @@ com.github.docker-java:docker-java-transport:3.3.6=testCompileClasspath,testRunt
com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.android:annotations:4.1.1.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api-client:google-api-client:1.35.2=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.36.0-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.127.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.36.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.31.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:api-common:2.28.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.45.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.45.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax:2.45.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudkms:v1-rev20240219-2.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.36.1-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.36.1-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.36.1-alpha=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.131.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.37.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.32.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:api-common:2.29.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.46.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.46.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api:gax:2.46.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudkms:v1-rev20240314-2.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-monitoring:v3-rev20240303-2.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240307-2.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20240311-2.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-1.0-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-api-stubs:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-remote-api:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-testing:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.appengine:appengine-tools-sdk:2.0.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.23.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.23.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor
@@ -41,16 +40,16 @@ com.google.auto.value:auto-value-annotations:1.10.4=compileClasspath,deploy_jar,
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,errorprone,testAnnotationProcessor
com.google.auto.value:auto-value:1.10.4=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationProcessor
com.google.cloud:google-cloud-core-grpc:2.35.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.35.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.35.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.36.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.37.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.36.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.36.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.36.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.36.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.41.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.51.1=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger:2.51.1=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
@@ -79,8 +78,7 @@ com.google.http-client:google-http-client-jackson2:1.44.1=compileClasspath,deplo
com.google.http-client:google-http-client:1.44.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.inject:guice:5.1.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.j2objc:j2objc-annotations:1.3=checkstyle
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.monitoring-client:contrib:1.0.7=testCompileClasspath,testRuntimeClasspath
com.google.monitoring-client:metrics:1.0.7=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.monitoring-client:stackdriver:1.0.7=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -118,19 +116,21 @@ io.grpc:grpc-services:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-stub:1.62.2=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-util:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-xds:1.62.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-boringssl-static:2.0.65.Final=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-classes:2.0.65.Final=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.107.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.108.Final=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-api:0.31.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-http-util:0.31.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-proto:0.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.36.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.36.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
jakarta.inject:jakarta.inject-api:1.0.5=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.activation:activation:1.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -151,9 +151,9 @@ org.apache.commons:commons-compress:1.24.0=testCompileClasspath,testRuntimeClass
org.apache.httpcomponents:httpclient:4.5.14=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.httpcomponents:httpcore:4.4.16=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.bouncycastle:bcpkix-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.77=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpkix-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcprov-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.78=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.3=compileClasspath,testCompileClasspath
org.checkerframework:checker-compat-qual:2.5.5=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -169,6 +169,7 @@ org.jacoco:org.jacoco.ant:0.8.11=jacocoAnt
org.jacoco:org.jacoco.core:0.8.11=jacocoAnt
org.jacoco:org.jacoco.report:0.8.11=jacocoAnt
org.javassist:javassist:3.28.0-GA=checkstyle
org.jcommander:jcommander:1.83=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.6.10=annotationProcessor,testAnnotationProcessor
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0=annotationProcessor,testAnnotationProcessor
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0=annotationProcessor,testAnnotationProcessor
@@ -70,12 +70,14 @@ public final class EppProtocolModule {
ProxyConfig config,
@EppProtocol int eppPort,
@EppProtocol ImmutableList<Provider<? extends ChannelHandler>> handlerProviders,
@HttpsRelayProtocol BackendProtocol.Builder backendProtocolBuilder) {
@HttpsRelayProtocol BackendProtocol.Builder backendProtocolBuilder,
@HttpsRelayProtocol boolean localRelay) {
return Protocol.frontendBuilder()
.name(PROTOCOL_NAME)
.port(eppPort)
.handlerProviders(handlerProviders)
.relayProtocol(backendProtocolBuilder.host(config.epp.relayHost).build())
.relayProtocol(
backendProtocolBuilder.host(localRelay ? "localhost" : config.epp.relayHost).build())
.build();
}
@@ -114,7 +116,7 @@ public final class EppProtocolModule {
config.epp.headerLengthBytes,
// Adjustment applied to the header field value in order to obtain message length.
-config.epp.headerLengthBytes,
// Initial bytes to strip (i.e. strip the length header).
// Initial bytes to strip (i.e., strip the length header).
config.epp.headerLengthBytes);
}
@@ -150,9 +152,14 @@ public final class EppProtocolModule {
@Named("idToken") Supplier<String> idTokenSupplier,
@Named("hello") byte[] helloBytes,
FrontendMetrics metrics,
ProxyConfig config) {
ProxyConfig config,
@HttpsRelayProtocol boolean localRelay) {
return new EppServiceHandler(
config.epp.relayHost, config.epp.relayPath, idTokenSupplier, helloBytes, metrics);
localRelay ? "localhost" : config.epp.relayHost,
config.epp.relayPath,
idTokenSupplier,
helloBytes,
metrics);
}
@Singleton

Some files were not shown because too many files have changed in this diff Show More