@@ -88,4 +88,44 @@ public function test_it_resets_metadata()
8888
8989 $ this ->volume ->resetMetadata (['key1 ' => 'val1 ' ]);
9090 }
91+
92+ public function test_it_sets_volume_bootable ()
93+ {
94+ $ this ->setupMock ('POST ' , 'volumes/1/action ' , ['os-set_bootable ' => ['bootable ' => 'True ' ]], [], new Response (200 ));
95+
96+ $ this ->volume ->setBootable (true );
97+ }
98+
99+ public function test_it_sets_image_meta_data ()
100+ {
101+ $ expectedJson = [
102+ 'os-set_image_metadata ' => [
103+ 'metadata ' => [
104+ 'attr_foo ' => 'foofoo ' ,
105+ 'attr_bar ' => 'barbar ' ,
106+ ],
107+ ],
108+ ];
109+
110+ $ this ->setupMock ('POST ' , 'volumes/1/action ' , $ expectedJson , [], new Response (200 ));
111+ $ this ->volume ->setImageMetadata ([
112+ 'attr_foo ' => 'foofoo ' ,
113+ 'attr_bar ' => 'barbar ' ,
114+ ]);
115+ }
116+
117+ public function test_it_resets_status ()
118+ {
119+ $ expectedJson = ['os-reset_status ' => ['status ' => 'available ' , 'attach_status ' => 'detached ' , 'migration_status ' => 'migrating ' ]];
120+
121+ $ this ->setupMock ('POST ' , 'volumes/1/action ' , $ expectedJson , [], new Response (202 ));
122+
123+ $ this ->volume ->resetStatus (
124+ [
125+ 'status ' => 'available ' ,
126+ 'attachStatus ' => 'detached ' ,
127+ 'migrationStatus ' => 'migrating ' ,
128+ ]
129+ );
130+ }
91131}
0 commit comments