Skip to content

Commit

Permalink
Enable new config by default (#2422)
Browse files Browse the repository at this point in the history
* Enable new config by default
  • Loading branch information
kislaykishore authored Sep 2, 2024
1 parent c23d672 commit eba1f19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
23 changes: 12 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ func main() {
// Set up profiling handlers.
go perf.HandleCPUProfileSignals()
go perf.HandleMemoryProfileSignals()
if strings.ToLower(os.Getenv("ENABLE_GCSFUSE_VIPER_CONFIG")) == "true" {
// TODO: implement the mount logic instead of simply returning nil.
rootCmd, err := cmd.NewRootCmd(cmd.Mount)
if err != nil {
log.Fatalf("Error occurred while creating the root command: %v", err)
}
rootCmd.SetArgs(convertToPosixArgs(os.Args))
if err := rootCmd.Execute(); err != nil {
log.Fatalf("Error occurred during command execution: %v", err)
}
if strings.ToLower(os.Getenv("ENABLE_GCSFUSE_VIPER_CONFIG")) == "false" {
cmd.ExecuteLegacyMain()
return
}
cmd.ExecuteLegacyMain()

rootCmd, err := cmd.NewRootCmd(cmd.Mount)
if err != nil {
log.Fatalf("Error occurred while creating the root command: %v", err)
}
rootCmd.SetArgs(convertToPosixArgs(os.Args))
if err := rootCmd.Execute(); err != nil {
log.Fatalf("Error occurred during command execution: %v", err)
}

}
5 changes: 2 additions & 3 deletions tools/integration_tests/mounting/gcsfuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"os/exec"
"path"
"path/filepath"

//"runtime"
"syscall"
"testing"
Expand Down Expand Up @@ -114,13 +113,13 @@ func (t *GcsfuseTest) BadUsage() {
// Too many args
0: {
[]string{canned.FakeBucketName, "a", "b"},
"gcsfuse takes one or two arguments.",
"Error: accepts between 2 and 3 arg\\(s\\), received 4",
},

// Unknown flag
1: {
[]string{"--tweak_frobnicator", canned.FakeBucketName, "a"},
"not defined.*tweak_frobnicator",
"unknown flag: --tweak_frobnicator",
},
}

Expand Down

0 comments on commit eba1f19

Please sign in to comment.