@@ -40,120 +40,130 @@ async fn readonly_user() {
4040async fn test_fetch ( client : & Client ) {
4141 let query = select_readonly_setting_query ( client) ;
4242 let initial_readonly_row = run_fetch ( query) . await ;
43+
44+ // As of 0.14.2, we won't be implicitly setting `readonly` anymore.
4345 assert_eq ! (
44- initial_readonly_row. value, "1 " ,
45- "initial `fetch` readonly setting value should be 1 "
46+ initial_readonly_row. value, "0 " ,
47+ "initial `fetch` readonly setting value should be 0 "
4648 ) ;
4749
48- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
50+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
4951 let disabled_readonly_row = run_fetch ( query) . await ;
5052 assert_eq ! (
51- disabled_readonly_row. value, "0 " ,
52- "`fetch` modified readonly setting value should be 0 "
53+ disabled_readonly_row. value, "1 " ,
54+ "`fetch` modified readonly setting value should be 1 "
5355 ) ;
5456
55- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
57+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
5658 let same_readonly_row = run_fetch ( query) . await ;
5759 assert_eq ! (
58- same_readonly_row. value, "1 " ,
60+ same_readonly_row. value, "0 " ,
5961 "`fetch` should allow setting the same readonly setting value"
6062 ) ;
6163}
6264
6365async fn test_fetch_bytes ( client : & Client ) {
6466 let query = select_readonly_setting_query ( client) ;
6567 let initial_readonly_value = run_fetch_bytes ( query) . await ;
68+
69+ // As of 0.14.2, we won't be implicitly setting `readonly` anymore.
6670 assert_eq ! (
67- initial_readonly_value, b"1 \n " ,
68- "initial `fetch_bytes` readonly setting value should be 1 "
71+ initial_readonly_value, b"0 \n " ,
72+ "initial `fetch_bytes` readonly setting value should be 0 "
6973 ) ;
7074
71- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
75+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
7276 let disabled_readonly_value = run_fetch_bytes ( query) . await ;
7377 assert_eq ! (
74- disabled_readonly_value, b"0 \n " ,
75- "`fetch_bytes` modified readonly setting value should be 0 "
78+ disabled_readonly_value, b"1 \n " ,
79+ "`fetch_bytes` modified readonly setting value should be 1 "
7680 ) ;
7781
78- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
82+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
7983 let same_readonly_value = run_fetch_bytes ( query) . await ;
8084 assert_eq ! (
81- same_readonly_value, b"1 \n " ,
85+ same_readonly_value, b"0 \n " ,
8286 "`fetch_bytes` should allow setting the same readonly setting value"
8387 ) ;
8488}
8589
8690async fn test_fetch_one ( client : & Client ) {
8791 let query = select_readonly_setting_query ( client) ;
8892 let initial_readonly_value: String = run_fetch_one ( query) . await ;
93+
94+ // As of 0.14.2, we won't be implicitly setting `readonly` anymore.
8995 assert_eq ! (
90- initial_readonly_value, "1 " ,
91- "initial `fetch_one` readonly setting value should be 1 "
96+ initial_readonly_value, "0 " ,
97+ "initial `fetch_one` readonly setting value should be 0 "
9298 ) ;
9399
94- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
100+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
95101 let disabled_readonly_value: String = run_fetch_one ( query) . await ;
96102 assert_eq ! (
97- disabled_readonly_value, "0 " ,
98- "`fetch_one` modified readonly setting value should be 0 "
103+ disabled_readonly_value, "1 " ,
104+ "`fetch_one` modified readonly setting value should be 1 "
99105 ) ;
100106
101- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
107+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
102108 let same_readonly_value: String = run_fetch_one ( query) . await ;
103109 assert_eq ! (
104- same_readonly_value, "1 " ,
110+ same_readonly_value, "0 " ,
105111 "`fetch_one` should allow setting the same readonly setting value"
106112 ) ;
107113}
108114
109115async fn test_fetch_optional ( client : & Client ) {
110116 let query = select_readonly_setting_query ( client) ;
111117 let initial_readonly_value: Option < String > = run_fetch_optional ( query) . await ;
118+
119+ // As of 0.14.2, we won't be implicitly setting `readonly` anymore.
112120 assert_eq ! (
113121 initial_readonly_value. as_deref( ) ,
114- Some ( "1 " ) ,
115- "initial `fetch_optional` readonly setting value should be 1 "
122+ Some ( "0 " ) ,
123+ "initial `fetch_optional` readonly setting value should be 0 "
116124 ) ;
117125
118- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
126+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
119127 let disabled_readonly_value: Option < String > = run_fetch_optional ( query) . await ;
120128 assert_eq ! (
121129 disabled_readonly_value. as_deref( ) ,
122- Some ( "0 " ) ,
123- "`fetch_optional` modified readonly setting value should be 0 "
130+ Some ( "1 " ) ,
131+ "`fetch_optional` modified readonly setting value should be 1 "
124132 ) ;
125133
126- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
134+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
127135 let same_readonly_value: Option < String > = run_fetch_optional ( query) . await ;
128136 assert_eq ! (
129137 same_readonly_value. as_deref( ) ,
130- Some ( "1 " ) ,
138+ Some ( "0 " ) ,
131139 "`fetch_optional` should allow setting the same readonly setting value"
132140 ) ;
133141}
134142
135143async fn test_fetch_all ( client : & Client ) {
136144 let query = select_readonly_setting_query ( client) ;
137145 let initial_readonly_value: Vec < String > = run_fetch_all ( query) . await ;
146+
147+ // As of 0.14.2, we won't be implicitly setting `readonly` anymore.
138148 assert_eq ! (
139149 initial_readonly_value,
140- vec![ "1 " ] ,
141- "initial `fetch_all` readonly setting value should be 1 "
150+ vec![ "0 " ] ,
151+ "initial `fetch_all` readonly setting value should be 0 "
142152 ) ;
143153
144- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
154+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
145155 let disabled_readonly_value: Vec < String > = run_fetch_all ( query) . await ;
146156 assert_eq ! (
147157 disabled_readonly_value,
148- vec![ "0 " ] ,
149- "`fetch_all` modified readonly setting value should be 0 "
158+ vec![ "1 " ] ,
159+ "`fetch_all` modified readonly setting value should be 1 "
150160 ) ;
151161
152- let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "1 " ) ;
162+ let query = select_readonly_setting_query ( client) . with_option ( "readonly" , "0 " ) ;
153163 let same_readonly_value: Vec < String > = run_fetch_all ( query) . await ;
154164 assert_eq ! (
155165 same_readonly_value,
156- vec![ "1 " ] ,
166+ vec![ "0 " ] ,
157167 "`fetch_all` should allow setting the same readonly setting value"
158168 ) ;
159169}
0 commit comments