Class ServiceAccountKeyFiles
java.lang.Object
io.github.flink.gcp.connector.testutils.ServiceAccountKeyFiles
Creates synthetic service-account keys for credential wiring tests: structurally valid enough for
the Google auth libraries to parse — a real RSA key in a real PEM envelope — while naming an
example.invalid account no service would ever accept, so a test that leaks one at a real
endpoint fails loudly rather than authenticating.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PathWrites a valid synthetic service-account key belowdirectory, always asservice-account.json— a second call with the same directory overwrites the first key.static Stringjson()Returns the key as the JSON document itself, for a test that feeds the material somewhere other than a file of this class's choosing.static StringReturns the key with the givenprivate_key_id, for a test that plants a sentinel there and asserts it never surfaces elsewhere — a serialized form, a log line.
-
Field Details
-
CLIENT_EMAIL
- See Also:
-
-
Method Details
-
create
Writes a valid synthetic service-account key belowdirectory, always asservice-account.json— a second call with the same directory overwrites the first key.- Throws:
IOException
-
json
Returns the key as the JSON document itself, for a test that feeds the material somewhere other than a file of this class's choosing. -
json
Returns the key with the givenprivate_key_id, for a test that plants a sentinel there and asserts it never surfaces elsewhere — a serialized form, a log line.
-