有一个应用程序在包含CAS之前工作,但现在CAS执行重定向,烟雾测试找不到在哪里进行测试
我们期望处理200的返回代码,但是实际的返回代码是错误的:状态代码302
$this->assertResponseStatusCodeSame(预期代码.200(
============================ TERMINAL MESSAGE
18) AppTestsSmokeTestsSmokeTest::testConCRUD with data set #17 ('/secure/conv/404496/c...1/edit')
Failed asserting that the Response status code is 200.
HTTP/1.1 302 Found
Cache-Control: max-age=0, must-revalidate, private
Content-Type: text/html; charset=UTF-8
Date: Thu, 21 Jul 2022 13:01:33 GMT
Expires: Thu, 21 Jul 2022 13:01:33 GMT
Location: https://cas-site-cas-module.cloudapps.mysite.com/cas/login?service=http%3A%2F%2Flocalhost%2Fsecure%2Fconv%2F404496%2Fconv%2F1%2Fprod%2F1%2Fedit
========================================================
仅使用第2部分就成功地进行了烟雾测试
第1部分:https://cas-site-cas-module.cloudapps.mysite.com/cas/login?service=
第2部分:http%3A%2F%2localhost%2Fsecure%2Convocatoria%2F404496%2Conv%2F1%2Prod%2F1%2Edit
我们在security.yaml上添加一个配置以绕过CAS 来解决此问题
when@test:
security:
password_hashers:
...