dttung2905 commented on code in PR #326: URL: https://github.com/apache/iceberg-go/pull/326#discussion_r1987624927
########## catalog/glue/glue_test.go: ########## @@ -778,12 +781,103 @@ func TestGlueListNamespacesIntegration(t *testing.T) { } assert := require.New(t) - awscfg, err := config.LoadDefaultConfig(context.TODO(), config.WithClientLogMode(aws.LogRequest|aws.LogResponse)) + awsCfg, err := config.LoadDefaultConfig(context.TODO(), config.WithClientLogMode(aws.LogRequest|aws.LogResponse)) assert.NoError(err) - catalog := NewCatalog(WithAwsConfig(awscfg)) + ctlg := NewCatalog(WithAwsConfig(awsCfg)) - namespaces, err := catalog.ListNamespaces(context.TODO(), nil) + namespaces, err := ctlg.ListNamespaces(context.TODO(), nil) assert.NoError(err) assert.Contains(namespaces, []string{os.Getenv("TEST_DATABASE_NAME")}) } + +func TestGlueCreateTableSuccessIntegration(t *testing.T) { + if os.Getenv("TEST_DATABASE_NAME") == "" { + t.Skip() + } + if os.Getenv("TEST_TABLE_NAME") == "" { + t.Skip() + } + if os.Getenv("TEST_TABLE_LOCATION") == "" { + t.Skip() + } Review Comment: I tried to follow similar test in the file for mocking method called to AWS. However, I was struggling to mock the s3 getObject called that was inherently called by `LoadTable()` . What surprised me even more is that `TestGlueRenameTable` is quite similar ( delete the table, recreate the new table and load it) and somehow s3 called is not run. I think it is due to the fact that storage descriptor is set to `null` from the mocked GetTable method https://github.com/apache/iceberg-go/blob/16e6b69db76b25146e3c286c6c95be2410d2cc89/catalog/glue/glue_test.go#L623-L635 If you have other ideas, please let me know too :pray: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org