Skip to content

Commit 29ce38d

Browse files
committed
fix: compat test in proto-conv
1 parent c9cf62a commit 29ce38d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

common/proto-conv/tests/it/proto_conv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ fn test_pb_from_to() -> anyhow::Result<()> {
185185
fn test_incompatible() -> anyhow::Result<()> {
186186
let db_meta = new_db_meta();
187187
let mut p = db_meta.to_pb()?;
188-
p.ver = 3;
189-
p.min_compatible = 3;
188+
p.ver = 4;
189+
p.min_compatible = 4;
190190

191191
let res = mt::DatabaseMeta::from_pb(p);
192192
assert_eq!(
193193
Incompatible {
194-
reason: s("executable ver=2 is smaller than the message min compatible ver: 3")
194+
reason: s("executable ver=3 is smaller than the message min compatible ver: 4")
195195
},
196196
res.unwrap_err()
197197
);

common/proto-conv/tests/it/user_proto_conv.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn s(ss: impl ToString) -> String {
3232
fn test_user_info() -> UserInfo {
3333
let option = mt::UserOption::default()
3434
.with_set_flag(mt::UserOptionFlag::TenantSetting)
35-
.with_default_role(Some("role1".to_string()));
35+
.with_default_role(None);
3636

3737
mt::UserInfo {
3838
name: "test_user".to_string(),
@@ -115,13 +115,13 @@ fn test_user_incompatible() -> anyhow::Result<()> {
115115
{
116116
let user_info = test_user_info();
117117
let mut p = user_info.to_pb()?;
118-
p.ver = 3;
119-
p.min_compatible = 3;
118+
p.ver = 4;
119+
p.min_compatible = 4;
120120

121121
let res = mt::UserInfo::from_pb(p);
122122
assert_eq!(
123123
Incompatible {
124-
reason: s("executable ver=2 is smaller than the message min compatible ver: 3")
124+
reason: s("executable ver=3 is smaller than the message min compatible ver: 4")
125125
},
126126
res.unwrap_err()
127127
);
@@ -130,13 +130,13 @@ fn test_user_incompatible() -> anyhow::Result<()> {
130130
{
131131
let user_stage_info = test_user_stage_info();
132132
let mut p = user_stage_info.to_pb()?;
133-
p.ver = 3;
134-
p.min_compatible = 3;
133+
p.ver = 4;
134+
p.min_compatible = 4;
135135

136136
let res = mt::UserStageInfo::from_pb(p);
137137
assert_eq!(
138138
Incompatible {
139-
reason: s("executable ver=2 is smaller than the message min compatible ver: 3")
139+
reason: s("executable ver=3 is smaller than the message min compatible ver: 4")
140140
},
141141
res.unwrap_err()
142142
);

0 commit comments

Comments
 (0)