Skip to content

Commit

Permalink
add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeenkaur committed Oct 14, 2024
1 parent 75fed0f commit 269a839
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/mount_gcsfuse/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,21 @@ func TestParseArgs_DeviceIsParsedCorrectly(t *testing.T) {
{
name: "device_bucket_name",
device: "fake_bucket",
mountPoint: "/mnt/fake_bucket",
mountPoint: "a/b/mnt/fake_bucket",
expectedDevice: "fake_bucket",
},
{
name: "device_bucket_name",
name: "path_device_name",
device: "/mnt/fake_bucket",
mountPoint: "/mnt/fake_bucket",
expectedDevice: "fake_bucket",
},
{
name: "nested_path_device_name",
device: "a/b/mnt/fake_bucket",
mountPoint: "a/b/mnt/fake_bucket",
expectedDevice: "fake_bucket",
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 269a839

Please sign in to comment.