Skip to content

Commit 807ded4

Browse files
committed
Update TestNormalize to only test Windows
The output of platforms.DefaultSpec() and the normalized version of the default platform on 32- and 64-bit ARM are not comparable. This test was added to validate not losing Windows-specific information during normalize of the platform object, so for now we are moving this to be a Windows-only test until we resolve the right behavior on ARM. Signed-off-by: Phil Estes <[email protected]>
1 parent a25a84f commit 807ded4

2 files changed

Lines changed: 27 additions & 5 deletions

File tree

platforms/platforms_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"testing"
2424

2525
specs "github.com/opencontainers/image-spec/specs-go/v1"
26-
"github.com/stretchr/testify/require"
2726
)
2827

2928
func TestParseSelector(t *testing.T) {
@@ -365,7 +364,3 @@ func TestParseSelectorInvalid(t *testing.T) {
365364
})
366365
}
367366
}
368-
369-
func TestNormalize(t *testing.T) {
370-
require.Equal(t, DefaultSpec(), Normalize(DefaultSpec()))
371-
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
Copyright The containerd Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package platforms
18+
19+
import (
20+
"testing"
21+
22+
"github.com/stretchr/testify/require"
23+
)
24+
25+
func TestNormalize(t *testing.T) {
26+
require.Equal(t, DefaultSpec(), Normalize(DefaultSpec()))
27+
}

0 commit comments

Comments
 (0)