-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix get_proc_stats's error related to different strings split in diff…
…erent Perl versions. Update pgcenter-testing fixtures and image.
- Loading branch information
Showing
6 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package query | ||
|
||
import ( | ||
"fmt" | ||
"github.com/lesovsky/pgcenter/internal/postgres" | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func Test_QueryPgcenterSchema(t *testing.T) { | ||
queries := []string{ | ||
"SELECT * FROM pgcenter.sys_proc_diskstats", | ||
"SELECT * FROM pgcenter.sys_proc_loadavg", | ||
"SELECT * FROM pgcenter.sys_proc_meminfo", | ||
"SELECT * FROM pgcenter.sys_proc_netdev", | ||
"SELECT * FROM pgcenter.sys_proc_stat", | ||
"SELECT * FROM pgcenter.sys_proc_uptime", | ||
"SELECT * FROM pgcenter.sys_proc_mounts", | ||
} | ||
|
||
versions := []int{90500, 90600, 100000, 110000, 120000, 130000, 140000} | ||
|
||
for _, version := range versions { | ||
t.Run(fmt.Sprintf("query-pgcenter-schema/%d", version), func(t *testing.T) { | ||
conn, err := postgres.NewTestConnectVersion(version) | ||
assert.NoError(t, err) | ||
|
||
for _, q := range queries { | ||
_, err = conn.Exec(q) | ||
assert.NoError(t, err) | ||
} | ||
|
||
conn.Close() | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters