mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
@@ -3,6 +3,7 @@ package github
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -108,7 +109,11 @@ func TestBackend_basic(t *testing.T) {
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Backend: b,
|
||||
Steps: []logicaltest.TestStep{
|
||||
testAccStepConfig(t),
|
||||
testAccStepConfig(t, false),
|
||||
testAccMap(t, "default", "root"),
|
||||
testAccMap(t, "oWnErs", "root"),
|
||||
testAccLogin(t, []string{"root"}),
|
||||
testAccStepConfig(t, true),
|
||||
testAccMap(t, "default", "root"),
|
||||
testAccMap(t, "oWnErs", "root"),
|
||||
testAccLogin(t, []string{"root"}),
|
||||
@@ -134,14 +139,18 @@ func testAccPreCheck(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testAccStepConfig(t *testing.T) logicaltest.TestStep {
|
||||
return logicaltest.TestStep{
|
||||
func testAccStepConfig(t *testing.T, upper bool) logicaltest.TestStep {
|
||||
ts := logicaltest.TestStep{
|
||||
Operation: logical.UpdateOperation,
|
||||
Path: "config",
|
||||
Data: map[string]interface{}{
|
||||
"organization": os.Getenv("GITHUB_ORG"),
|
||||
},
|
||||
}
|
||||
if upper {
|
||||
ts.Data["organization"] = strings.ToUpper(os.Getenv("GITHUB_ORG"))
|
||||
}
|
||||
return ts
|
||||
}
|
||||
|
||||
func testAccStepConfigWithBaseURL(t *testing.T) logicaltest.TestStep {
|
||||
|
||||
Reference in New Issue
Block a user