@@ -700,6 +700,28 @@ func TestGenerateProxmoxDisks(t *testing.T) {
700
700
},
701
701
},
702
702
},
703
+ {
704
+ "overallocate ide, should error" ,
705
+ []diskConfig {
706
+ {
707
+ Type : "ide" ,
708
+ StoragePool : "local-lvm" ,
709
+ Size : "11G" ,
710
+ CacheMode : "none" ,
711
+ DiskFormat : "qcow2" ,
712
+ IOThread : true ,
713
+ },
714
+ },
715
+ []ISOsConfig {},
716
+ []string {
717
+ "ide0" ,
718
+ "ide1" ,
719
+ "ide2" ,
720
+ "ide3" ,
721
+ },
722
+ true ,
723
+ & proxmox.QemuStorages {},
724
+ },
703
725
{
704
726
"overallocate sata, should error" ,
705
727
[]diskConfig {
@@ -756,6 +778,212 @@ func TestGenerateProxmoxDisks(t *testing.T) {
756
778
true ,
757
779
& proxmox.QemuStorages {},
758
780
},
781
+ {
782
+ "overallocate scsi, should error" ,
783
+ []diskConfig {
784
+ {
785
+ Type : "scsi" ,
786
+ StoragePool : "local-lvm" ,
787
+ Size : "11G" ,
788
+ CacheMode : "none" ,
789
+ DiskFormat : "qcow2" ,
790
+ IOThread : true ,
791
+ },
792
+ {
793
+ Type : "scsi" ,
794
+ StoragePool : "local-lvm" ,
795
+ Size : "11G" ,
796
+ CacheMode : "none" ,
797
+ DiskFormat : "qcow2" ,
798
+ IOThread : true ,
799
+ },
800
+ {
801
+ Type : "scsi" ,
802
+ StoragePool : "local-lvm" ,
803
+ Size : "11G" ,
804
+ CacheMode : "none" ,
805
+ DiskFormat : "qcow2" ,
806
+ IOThread : true ,
807
+ },
808
+ {
809
+ Type : "scsi" ,
810
+ StoragePool : "local-lvm" ,
811
+ Size : "11G" ,
812
+ CacheMode : "none" ,
813
+ DiskFormat : "qcow2" ,
814
+ IOThread : true ,
815
+ },
816
+ {
817
+ Type : "scsi" ,
818
+ StoragePool : "local-lvm" ,
819
+ Size : "11G" ,
820
+ CacheMode : "none" ,
821
+ DiskFormat : "qcow2" ,
822
+ IOThread : true ,
823
+ },
824
+ {
825
+ Type : "scsi" ,
826
+ StoragePool : "local-lvm" ,
827
+ Size : "11G" ,
828
+ CacheMode : "none" ,
829
+ DiskFormat : "qcow2" ,
830
+ IOThread : true ,
831
+ },
832
+ {
833
+ Type : "scsi" ,
834
+ StoragePool : "local-lvm" ,
835
+ Size : "11G" ,
836
+ CacheMode : "none" ,
837
+ DiskFormat : "qcow2" ,
838
+ IOThread : true ,
839
+ },
840
+ {
841
+ Type : "scsi" ,
842
+ StoragePool : "local-lvm" ,
843
+ Size : "11G" ,
844
+ CacheMode : "none" ,
845
+ DiskFormat : "qcow2" ,
846
+ IOThread : true ,
847
+ },
848
+ {
849
+ Type : "scsi" ,
850
+ StoragePool : "local-lvm" ,
851
+ Size : "11G" ,
852
+ CacheMode : "none" ,
853
+ DiskFormat : "qcow2" ,
854
+ IOThread : true ,
855
+ },
856
+ {
857
+ Type : "scsi" ,
858
+ StoragePool : "local-lvm" ,
859
+ Size : "11G" ,
860
+ CacheMode : "none" ,
861
+ DiskFormat : "qcow2" ,
862
+ IOThread : true ,
863
+ },
864
+ {
865
+ Type : "scsi" ,
866
+ StoragePool : "local-lvm" ,
867
+ Size : "11G" ,
868
+ CacheMode : "none" ,
869
+ DiskFormat : "qcow2" ,
870
+ IOThread : true ,
871
+ },
872
+ {
873
+ Type : "scsi" ,
874
+ StoragePool : "local-lvm" ,
875
+ Size : "11G" ,
876
+ CacheMode : "none" ,
877
+ DiskFormat : "qcow2" ,
878
+ IOThread : true ,
879
+ },
880
+ },
881
+ []ISOsConfig {
882
+ {
883
+ Type : "scsi" ,
884
+ ISOFile : "local:iso/test.iso" ,
885
+ },
886
+ {
887
+ Type : "scsi" ,
888
+ ISOFile : "local:iso/test.iso" ,
889
+ },
890
+ {
891
+ Type : "scsi" ,
892
+ ISOFile : "local:iso/test.iso" ,
893
+ },
894
+ {
895
+ Type : "scsi" ,
896
+ ISOFile : "local:iso/test.iso" ,
897
+ },
898
+ {
899
+ Type : "scsi" ,
900
+ ISOFile : "local:iso/test.iso" ,
901
+ },
902
+ {
903
+ Type : "scsi" ,
904
+ ISOFile : "local:iso/test.iso" ,
905
+ },
906
+ {
907
+ Type : "scsi" ,
908
+ ISOFile : "local:iso/test.iso" ,
909
+ },
910
+ {
911
+ Type : "scsi" ,
912
+ ISOFile : "local:iso/test.iso" ,
913
+ },
914
+ },
915
+ []string {
916
+ "scsi0" ,
917
+ "scsi1" ,
918
+ "scsi2" ,
919
+ "scsi3" ,
920
+ "scsi4" ,
921
+ "scsi5" ,
922
+ "scsi6" ,
923
+ "scsi7" ,
924
+ "scsi8" ,
925
+ "scsi9" ,
926
+ "scsi10" ,
927
+ "scsi11" ,
928
+ },
929
+ true ,
930
+ & proxmox.QemuStorages {},
931
+ },
932
+ {
933
+ "overallocate virtio, should error" ,
934
+ []diskConfig {
935
+ {
936
+ Type : "virtio" ,
937
+ StoragePool : "local-lvm" ,
938
+ Size : "11G" ,
939
+ CacheMode : "none" ,
940
+ DiskFormat : "qcow2" ,
941
+ IOThread : true ,
942
+ },
943
+ {
944
+ Type : "virtio" ,
945
+ StoragePool : "local-lvm" ,
946
+ Size : "11G" ,
947
+ CacheMode : "none" ,
948
+ DiskFormat : "qcow2" ,
949
+ IOThread : true ,
950
+ },
951
+ {
952
+ Type : "virtio" ,
953
+ StoragePool : "local-lvm" ,
954
+ Size : "11G" ,
955
+ CacheMode : "none" ,
956
+ DiskFormat : "qcow2" ,
957
+ IOThread : true ,
958
+ },
959
+ {
960
+ Type : "virtio" ,
961
+ StoragePool : "local-lvm" ,
962
+ Size : "11G" ,
963
+ CacheMode : "none" ,
964
+ DiskFormat : "qcow2" ,
965
+ IOThread : true ,
966
+ },
967
+ },
968
+ []ISOsConfig {},
969
+ []string {
970
+ "virtio0" ,
971
+ "virtio1" ,
972
+ "virtio2" ,
973
+ "virtio3" ,
974
+ "virtio4" ,
975
+ "virtio5" ,
976
+ "virtio6" ,
977
+ "virtio7" ,
978
+ "virtio8" ,
979
+ "virtio9" ,
980
+ "virtio10" ,
981
+ "virtio11" ,
982
+ "virtio12" ,
983
+ },
984
+ true ,
985
+ & proxmox.QemuStorages {},
986
+ },
759
987
{
760
988
"bunch of disks, should be defined in the discovery order" ,
761
989
[]diskConfig {
0 commit comments