Display empty schemas on the sidebar (#621)

* Display empty schemas on the sidebar
* Add schemas fetching test
* Skip pg_temp schemas
* Exclude pg_temp tables from other queries
This commit is contained in:
Dan Sosedoff
2022-12-19 13:26:13 -06:00
committed by GitHub
parent 69233cd769
commit 0cd61093b9
4 changed files with 63 additions and 31 deletions

View File

@@ -234,6 +234,12 @@ func testDatabases(t *testing.T) {
assertMatches(t, []string{"booktown", "postgres"}, res)
}
func testSchemas(t *testing.T) {
res, err := testClient.Schemas()
assert.NoError(t, err)
assert.Equal(t, []string{"public"}, res)
}
func testObjects(t *testing.T) {
res, err := testClient.Objects()
objects := ObjectsFromResult(res)
@@ -617,6 +623,7 @@ func TestAll(t *testing.T) {
testInfo(t)
testActivity(t)
testDatabases(t)
testSchemas(t)
testObjects(t)
testTable(t)
testTableRows(t)