Projet

Général

Profil

validate_idp_list_test.patch

John Dennis, 17 juin 2016 21:21

Télécharger (2,78 ko)

Voir les différences:


  

tests/login_tests_saml2.c
1245 1245

  
1246 1246
		if (ecpIDPListVariant == ECP_IDP_LIST_ECP) {
1247 1247
			check_not_null(ecp->known_sp_provided_idp_entries_supporting_ecp);
1248
			check_equals(g_list_length(ecp->known_sp_provided_idp_entries_supporting_ecp),
1249
						 g_list_length(idp_list->IDPEntry));
1250

  
1248 1251
			for (ecp_iter = g_list_first(ecp->known_sp_provided_idp_entries_supporting_ecp),
1249 1252
				 src_iter = g_list_first(idp_list->IDPEntry);
1250 1253
				 ecp_iter && src_iter;
1251 1254
				 ecp_iter = g_list_next(ecp_iter), src_iter = g_list_next(src_iter)) {
1252
				gchar *ecp_item, *src_item;
1255
				LassoSamlp2IDPEntry *ecp_item, *src_item;
1256

  
1257
				ecp_item = LASSO_SAMLP2_IDP_ENTRY(ecp_iter->data);
1258
				src_item = LASSO_SAMLP2_IDP_ENTRY(src_iter->data);
1259

  
1260
				check_not_null(ecp_item->ProviderID);
1261
				check_not_null(src_item->ProviderID);
1262
				check_str_equals(ecp_item->ProviderID, src_item->ProviderID);
1253 1263

  
1254
				ecp_item = ecp_iter->data;
1255
				src_item = src_iter->data;
1264
				check_not_null(ecp_item->Name);
1265
				check_not_null(src_item->Name);
1266
				check_str_equals(ecp_item->Name, src_item->Name);
1256 1267

  
1257
				check_not_null(ecp_item);
1258
				check_not_null(src_item);
1259
				check_str_equals(ecp_item, src_item);
1268
				check_not_null(ecp_item->Loc);
1269
				check_not_null(src_item->Loc);
1270
				check_str_equals(ecp_item->Loc, src_item->Loc);
1260 1271
			}
1261 1272
		} else {
1262 1273
			check_null(ecp->known_sp_provided_idp_entries_supporting_ecp);
......
1356 1367
	check_null(LASSO_PROFILE(spLoginContext)->msg_url);
1357 1368
	check_not_null(strstr(spPaosRequestMsg, "RelayState"));
1358 1369

  
1359

  
1360 1370
	/* Finished with SP Login Context, will create new one later */
1361 1371
	lasso_server_destroy(spContext);
1362 1372
	spContext = NULL;
......
1388 1398
	check_str_equals(ecp->relaystate, relayState);
1389 1399
	check_str_equals(ecp->issuer->content, "http://sp5/metadata");
1390 1400
	check_str_equals(ecp->provider_name, provider_name);
1391
    check_equals(ecp->is_passive, is_passive);
1401
	check_equals(ecp->is_passive, is_passive);
1392 1402

  
1393 1403
	/* Validate ECP IdP list info & default IdP URL */
1394 1404
	validate_idp_list(ecp, ecpIDPListVariant, idp_list);