tests.yaml 28 KB
Newer Older
1001
1002
1003
1004
1005
1006
1007
          - 'ressources-pedagogiques.org'
          - '-e'
          - 'foobar'
      retcode: 2
      stderr: ''
      partstdout: 'Cannot find'

Alexandre's avatar
Alexandre committed
1008
1009
1010
1011
################################################################################

    - exe: './homer.py'
      name: '[doh] HEAD and POST'
Alexandre's avatar
Alexandre committed
1012
1013
1014
      markers:
          - 'doh'
          - 'exception'
Alexandre's avatar
Alexandre committed
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
      args:
          - '--head'
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'POST or HEAD'
      stdout: ''

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
      name: '[doh] POST --post'
      markers:
          - 'doh'
      args:
          - '--post'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[doh] POST --POST'
Alexandre's avatar
Alexandre committed
1038
1039
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1040
1041
1042
1043
1044
1045
1046
1047
1048
      args:
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
      name: '[doh] POST -P'
      markers:
          - 'doh'
      args:
          - '-P'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[doh] HEAD --head'
Alexandre's avatar
Alexandre committed
1062
1063
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1064
1065
1066
1067
1068
1069
1070
      args:
          - '--head'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'
Alexandre's avatar
Alexandre committed
1071

Alexandre's avatar
Alexandre committed
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
    - exe: './homer.py'
      name: '[doh] HEAD --HEAD'
      markers:
          - 'doh'
      args:
          - '--HEAD'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'

    - exe: './homer.py'
      name: '[doh] HEAD -e'
      markers:
          - 'doh'
      args:
          - '-e'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'

Alexandre's avatar
Alexandre committed
1096
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1097
      name: '[doh] Multistreams with DoT (error)'
Alexandre's avatar
Alexandre committed
1098
1099
1100
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1101
          - 'exception'
Alexandre's avatar
Alexandre committed
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
      args:
          - '--multistreams'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams makes no sense for DoT'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1112
      name: '[doh] Multistreams without input file (error)'
Alexandre's avatar
Alexandre committed
1113
1114
1115
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1116
          - 'exception'
Alexandre's avatar
Alexandre committed
1117
1118
1119
1120
1121
1122
1123
1124
1125
      args:
          - '--multistreams'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams requires an input file'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1126
      name: '[doh] Multistreams too many arguments (error)'
Alexandre's avatar
Alexandre committed
1127
1128
1129
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1130
          - 'exception'
Alexandre's avatar
Alexandre committed
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Wrong number of arguments'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1142
      name: '[doh] Multistreams invalid URL'
Alexandre's avatar
Alexandre committed
1143
1144
1145
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1146
          - 'exception'
Alexandre's avatar
Alexandre committed
1147
1148
1149
1150
1151
1152
1153
1154
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'DoH requires a valid'
      stdout: ''
Alexandre's avatar
Alexandre committed
1155

Alexandre's avatar
Alexandre committed
1156
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1157
      name: '[doh] Multistreams with 1 request'
Alexandre's avatar
Alexandre committed
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      stderr: ''
      partstdout: 'NOERR'
Alexandre's avatar
Alexandre committed
1169

1170
1171
1172
1173
1174
      # This test might fail
      # this is due to the fact that it will check that libcurl
      # uses HTTP/2 streams or sometimes the connection is
      # available very quickly making unnecessary to use
      # different streams
Alexandre's avatar
Alexandre committed
1175
    - exe : './homer.py'
1176
      name: '[doh] Multistreams with 3 requests (can fail)'
Alexandre's avatar
Alexandre committed
1177
1178
1179
      markers:
          - 'doh'
          - 'streams'
1180
          - 'xfail'
Alexandre's avatar
Alexandre committed
1181
1182
1183
1184
1185
1186
      args:
          - '-v'
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
1187
1188
          - '3'
          - 'https://doh.powerdns.org'
Alexandre's avatar
Alexandre committed
1189
1190
1191
1192
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'

1193
      # same as previous test
Alexandre's avatar
Alexandre committed
1194
1195
1196
1197
1198
    - exe : './homer.py'
      name: '[doh] Multistreams with 5 requests'
      markers:
          - 'doh'
          - 'streams'
1199
          - 'xfail'
Alexandre's avatar
Alexandre committed
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
      args:
          - '-v'
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
          - '5'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'