@@ -86,6 +86,50 @@ public async Task CreateServerTest()
8686 Assert . Equal ( ServerEventStatus . Success , createEvent . Result ) ;
8787 }
8888
89+ [ Fact ]
90+ [ Trait ( "ci" , "false" ) ] // TODO: Run with CI tests once we've implemented cinder
91+ public async Task BootFromVolume ( )
92+ {
93+ var definition = _testData . BuildServer ( ) ;
94+ definition . ConfigureBootFromVolume ( "30ca5d77-c519-48ea-a56c-7c4e0ca0894d" ) ;
95+
96+ Trace . WriteLine ( "Booting new server from volume..." ) ;
97+ var server = await _testData . CreateServer ( definition ) ;
98+ await server . WaitUntilActiveAsync ( ) ;
99+
100+ Assert . NotEmpty ( server . AttachedVolumes ) ;
101+ Assert . Contains ( server . AttachedVolumes , x => x . Id == definition . BlockDeviceMapping [ 0 ] . SourceId ) ;
102+ }
103+
104+ [ Fact ]
105+ [ Trait ( "ci" , "false" ) ] // TODO: Run with CI tests once we've implemented cinder
106+ public async Task BootFromVolumeCopy ( )
107+ {
108+ var definition = _testData . BuildServer ( ) ;
109+ definition . ConfigureBootFromNewVolume ( "30ca5d77-c519-48ea-a56c-7c4e0ca0894d" , volumeSize : 1 , deleteVolumeWithServer : true ) ;
110+
111+ Trace . WriteLine ( "Booting new server from a new volume created from an existing volume..." ) ;
112+ var server = await _testData . CreateServer ( definition ) ;
113+ await server . WaitUntilActiveAsync ( ) ;
114+
115+ Assert . NotEmpty ( server . AttachedVolumes ) ;
116+ Assert . Contains ( server . AttachedVolumes , x => x . Id == definition . BlockDeviceMapping [ 0 ] . SourceId ) ;
117+ }
118+
119+ [ Fact ]
120+ [ Trait ( "ci" , "false" ) ] // TODO: Run with CI tests once we've implemented cinder
121+ public async Task BootFromImageCopy ( )
122+ {
123+ var definition = _testData . BuildServer ( ) ;
124+ definition . ConfigureBootFromNewVolume ( volumeSize : 1 , deleteVolumeWithServer : true ) ;
125+ Trace . WriteLine ( "Booting new server from a new volume created from an existing image..." ) ;
126+ var server = await _testData . CreateServer ( definition ) ;
127+ await server . WaitUntilActiveAsync ( ) ;
128+
129+ Assert . NotEmpty ( server . AttachedVolumes ) ;
130+ Assert . Contains ( server . AttachedVolumes , x => x . Id != definition . BlockDeviceMapping [ 0 ] . SourceId ) ;
131+ }
132+
89133 [ Fact ]
90134 public async Task ListServerReferencesTest ( )
91135 {
0 commit comments