func testAccStepLoginDenied(t *testing.T, username string) logicaltest.TestStep { return logicaltest.TestStep{ Operation: logical.UpdateOperation, Path: "login", Data: map[string]interface{}{ "method": "deny", "username": username, }, Unauthenticated: true, Check: logicaltest.TestCheckError(), } }
func testAccLoginDeleted(t *testing.T) logicaltest.TestStep { return logicaltest.TestStep{ Operation: logical.WriteOperation, Path: "login", Data: map[string]interface{}{ "app_id": "foo", "user_id": "42", }, ErrorOk: true, Unauthenticated: true, Check: logicaltest.TestCheckError(), } }
func testAccLoginCidr(t *testing.T, ip string, err bool) logicaltest.TestStep { check := logicaltest.TestCheckError() if !err { check = logicaltest.TestCheckAuth([]string{"bar", "foo"}) } return logicaltest.TestStep{ Operation: logical.WriteOperation, Path: "login", Data: map[string]interface{}{ "app_id": "foo", "user_id": "42", }, ErrorOk: err, Unauthenticated: true, RemoteAddr: ip, Check: check, } }