summaryrefslogtreecommitdiff
path: root/libpod/container_internal_test.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-03-02 06:36:44 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-04-09 21:08:44 +0200
commit97c9115c02b05f9aa0120b84deffed8b7b3d6018 (patch)
tree97e103ca1c4186d554ddb36295739eb34e2c2ed8 /libpod/container_internal_test.go
parentfe79bdd07e140176dc64ebef8da3eea2ae28b96b (diff)
downloadpodman-97c9115c02b05f9aa0120b84deffed8b7b3d6018.tar.gz
podman-97c9115c02b05f9aa0120b84deffed8b7b3d6018.tar.bz2
podman-97c9115c02b05f9aa0120b84deffed8b7b3d6018.zip
Potentially breaking: Make hooks sort order locale-independent
Don't sort OCI hooks using the locale collation order; it does not make sense for the same system-wide directory to be interpreted differently depending on the user's LC_COLLATE setting, and the language-specific collation order can even change over time. Besides, the current collation order determination code has never worked with the most common LC_COLLATE values like en_US.UTF-8. Ideally, we would like to just order based on Unicode code points to be reliably stable, but the existing implementation is case-insensitive, so we are forced to rely on the unicode case mapping tables at least. (This gives up on canonicalization and width-insensitivity, potentially breaking users who rely on these previously documented properties.) Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/container_internal_test.go')
-rw-r--r--libpod/container_internal_test.go48
1 files changed, 0 insertions, 48 deletions
diff --git a/libpod/container_internal_test.go b/libpod/container_internal_test.go
index 1654af929..f1e2b70a7 100644
--- a/libpod/container_internal_test.go
+++ b/libpod/container_internal_test.go
@@ -17,54 +17,6 @@ import (
// hookPath is the path to an example hook executable.
var hookPath string
-func TestLocaleToLanguage(t *testing.T) {
- for _, testCase := range []struct {
- locale string
- language string
- }{
- {
- locale: "",
- language: "und-u-va-posix",
- },
- {
- locale: "C",
- language: "und-u-va-posix",
- },
- {
- locale: "POSIX",
- language: "und-u-va-posix",
- },
- {
- locale: "c",
- language: "und-u-va-posix",
- },
- {
- locale: "en",
- language: "en",
- },
- {
- locale: "en_US",
- language: "en-US",
- },
- {
- locale: "en.UTF-8",
- language: "en",
- },
- {
- locale: "en_US.UTF-8",
- language: "en-US",
- },
- {
- locale: "does-not-exist",
- language: "does-not-exist",
- },
- } {
- t.Run(testCase.locale, func(t *testing.T) {
- assert.Equal(t, testCase.language, localeToLanguage(testCase.locale))
- })
- }
-}
-
func TestPostDeleteHooks(t *testing.T) {
ctx := context.Background()
dir, err := ioutil.TempDir("", "libpod_test_")