mirror of
https://github.com/versity/versitygw.git
synced 2026-07-02 16:54:25 +00:00
27f04ad5ea
This change adds Windows functional test execution in CI and updates backend handling so windows filesystem error/path semantics map correctly to expected S3 outcomes. The only meta supported on windows right now is sidecar, so the tests in windows mode also skip sidecar skips. Future work is to address the skips and/or more clearly document the unsupported/incompatible behavior on windows. The windows support will still remain best effort, but these tests should at least flag when future changes introduce incompatible behavior on windows.
30 lines
989 B
Go
30 lines
989 B
Go
// Copyright 2026 Versity Software
|
|
// This file is licensed under the Apache License, Version 2.0
|
|
// (the "License"); you may not use this file except in compliance
|
|
// with the License. You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing,
|
|
// software distributed under the License is distributed on an
|
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
// KIND, either express or implied. See the License for the
|
|
// specific language governing permissions and limitations
|
|
// under the License.
|
|
|
|
//go:build windows
|
|
|
|
package meta
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
// trimVolume strips the Windows drive letter (e.g. "C:") and any leading
|
|
// path separator from p so it can be safely used as a sub-path component
|
|
// inside filepath.Join without becoming an absolute root.
|
|
func trimVolume(p string) string {
|
|
return strings.TrimLeft(p[len(filepath.VolumeName(p)):], `\/`)
|
|
}
|