Skip to content

Commit

Permalink
impl(compute): reduce specificity on integration test error message (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthart authored Oct 11, 2024
1 parent b6e899a commit 6ed7162
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,16 @@ TEST_F(ComputeIntegrationTest, VerifyUpdateSendsUpdateMaskParameter) {
auto result = client.InsertDisk(project_id_, zone_, disk).get();
ASSERT_THAT(result, IsOk());

google::cloud::cpp::compute::v1::Disk disk_update = disk;
google::cloud::cpp::compute::v1::Disk disk_update;
disk_update.mutable_labels()->clear();

google::cloud::cpp::compute::disks::v1::UpdateDiskRequest update_request;
update_request.set_project(project_id_);
update_request.set_zone(zone_);
update_request.set_disk(disk.name());
*(update_request.mutable_disk_resource()) = disk_update;
auto update_disk = client.UpdateDisk(update_request).get();

EXPECT_THAT(update_disk,
StatusIs(StatusCode::kInvalidArgument,
HasSubstr("Empty updateMask is not supported")));

update_request.set_update_mask("labels");
update_disk = client.UpdateDisk(update_request).get();
auto update_disk = client.UpdateDisk(update_request).get();
EXPECT_THAT(update_disk,
StatusIs(StatusCode::kInvalidArgument,
HasSubstr("Updating labels is not supported")));
Expand Down

0 comments on commit 6ed7162

Please sign in to comment.