|
552 | 552 |
|
553 | 553 | it "exact id match" do
|
554 | 554 | expect(servers).to receive(:create).with(
|
555 |
| - name: "hello", |
556 |
| - image_ref: "1e1f4346-e3ea-48ba-9d1b-0002bfcb8981", |
557 |
| - flavor_ref: "1", |
558 |
| - availability_zone: nil |
| 555 | + { |
| 556 | + name: "hello", |
| 557 | + image_ref: "1e1f4346-e3ea-48ba-9d1b-0002bfcb8981", |
| 558 | + flavor_ref: "1", |
| 559 | + availability_zone: nil, |
| 560 | + } |
559 | 561 | )
|
560 | 562 | driver.send(:create_server)
|
561 | 563 | end
|
|
588 | 590 |
|
589 | 591 | it "exact id match" do
|
590 | 592 | expect(servers).to receive(:create).with(
|
591 |
| - name: "hello", |
592 |
| - flavor_ref: "1e1f4346-e3ea-48ba-9d1b-0002bfcb8981", |
593 |
| - image_ref: "111", |
594 |
| - availability_zone: nil |
| 593 | + { |
| 594 | + name: "hello", |
| 595 | + flavor_ref: "1e1f4346-e3ea-48ba-9d1b-0002bfcb8981", |
| 596 | + image_ref: "111", |
| 597 | + availability_zone: nil, |
| 598 | + } |
595 | 599 | )
|
596 | 600 | driver.send(:create_server)
|
597 | 601 | end
|
|
623 | 627 | end
|
624 | 628 |
|
625 | 629 | it "exact id match" do
|
626 |
| - expect(servers).to receive(:create).with(name: "hello", |
627 |
| - image_ref: "111", |
628 |
| - flavor_ref: "1", |
629 |
| - availability_zone: nil) |
| 630 | + expect(servers).to receive(:create).with( |
| 631 | + { |
| 632 | + name: "hello", |
| 633 | + image_ref: "111", |
| 634 | + flavor_ref: "1", |
| 635 | + availability_zone: nil, |
| 636 | + } |
| 637 | + ) |
630 | 638 | driver.send(:create_server)
|
631 | 639 | end
|
632 | 640 | end
|
|
641 | 649 | end
|
642 | 650 |
|
643 | 651 | it "exact name match" do
|
644 |
| - expect(servers).to receive(:create).with(name: "hello", |
645 |
| - image_ref: "222", |
646 |
| - flavor_ref: "2", |
647 |
| - availability_zone: nil) |
| 652 | + expect(servers).to receive(:create).with( |
| 653 | + { |
| 654 | + name: "hello", |
| 655 | + image_ref: "222", |
| 656 | + flavor_ref: "2", |
| 657 | + availability_zone: nil, |
| 658 | + } |
| 659 | + ) |
648 | 660 | driver.send(:create_server)
|
649 | 661 | end
|
650 | 662 | end
|
|
660 | 672 | end
|
661 | 673 |
|
662 | 674 | it "regex name match" do
|
663 |
| - expect(servers).to receive(:create).with(name: "hello", |
664 |
| - image_ref: "222", |
665 |
| - flavor_ref: "1", |
666 |
| - availability_zone: nil) |
| 675 | + expect(servers).to receive(:create).with( |
| 676 | + { |
| 677 | + name: "hello", |
| 678 | + image_ref: "222", |
| 679 | + flavor_ref: "1", |
| 680 | + availability_zone: nil, |
| 681 | + } |
| 682 | + ) |
667 | 683 | driver.send(:create_server)
|
668 | 684 | end
|
669 | 685 | end
|
|
682 | 698 | networks = [
|
683 | 699 | { "net_id" => "0922b7aa-0a2f-4e68-8ff7-2886c4fc472d" },
|
684 | 700 | ]
|
685 |
| - expect(servers).to receive(:create).with(name: "hello", |
686 |
| - image_ref: "111", |
687 |
| - flavor_ref: "1", |
688 |
| - availability_zone: nil, |
689 |
| - nics: networks) |
| 701 | + expect(servers).to receive(:create).with( |
| 702 | + { |
| 703 | + name: "hello", |
| 704 | + image_ref: "111", |
| 705 | + flavor_ref: "1", |
| 706 | + availability_zone: nil, |
| 707 | + nics: networks, |
| 708 | + } |
| 709 | + ) |
690 | 710 | driver.send(:create_server)
|
691 | 711 | end
|
692 | 712 | end
|
|
723 | 743 | { "net_id" => "1" },
|
724 | 744 | ]
|
725 | 745 | expect(servers).to receive(:create).with(
|
726 |
| - name: "hello", |
727 |
| - image_ref: "111", |
728 |
| - flavor_ref: "1", |
729 |
| - availability_zone: nil, |
730 |
| - nics: networks |
| 746 | + { |
| 747 | + name: "hello", |
| 748 | + image_ref: "111", |
| 749 | + flavor_ref: "1", |
| 750 | + availability_zone: nil, |
| 751 | + nics: networks, |
| 752 | + } |
731 | 753 | )
|
732 | 754 | driver.send(:create_server)
|
733 | 755 | end
|
|
748 | 770 | { "net_id" => "1" },
|
749 | 771 | ]
|
750 | 772 | expect(servers).to receive(:create).with(
|
751 |
| - name: "hello", |
752 |
| - image_ref: "111", |
753 |
| - flavor_ref: "1", |
754 |
| - availability_zone: nil, |
755 |
| - nics: networks |
| 773 | + { |
| 774 | + name: "hello", |
| 775 | + image_ref: "111", |
| 776 | + flavor_ref: "1", |
| 777 | + availability_zone: nil, |
| 778 | + nics: networks, |
| 779 | + } |
756 | 780 | )
|
757 | 781 | driver.send(:create_server)
|
758 | 782 | end
|
|
774 | 798 | { "net_id" => "2" },
|
775 | 799 | ]
|
776 | 800 | expect(servers).to receive(:create).with(
|
777 |
| - name: "hello", |
778 |
| - image_ref: "111", |
779 |
| - flavor_ref: "1", |
780 |
| - availability_zone: nil, |
781 |
| - nics: networks |
| 801 | + { |
| 802 | + name: "hello", |
| 803 | + image_ref: "111", |
| 804 | + flavor_ref: "1", |
| 805 | + availability_zone: nil, |
| 806 | + nics: networks, |
| 807 | + } |
782 | 808 | )
|
783 | 809 | driver.send(:create_server)
|
784 | 810 | end
|
|
802 | 828 |
|
803 | 829 | it "passes file contents" do
|
804 | 830 | expect(servers).to receive(:create).with(
|
805 |
| - name: "hello", |
806 |
| - image_ref: "111", |
807 |
| - flavor_ref: "1", |
808 |
| - availability_zone: nil, |
809 |
| - user_data: data |
| 831 | + { |
| 832 | + name: "hello", |
| 833 | + image_ref: "111", |
| 834 | + flavor_ref: "1", |
| 835 | + availability_zone: nil, |
| 836 | + user_data: data, |
| 837 | + } |
810 | 838 | )
|
811 | 839 | driver.send(:create_server)
|
812 | 840 | end
|
|
824 | 852 |
|
825 | 853 | it "enables config drive" do
|
826 | 854 | expect(servers).to receive(:create).with(
|
827 |
| - name: "hello", |
828 |
| - image_ref: "111", |
829 |
| - flavor_ref: "1", |
830 |
| - availability_zone: nil, |
831 |
| - config_drive: true |
| 855 | + { |
| 856 | + name: "hello", |
| 857 | + image_ref: "111", |
| 858 | + flavor_ref: "1", |
| 859 | + availability_zone: nil, |
| 860 | + config_drive: true, |
| 861 | + } |
832 | 862 | )
|
833 | 863 | driver.send(:create_server)
|
834 | 864 | end
|
|
855 | 885 |
|
856 | 886 | it "passes metadata contents" do
|
857 | 887 | expect(servers).to receive(:create).with(
|
858 |
| - name: "hello", |
859 |
| - image_ref: "111", |
860 |
| - flavor_ref: "1", |
861 |
| - availability_zone: nil, |
862 |
| - metadata: data |
| 888 | + { |
| 889 | + name: "hello", |
| 890 | + image_ref: "111", |
| 891 | + flavor_ref: "1", |
| 892 | + availability_zone: nil, |
| 893 | + metadata: data, |
| 894 | + } |
863 | 895 | )
|
864 | 896 | driver.send(:create_server)
|
865 | 897 | end
|
|
0 commit comments