@@ -37,7 +37,7 @@ def additional_cloud_properties
3737 stemcell_formats : [ "stemcell-format-a" , "stemcell-format-b" ]
3838 )
3939 end
40- let ( :operating_system ) { Bosh ::Stemcell ::OperatingSystem . for ( "ubuntu" , "noble " ) }
40+ let ( :operating_system ) { Bosh ::Stemcell ::OperatingSystem . for ( "ubuntu" , "resolute " ) }
4141
4242 let ( :definition ) do
4343 Bosh ::Stemcell ::Definition . new (
@@ -101,15 +101,16 @@ def additional_cloud_properties
101101 architecture = "x86_64"
102102
103103 expect ( actual_manifest ) . to eq ( {
104- "name" => "bosh-fake_infra-fake_hypervisor-ubuntu-noble -raw" ,
104+ "name" => "bosh-fake_infra-fake_hypervisor-ubuntu-resolute -raw" ,
105105 "version" => "1234" ,
106106 "bosh_protocol" => 1 ,
107107 "api_version" => 3 ,
108+ "agent_features" => [ ] ,
108109 "sha1" => "c1ebdefc3f8282a9d7d47803fb5030b61ffc793d" , # SHA-1 of image above
109- "operating_system" => "ubuntu-noble " ,
110+ "operating_system" => "ubuntu-resolute " ,
110111 "stemcell_formats" => [ "stemcell-format-a" , "stemcell-format-b" ] ,
111112 "cloud_properties" => {
112- "name" => "bosh-fake_infra-fake_hypervisor-ubuntu-noble -raw" ,
113+ "name" => "bosh-fake_infra-fake_hypervisor-ubuntu-resolute -raw" ,
113114 "version" => "1234" ,
114115 "infrastructure" => "fake_infra" ,
115116 "hypervisor" => "fake_hypervisor" ,
@@ -124,9 +125,19 @@ def additional_cloud_properties
124125 } )
125126 end
126127
128+ it "includes the agent feature list in the packaged manifest" do
129+ packager . package ( disk_format )
130+
131+ manifest = YAML . load_file ( File . join ( work_dir , "stemcell/stemcell.MF" ) )
132+ expect ( manifest [ "agent_features" ] ) . to eq ( [ ] )
133+ contents , _ , status = Open3 . capture3 ( "tar" , "xOf" , File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-resolute.tgz" ) , "stemcell.MF" )
134+ expect ( status . success? ) . to be ( true )
135+ expect ( YAML . safe_load ( contents ) [ "agent_features" ] ) . to eq ( manifest [ "agent_features" ] )
136+ end
137+
127138 it "returns the path of the created tarball" do
128139 expect ( packager . package ( disk_format ) ) . to eq (
129- File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-noble .tgz" )
140+ File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-resolute .tgz" )
130141 )
131142 end
132143
@@ -144,7 +155,7 @@ def additional_cloud_properties
144155 it "archives the working dir" do
145156 packager . package ( disk_format )
146157
147- tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-noble .tgz" )
158+ tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-resolute .tgz" )
148159 expect ( File . exist? ( tarball_path ) ) . to eq ( true )
149160
150161 stemcell_contents_path = File . join ( tmp_dir , "stemcell-contents" )
@@ -166,7 +177,7 @@ def additional_cloud_properties
166177 it "stemcell tarball contains files in proper order" do
167178 packager . package ( disk_format )
168179
169- tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-noble .tgz" )
180+ tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-resolute .tgz" )
170181 expect ( File . exist? ( tarball_path ) ) . to eq ( true )
171182
172183 stdout , _ , _ = Open3 . capture3 ( "tar tf #{ tarball_path } " )
@@ -200,7 +211,7 @@ def additional_cloud_properties
200211 it "archives the working dir with a different tarball name" do
201212 packager . package ( disk_format )
202213
203- tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-noble -raw.tgz" )
214+ tarball_path = File . join ( tarball_dir , "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-resolute -raw.tgz" )
204215 expect ( File . exist? ( tarball_path ) ) . to eq ( true )
205216 end
206217 end
0 commit comments