Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions storage/api/Storage.Samples.Tests/MoveObjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public void MoveObject()
var originName = Guid.NewGuid().ToString();
var originContent = Guid.NewGuid().ToString();
var destinationName = Guid.NewGuid().ToString();
uploadObjectFromMemory.UploadObjectFromMemory(_fixture.BucketNameHns, originName, originContent);
moveObjectSample.MoveObject(_fixture.BucketNameHns, originName, destinationName);
_fixture.CollectHnsObject(destinationName);
var objects = listFilesSample.ListFiles(_fixture.BucketNameHns);
uploadObjectFromMemory.UploadObjectFromMemory(_fixture.BucketNameGeneric, originName, originContent);
moveObjectSample.MoveObject(_fixture.BucketNameGeneric, originName, destinationName);
_fixture.Collect(destinationName);
var objects = listFilesSample.ListFiles(_fixture.BucketNameGeneric);
Assert.DoesNotContain(objects, obj => obj.Name == originName);
Assert.Contains(objects, obj => obj.Name == destinationName);
}
Expand Down
7 changes: 0 additions & 7 deletions storage/api/Storage.Samples.Tests/StorageFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ private string Collect(string bucketName, string objectName)
/// <returns>The regional objectName.</returns>
public string CollectRegionalObject(string objectName) => Collect(BucketNameRegional, objectName);

/// <summary>
/// Add a object located in a hns bucket to delete
/// at the end of the test.
/// </summary>
/// <returns>The objectName.</returns>
public string CollectHnsObject(string objectName) => Collect(BucketNameHns, objectName);

public void DeleteHmacKey(string accessId, bool isActive)
{
int retries = 10;
Expand Down
4 changes: 2 additions & 2 deletions storage/api/Storage.Samples/MoveObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class MoveObjectSample
{
/// <summary>
/// Moves an object within a bucket with hierarchical namespace enabled.
/// Moves an object within a bucket.
/// </summary>
/// <param name="sourceBucketName">Name of the source bucket containing the object to move.</param>
/// <param name="sourceObjectName">The name of the source object to move within the bucket.</param>
Expand All @@ -32,7 +32,7 @@ public void MoveObject(
{
var storage = StorageClient.Create();
storage.MoveObject(sourceBucketName, sourceObjectName, destinationObjectName);
Console.WriteLine($"Moved {sourceBucketName}/{sourceObjectName} to " + $"{sourceBucketName}/{destinationObjectName} within a hierarchical namespace enabled bucket.");
Console.WriteLine($"Moved {sourceBucketName}/{sourceObjectName} to {sourceBucketName}/{destinationObjectName} within a bucket.");
}
}
// [END storage_move_object]