File tree 3 files changed +72
-0
lines changed
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test
java/org/springframework/boot/buildpack/platform/docker/type
resources/org/springframework/boot/buildpack/platform/docker/type
3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,18 @@ void getOsReturnsOs() throws Exception {
67
67
assertThat (image .getOs ()).isEqualTo ("linux" );
68
68
}
69
69
70
+ @ Test
71
+ void getOsWhenOsIsNotDefaultOsReturnsOs () throws Exception {
72
+ Image image = Image .of (getContent ("image-non-default-os.json" ));
73
+ assertThat (image .getOs ()).isEqualTo ("windows" );
74
+ }
75
+
76
+ @ Test
77
+ void getOsWhenOsIsEmptyReturnsDefaultOs () throws Exception {
78
+ Image image = Image .of (getContent ("image-empty-os.json" ));
79
+ assertThat (image .getOs ()).isEqualTo ("linux" );
80
+ }
81
+
70
82
@ Test
71
83
void getCreatedReturnsDate () throws Exception {
72
84
Image image = getImage ();
Original file line number Diff line number Diff line change
1
+ {
2
+ "Id" : " sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba" ,
3
+ "RepoTags" : [
4
+ " ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
5
+ ],
6
+ "RepoDigests" : [
7
+ " ghcr.io/spring-io/spring-boot-cnb-test-builder@sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba"
8
+ ],
9
+ "Parent" : " " ,
10
+ "Comment" : " " ,
11
+ "DockerVersion" : " " ,
12
+ "Author" : " " ,
13
+ "Config" : null ,
14
+ "Architecture" : " " ,
15
+ "Os" : " " ,
16
+ "Size" : 166797518 ,
17
+ "GraphDriver" : {
18
+ "Data" : null ,
19
+ "Name" : " overlayfs"
20
+ },
21
+ "RootFS" : {},
22
+ "Metadata" : {
23
+ "LastTagTime" : " 2025-04-10T22:41:27.520294922Z"
24
+ },
25
+ "Descriptor" : {
26
+ "mediaType" : " application/vnd.oci.image.index.v1+json" ,
27
+ "digest" : " sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba" ,
28
+ "size" : 513
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "Id" : " sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba" ,
3
+ "RepoTags" : [
4
+ " ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.1"
5
+ ],
6
+ "RepoDigests" : [
7
+ " ghcr.io/spring-io/spring-boot-cnb-test-builder@sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba"
8
+ ],
9
+ "Parent" : " " ,
10
+ "Comment" : " " ,
11
+ "DockerVersion" : " " ,
12
+ "Author" : " " ,
13
+ "Config" : null ,
14
+ "Architecture" : " " ,
15
+ "Os" : " windows" ,
16
+ "Size" : 166797518 ,
17
+ "GraphDriver" : {
18
+ "Data" : null ,
19
+ "Name" : " overlayfs"
20
+ },
21
+ "RootFS" : {},
22
+ "Metadata" : {
23
+ "LastTagTime" : " 2025-04-10T22:41:27.520294922Z"
24
+ },
25
+ "Descriptor" : {
26
+ "mediaType" : " application/vnd.oci.image.index.v1+json" ,
27
+ "digest" : " sha256:21635a6b4880772f3fabbf8b660907fa38636558cf787cc26f1779fc4b4e2cba" ,
28
+ "size" : 513
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments