@@ -59,7 +59,7 @@ func TestRunsVschemaMigrations(t *testing.T) {
59
59
cluster , err := startCluster ()
60
60
defer cluster .TearDown ()
61
61
62
- assert .NoError (t , err )
62
+ require .NoError (t , err )
63
63
assertColumnVindex (t , cluster , columnVindex {keyspace : "test_keyspace" , table : "test_table" , vindex : "my_vdx" , vindexType : "hash" , column : "id" })
64
64
assertColumnVindex (t , cluster , columnVindex {keyspace : "app_customer" , table : "customers" , vindex : "hash" , vindexType : "hash" , column : "id" })
65
65
@@ -76,7 +76,7 @@ func TestPersistentMode(t *testing.T) {
76
76
dir := t .TempDir ()
77
77
78
78
cluster , err := startPersistentCluster (dir )
79
- assert .NoError (t , err )
79
+ require .NoError (t , err )
80
80
81
81
// Add a new "ad-hoc" vindex via vtgate once the cluster is up, to later make sure it is persisted across teardowns
82
82
err = addColumnVindex (cluster , "test_keyspace" , "alter vschema on persistence_test add vindex my_vdx(id)" )
@@ -115,7 +115,7 @@ func TestPersistentMode(t *testing.T) {
115
115
cluster .PersistentMode = false // Cleanup the tmpdir as we're done
116
116
cluster .TearDown ()
117
117
}()
118
- assert .NoError (t , err )
118
+ require .NoError (t , err )
119
119
120
120
// rerun our sanity checks to make sure vschema is persisted correctly
121
121
assertColumnVindex (t , cluster , columnVindex {keyspace : "test_keyspace" , table : "test_table" , vindex : "my_vdx" , vindexType : "hash" , column : "id" })
@@ -136,7 +136,7 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
136
136
defer resetConfig (conf )
137
137
138
138
cluster , err := startCluster ("--foreign_key_mode=allow" , "--enable_online_ddl=true" , "--enable_direct_ddl=true" )
139
- assert .NoError (t , err )
139
+ require .NoError (t , err )
140
140
defer cluster .TearDown ()
141
141
142
142
err = execOnCluster (cluster , "test_keyspace" , func (conn * mysql.Conn ) error {
@@ -162,7 +162,7 @@ func TestForeignKeysAndDDLModes(t *testing.T) {
162
162
163
163
cluster .TearDown ()
164
164
cluster , err = startCluster ("--foreign_key_mode=disallow" , "--enable_online_ddl=false" , "--enable_direct_ddl=false" )
165
- assert .NoError (t , err )
165
+ require .NoError (t , err )
166
166
defer cluster .TearDown ()
167
167
168
168
err = execOnCluster (cluster , "test_keyspace" , func (conn * mysql.Conn ) error {
@@ -190,7 +190,7 @@ func TestCanGetKeyspaces(t *testing.T) {
190
190
defer resetConfig (conf )
191
191
192
192
cluster , err := startCluster ()
193
- assert .NoError (t , err )
193
+ require .NoError (t , err )
194
194
defer cluster .TearDown ()
195
195
196
196
assertGetKeyspaces (t , cluster )
@@ -215,7 +215,7 @@ func TestExternalTopoServerConsul(t *testing.T) {
215
215
216
216
cluster , err := startCluster ("--external_topo_implementation=consul" ,
217
217
fmt .Sprintf ("--external_topo_global_server_address=%s" , serverAddr ), "--external_topo_global_root=consul_test/global" )
218
- assert .NoError (t , err )
218
+ require .NoError (t , err )
219
219
defer cluster .TearDown ()
220
220
221
221
assertGetKeyspaces (t , cluster )
@@ -251,7 +251,7 @@ func TestMtlsAuth(t *testing.T) {
251
251
fmt .Sprintf ("--vtctld_grpc_cert=%s" , clientCert ),
252
252
fmt .Sprintf ("--vtctld_grpc_ca=%s" , caCert ),
253
253
fmt .Sprintf ("--grpc_auth_mtls_allowed_substrings=%s" , "CN=ClientApp" ))
254
- assert .NoError (t , err )
254
+ require .NoError (t , err )
255
255
defer func () {
256
256
cluster .PersistentMode = false // Cleanup the tmpdir as we're done
257
257
cluster .TearDown ()
@@ -295,7 +295,7 @@ func TestMtlsAuthUnauthorizedFails(t *testing.T) {
295
295
fmt .Sprintf ("--grpc_auth_mtls_allowed_substrings=%s" , "CN=ClientApp" ))
296
296
defer cluster .TearDown ()
297
297
298
- assert .Error (t , err )
298
+ require .Error (t , err )
299
299
assert .Contains (t , err .Error (), "code = Unauthenticated desc = client certificate not authorized" )
300
300
}
301
301
0 commit comments