Skip to content

Commit

Permalink
fix: db test on SELinux enabled systems (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
avallete authored Sep 17, 2024
1 parent b0a0488 commit 9c1b27a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/db/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func Run(ctx context.Context, testFiles []string, config pgconn.Config, fsys afe
}()
}
// Use custom network when connecting to local database
hostConfig := container.HostConfig{Binds: binds}
// disable selinux via security-opt to allow pg-tap to work properly
hostConfig := container.HostConfig{Binds: binds, SecurityOpt: []string{"label:disable"}}
if utils.IsLocalDatabase(config) {
config.Host = utils.DbAliases[0]
config.Port = 5432
Expand Down

0 comments on commit 9c1b27a

Please sign in to comment.