mirror of
https://github.com/juanfont/headscale.git
synced 2025-09-25 17:51:11 +02:00
integration/hsic: simplify PostgreSQL handling - just skip database extraction
When tests use PostgreSQL, simply skip the database file extraction entirely instead of creating note files. Keep it clean and simple.
This commit is contained in:
parent
9d20a70672
commit
15512475fb
@ -638,11 +638,9 @@ func (t *HeadscaleInContainer) SaveMapResponses(savePath string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *HeadscaleInContainer) SaveDatabase(savePath string) error {
|
func (t *HeadscaleInContainer) SaveDatabase(savePath string) error {
|
||||||
// If using PostgreSQL, create a note file instead of trying to extract SQLite
|
// If using PostgreSQL, skip database file extraction
|
||||||
if t.postgres {
|
if t.postgres {
|
||||||
notePath := path.Join(savePath, t.hostname+".db-note")
|
return nil
|
||||||
note := "This test used PostgreSQL - no SQLite database file available.\nDatabase data is stored in the postgres container."
|
|
||||||
return os.WriteFile(notePath, []byte(note), 0644)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tarFile, err := t.FetchPath("/tmp/integration_test_db.sqlite3")
|
tarFile, err := t.FetchPath("/tmp/integration_test_db.sqlite3")
|
||||||
|
Loading…
Reference in New Issue
Block a user