Local queries (#641)
* Read local queries from pgweb home directory * Refactor local query functionality * Allow picking local query in the query tab * WIP * Disable local query dropdown during execution * Only allow local queries running in a single session mode * Add middleware to enforce local query endpoint availability * Fix query check * Add query store tests * Make query store errors portable * Skip building specific tests on windows
This commit is contained in:
@@ -660,6 +660,15 @@ func testTablesStats(t *testing.T) {
|
||||
assert.Equal(t, columns, result.Columns)
|
||||
}
|
||||
|
||||
func testConnContext(t *testing.T) {
|
||||
result, err := testClient.GetConnContext()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "localhost", result.Host)
|
||||
assert.Equal(t, "postgres", result.User)
|
||||
assert.Equal(t, "booktown", result.Database)
|
||||
assert.Equal(t, "default", result.Mode)
|
||||
}
|
||||
|
||||
func TestAll(t *testing.T) {
|
||||
if onWindows() {
|
||||
t.Log("Unit testing on Windows platform is not supported.")
|
||||
@@ -698,6 +707,7 @@ func TestAll(t *testing.T) {
|
||||
testReadOnlyMode(t)
|
||||
testDumpExport(t)
|
||||
testTablesStats(t)
|
||||
testConnContext(t)
|
||||
|
||||
teardownClient()
|
||||
teardown(t, true)
|
||||
|
||||
Reference in New Issue
Block a user