Skip to content

Commit 46360e2

Browse files
authored
Add system_stats extension test
Add system_stats extension test
2 parents 902ca46 + 6dee64d commit 46360e2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/main.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,26 @@ func getCommonExtensionTests() []Test {
708708

709709
func getStandardOnlyTests() []Test {
710710
return []Test{
711+
{
712+
Name: "system_stats extension can be created",
713+
StandardOnly: true,
714+
Cmd: "psql -U postgres -d testdb -t -A -c \"CREATE EXTENSION IF NOT EXISTS system_stats; SELECT 1;\"",
715+
ExpectedOutput: expectSuccess,
716+
},
717+
{
718+
Name: "system_stats pg_sys_os_info works",
719+
StandardOnly: true,
720+
Cmd: "psql -U postgres -d testdb -t -A -c \"SELECT 1 FROM pg_sys_os_info();\"",
721+
ExpectedOutput: func(exitCode int, output string) error {
722+
if exitCode != 0 {
723+
return fmt.Errorf("unexpected exit code: %d", exitCode)
724+
}
725+
if strings.TrimSpace(output) != "1" {
726+
return fmt.Errorf("unexpected output: %s (expected 1)", output)
727+
}
728+
return nil
729+
},
730+
},
711731
{
712732
Name: "pgvector extension can be created",
713733
StandardOnly: true,

0 commit comments

Comments
 (0)