mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 21:45:26 +01:00
* Implement auditing support
* Document auditing
* Address review comments
* Change log level for errors reading audit config
* Disable auditors during tests
* Make changes to docs suggested by @jvehent
* Code review fixes to init() in audit.go
* Implement encrypt audit event
* Include filepath in Tree created from sops/encrypt/encrypt
* Fix changes in audit.go to stay with current style
* Implement RotateEvent within rotate command
* github.com/lib/pq vendor dependencies
* Always get current user in PostgresAuditor.Handle()
* Initial CR fixes + gofmt
* gofmt
* fixed placement of audit event in rotate()
* Moved to a single table for audit events.
* Revert "Moved to a single table for audit events."
This reverts commit 7e7817e8a1.
* Remove audit tables delete protection rules
* Move to a single audit_event table with action column
* Remove unnecessary tree declaration
27 lines
440 B
Go
27 lines
440 B
Go
package pq
|
|
|
|
import "testing"
|
|
|
|
func TestIssue494(t *testing.T) {
|
|
db := openTestConn(t)
|
|
defer db.Close()
|
|
|
|
query := `CREATE TEMP TABLE t (i INT PRIMARY KEY)`
|
|
if _, err := db.Exec(query); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
txn, err := db.Begin()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if _, err := txn.Prepare(CopyIn("t", "i")); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if _, err := txn.Query("SELECT 1"); err == nil {
|
|
t.Fatal("expected error")
|
|
}
|
|
}
|