@@ -1117,7 +1117,7 @@ func (r *RestCatalogSuite) TestDropTable404() {
1117
1117
}
1118
1118
1119
1119
func (r * RestCatalogSuite ) TestRegisterTable200 () {
1120
- r .mux .HandleFunc ("/v1/namespaces/fokko/tables/table " , func (w http.ResponseWriter , req * http.Request ) {
1120
+ r .mux .HandleFunc ("/v1/namespaces/fokko/tables/fokko2 " , func (w http.ResponseWriter , req * http.Request ) {
1121
1121
r .Require ().Equal (http .MethodPost , req .Method )
1122
1122
1123
1123
for k , v := range TestHeaders {
@@ -1129,7 +1129,7 @@ func (r *RestCatalogSuite) TestRegisterTable200() {
1129
1129
MetadataLoc string `json:"metadata-location"`
1130
1130
}
1131
1131
r .NoError (json .NewDecoder (req .Body ).Decode (& payload ))
1132
- r .Equal ("table " , payload .Name )
1132
+ r .Equal ("fokko2 " , payload .Name )
1133
1133
r .Equal ("s3://warehouse/database/table/metadata/00001-5f2f8166-244c-4eae-ac36-384ecdec81fc.gz.metadata.json" , payload .MetadataLoc )
1134
1134
1135
1135
w .WriteHeader (http .StatusOK )
@@ -1251,7 +1251,7 @@ func (r *RestCatalogSuite) TestRegisterTable200() {
1251
1251
}` ))
1252
1252
})
1253
1253
1254
- cat , err := rest .NewCatalog ("rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1254
+ cat , err := rest .NewCatalog (context . Background (), "rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1255
1255
r .Require ().NoError (err )
1256
1256
1257
1257
tbl , err := cat .RegisterTable (context .Background (), catalog .ToIdentifier ("fokko" , "fokko2" ), "s3://warehouse/database/table/metadata/00001-5f2f8166-244c-4eae-ac36-384ecdec81fc.gz.metadata.json" )
@@ -1262,7 +1262,6 @@ func (r *RestCatalogSuite) TestRegisterTable200() {
1262
1262
r .EqualValues (1 , tbl .Metadata ().Version ())
1263
1263
r .Equal ("d55d9dda-6561-423a-8bfc-787980ce421f" , tbl .Metadata ().TableUUID ().String ())
1264
1264
r .Equal ("bryan" , tbl .Metadata ().Properties ()["owner" ])
1265
- // TODO Add more asserting on the schema
1266
1265
}
1267
1266
1268
1267
func (r * RestCatalogSuite ) TestRegisterTable404 () {
@@ -1290,7 +1289,7 @@ func (r *RestCatalogSuite) TestRegisterTable404() {
1290
1289
}
1291
1290
}` ))
1292
1291
})
1293
- cat , err := rest .NewCatalog ("rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1292
+ cat , err := rest .NewCatalog (context . Background (), "rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1294
1293
r .Require ().NoError (err )
1295
1294
1296
1295
_ , err = cat .RegisterTable (context .Background (), catalog .ToIdentifier ("nonexistent" , "fokko2" ), "s3://warehouse/database/table/metadata/00001-5f2f8166-244c-4eae-ac36-384ecdec81fc.gz.metadata.json" )
@@ -1323,7 +1322,7 @@ func (r *RestCatalogSuite) TestRegisterTable409() {
1323
1322
}
1324
1323
}` ))
1325
1324
})
1326
- cat , err := rest .NewCatalog ("rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1325
+ cat , err := rest .NewCatalog (context . Background (), "rest" , r .srv .URL , rest .WithOAuthToken (TestToken ))
1327
1326
r .Require ().NoError (err )
1328
1327
1329
1328
_ , err = cat .RegisterTable (context .Background (), catalog .ToIdentifier ("fokko" , "alreadyexist" ), "s3://warehouse/database/table/metadata/00001-5f2f8166-244c-4eae-ac36-384ecdec81fc.gz.metadata.json" )
0 commit comments