-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix unit test of influxd in the windows #5489
Conversation
@@ -360,7 +360,10 @@ Options: | |||
func retentionAndShardFromPath(path string) (retention, shard string, err error) { | |||
a := strings.Split(path, "/") | |||
if len(a) != 3 { | |||
return "", "", fmt.Errorf("expected database, retention policy, and shard id in path: %s", path) | |||
a = strings.Split(path, "\\") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unfamiliar with what the contents of the path would be, but would os.PathSeparator
be a better method and do something like:
a := srings.Split(path, os.PathSeparator)
If not, then we may want to make a specific windows/unix file for this specific function, as it feels the issue is platform specific.
Looks good. One question to be addressed. Thanks! |
60419e2
to
91f47ab
Compare
return net.JoinHostPort(DefaultHostname, port) | ||
address, err := DefaultHost(DefaultHostname, addr) | ||
if nil != err { | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous behavior was to return addr
here. It should not panic.
fix rename file fail on the windows
all unit test will ok after this patch is merged. |
fix unit test of influxd in the windows
fix unit test of influxd in the windows
Thanks @runner-mei! |
fix unit test of influxd in the windows