@@ -813,6 +813,184 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
813 | 813 | expect(result.stderr).toContain("provider=aws"); |
814 | 814 | }); |
815 | 815 | |
| 816 | +it("uses the native Windows daemon job for Windows hydrate actions", () => { |
| 817 | +const result = runWrapper(azureProviderHelp, [ |
| 818 | +"actions", |
| 819 | +"hydrate", |
| 820 | +"--provider", |
| 821 | +"aws", |
| 822 | +"--target", |
| 823 | +"windows", |
| 824 | +"--id", |
| 825 | +"cbx_existing", |
| 826 | +]); |
| 827 | + |
| 828 | +expect(result.status).toBe(0); |
| 829 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 830 | +"actions", |
| 831 | +"hydrate", |
| 832 | +"--provider", |
| 833 | +"aws", |
| 834 | +"--target", |
| 835 | +"windows", |
| 836 | +"--id", |
| 837 | +"cbx_existing", |
| 838 | +"--job", |
| 839 | +"hydrate-windows-daemon", |
| 840 | +]); |
| 841 | +}); |
| 842 | + |
| 843 | +it("repairs generic hydrate jobs for native Windows hydrate actions", () => { |
| 844 | +const result = runWrapper(azureProviderHelp, [ |
| 845 | +"actions", |
| 846 | +"hydrate", |
| 847 | +"--provider", |
| 848 | +"aws", |
| 849 | +"--target", |
| 850 | +"windows", |
| 851 | +"--job", |
| 852 | +"hydrate", |
| 853 | +"--id", |
| 854 | +"cbx_existing", |
| 855 | +]); |
| 856 | + |
| 857 | +expect(result.status).toBe(0); |
| 858 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 859 | +"actions", |
| 860 | +"hydrate", |
| 861 | +"--provider", |
| 862 | +"aws", |
| 863 | +"--target", |
| 864 | +"windows", |
| 865 | +"--job", |
| 866 | +"hydrate-windows-daemon", |
| 867 | +"--id", |
| 868 | +"cbx_existing", |
| 869 | +]); |
| 870 | +}); |
| 871 | + |
| 872 | +it("repairs generic hydrate job assignments for native Windows hydrate actions", () => { |
| 873 | +const result = runWrapper(azureProviderHelp, [ |
| 874 | +"actions", |
| 875 | +"hydrate", |
| 876 | +"--provider", |
| 877 | +"aws", |
| 878 | +"--target", |
| 879 | +"windows", |
| 880 | +"--job=hydrate", |
| 881 | +"--id", |
| 882 | +"cbx_existing", |
| 883 | +]); |
| 884 | + |
| 885 | +expect(result.status).toBe(0); |
| 886 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 887 | +"actions", |
| 888 | +"hydrate", |
| 889 | +"--provider", |
| 890 | +"aws", |
| 891 | +"--target", |
| 892 | +"windows", |
| 893 | +"--job=hydrate-windows-daemon", |
| 894 | +"--id", |
| 895 | +"cbx_existing", |
| 896 | +]); |
| 897 | +}); |
| 898 | + |
| 899 | +it("keeps post-delimiter hydrate payloads untouched for native Windows hydrate actions", () => { |
| 900 | +const result = runWrapper(azureProviderHelp, [ |
| 901 | +"actions", |
| 902 | +"hydrate", |
| 903 | +"--provider", |
| 904 | +"aws", |
| 905 | +"--target", |
| 906 | +"windows", |
| 907 | +"--id", |
| 908 | +"cbx_existing", |
| 909 | +"--", |
| 910 | +"--job", |
| 911 | +"hydrate", |
| 912 | +]); |
| 913 | + |
| 914 | +expect(result.status).toBe(0); |
| 915 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 916 | +"actions", |
| 917 | +"hydrate", |
| 918 | +"--provider", |
| 919 | +"aws", |
| 920 | +"--target", |
| 921 | +"windows", |
| 922 | +"--id", |
| 923 | +"cbx_existing", |
| 924 | +"--job", |
| 925 | +"hydrate-windows-daemon", |
| 926 | +"--", |
| 927 | +"--job", |
| 928 | +"hydrate", |
| 929 | +]); |
| 930 | +}); |
| 931 | + |
| 932 | +it("keeps explicit non-native hydrate jobs for Windows hydrate actions", () => { |
| 933 | +const result = runWrapper(azureProviderHelp, [ |
| 934 | +"actions", |
| 935 | +"hydrate", |
| 936 | +"--provider", |
| 937 | +"aws", |
| 938 | +"--target", |
| 939 | +"windows", |
| 940 | +"--job", |
| 941 | +"hydrate-github", |
| 942 | +"--id", |
| 943 | +"cbx_existing", |
| 944 | +]); |
| 945 | + |
| 946 | +expect(result.status).toBe(0); |
| 947 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 948 | +"actions", |
| 949 | +"hydrate", |
| 950 | +"--provider", |
| 951 | +"aws", |
| 952 | +"--target", |
| 953 | +"windows", |
| 954 | +"--job", |
| 955 | +"hydrate-github", |
| 956 | +"--id", |
| 957 | +"cbx_existing", |
| 958 | +]); |
| 959 | +}); |
| 960 | + |
| 961 | +it("keeps WSL2 hydrate actions on the requested job", () => { |
| 962 | +const result = runWrapper(azureProviderHelp, [ |
| 963 | +"actions", |
| 964 | +"hydrate", |
| 965 | +"--provider", |
| 966 | +"aws", |
| 967 | +"--target", |
| 968 | +"windows", |
| 969 | +"--windows-mode", |
| 970 | +"wsl2", |
| 971 | +"--job", |
| 972 | +"hydrate", |
| 973 | +"--id", |
| 974 | +"cbx_existing", |
| 975 | +]); |
| 976 | + |
| 977 | +expect(result.status).toBe(0); |
| 978 | +expect(parseFakeCrabboxOutput(result).args).toEqual([ |
| 979 | +"actions", |
| 980 | +"hydrate", |
| 981 | +"--provider", |
| 982 | +"aws", |
| 983 | +"--target", |
| 984 | +"windows", |
| 985 | +"--windows-mode", |
| 986 | +"wsl2", |
| 987 | +"--job", |
| 988 | +"hydrate", |
| 989 | +"--id", |
| 990 | +"cbx_existing", |
| 991 | +]); |
| 992 | +}); |
| 993 | + |
816 | 994 | it("prefers Azure for unqualified Windows warmups", () => { |
817 | 995 | const result = runWrapper(azureProviderHelp, ["warmup", "--target", "windows"]); |
818 | 996 | |
|