Skip to content

Commit

Permalink
Persistent mounting kill switch (#2513)
Browse files Browse the repository at this point in the history
* Support Viper kill-switch for persistent mounting

* Add tests
  • Loading branch information
kislaykishore authored Sep 19, 2024
1 parent b93c72b commit 07d3bd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tools/mount_gcsfuse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ func makeGcsfuseArgs(
"enable_hns",
"ignore_interrupts",
"anonymous_access",
"log_rotate_compress":
"log_rotate_compress",
"disable_viper_config":
if value == "" {
value = "true"
}
Expand Down
12 changes: 8 additions & 4 deletions tools/mount_gcsfuse/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ func TestMakeGcsfuseArgs(t *testing.T) {
"enable_hns": "",
"ignore_interrupts": "",
"anonymous_access": "false",
"log_rotate_compress": "false"},
"log_rotate_compress": "false",
"disable_viper_config": "true"},
expectedFlags: []string{"--implicit-dirs=true",
"--foreground=true",
"--reuse-token-from-url=false",
Expand All @@ -51,7 +52,8 @@ func TestMakeGcsfuseArgs(t *testing.T) {
"--enable-hns=true",
"--ignore-interrupts=true",
"--anonymous-access=false",
"--log-rotate-compress=false"},
"--log-rotate-compress=false",
"--disable-viper-config=true"},
},

{
Expand All @@ -64,7 +66,8 @@ func TestMakeGcsfuseArgs(t *testing.T) {
"enable-hns": "",
"ignore-interrupts": "",
"anonymous-access": "false",
"log_rotate-compress": "false"},
"log_rotate-compress": "false",
"disable-viper-config": "false"},
expectedFlags: []string{"--implicit-dirs=true",
"--foreground=true",
"--reuse-token-from-url=false",
Expand All @@ -73,7 +76,8 @@ func TestMakeGcsfuseArgs(t *testing.T) {
"--enable-hns=true",
"--ignore-interrupts=true",
"--anonymous-access=false",
"--log-rotate-compress=false"},
"--log-rotate-compress=false",
"--disable-viper-config=false"},
},

{
Expand Down

0 comments on commit 07d3bd4

Please sign in to comment.