Skip to content

Commit

Permalink
add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Jul 15, 2024
1 parent 22b3f74 commit 639452e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ install:
@go install .

unit:
@go test -v ./...
@go test -v ./aws ./util ./vault

accept:
@go test -v .
16 changes: 16 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import (
"os"

"github.com/mschuchard/vault-raft-backup/util"
)

func ExampleMain() {
// test that main behaves as expected before snapshot as raft not supported with vault server
os.Setenv("VAULT_TOKEN", util.VaultToken)
os.Setenv("S3_BUCKET", "bucket")

main()
// Output: foo
}

0 comments on commit 639452e

Please sign in to comment.