@@ -848,6 +848,33 @@ func TestGetImageRequests_BlueprintDistro(t *testing.T) {
848
848
assert .Equal (t , got [0 ].blueprint .Distro , "fedora-39" )
849
849
}
850
850
851
+ // TestGetImageRequests_BlueprintArch test to make sure blueprint architecture overrides
852
+ // the request arch
853
+ func TestGetImageRequests_BlueprintArch (t * testing.T ) {
854
+ uo := UploadOptions (struct {}{})
855
+ request := & ComposeRequest {
856
+ Distribution : "fedora-40" ,
857
+ ImageRequest : & ImageRequest {
858
+ Architecture : "x86_64" ,
859
+ ImageType : ImageTypesAws ,
860
+ UploadOptions : & uo ,
861
+ Repositories : []Repository {},
862
+ },
863
+ Blueprint : & Blueprint {
864
+ Name : "arch-test" ,
865
+ Architecture : common .ToPtr ("aarch64" ),
866
+ },
867
+ }
868
+ // NOTE: current directory is the location of this file, back up so it can use ./repositories/
869
+ rr , err := reporegistry .New ([]string {"../../../" })
870
+ require .NoError (t , err )
871
+ got , err := request .GetImageRequests (distrofactory .NewDefault (), rr )
872
+ assert .NoError (t , err )
873
+ require .Len (t , got , 1 )
874
+ require .Greater (t , len (got [0 ].repositories ), 0 )
875
+ assert .Equal (t , got [0 ].blueprint .Arch , "aarch64" )
876
+ }
877
+
851
878
func TestOpenSCAPTailoringOptions (t * testing.T ) {
852
879
cr := ComposeRequest {
853
880
Customizations : & Customizations {
0 commit comments