Skip to content

Commit ac855e8

Browse files
committed
check for optional value
1 parent 768d195 commit ac855e8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

google/cloud/testing_util/credentials.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ struct TestCredentialsVisitor : public internal::CredentialsVisitor {
5353
}
5454
void visit(internal::ServiceAccountConfig const& cfg) override {
5555
name = "ServiceAccountConfig";
56-
json_object = *cfg.json_object();
56+
if (cfg.json_object()) json_object = *cfg.json_object();
57+
json_object = "cfg.file_path testing not implemented";
5758
}
5859
void visit(internal::ExternalAccountConfig const& cfg) override {
5960
name = "ExternalAccountConfig";

0 commit comments

Comments
 (0)