如果我的 ID 是连续的,我如何使用 Liquibase 为 PostgreSQL 进行插入。我尝试使用以下方法:
<changeSet author="rparente" id="service-1.1-2019-01-09-01">
<insert tableName="tenant">
<column name="id"defaultValueSequenceNext="hibernate_sequence"/>
<column name="description" value="Prueba"/>
<column name="name" value="antel"/>
<column name="service_id" value="antel"/>
</insert>
</changeSet>
Run Code Online (Sandbox Code Playgroud)
我试着用
<changeSet author="rparente" id="service-1.1-2019-01-09-01">
<insert tableName="tenant">
<column name="id" value="nextval('hibernate_sequence')"/>
<column name="description" value="Prueba"/>
<column name="name" value="antel"/>
<column name="service_id" value="antel"/>
</insert>
</changeSet>
Run Code Online (Sandbox Code Playgroud)
错误是:
错误:“id”列中的空值违反了非空约束
我需要从每个 Rest Assured 测试中获取“CURL”操作,并在未通过测试时在控制台中打印。这是可能的?
例如,转换:
given().relaxedHTTPSValidation().
auth().basic("name", "password").
param("grant_type","client_credentials").
when().
post("https://test_url/oauth/token").
then().
statusCode(200);
Run Code Online (Sandbox Code Playgroud)
到
curl --user name:passwoed -k -X POST \
https://test_url/oauth/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d grant_type=client_credentials
Run Code Online (Sandbox Code Playgroud)