Skip to content

Commit

Permalink
fix(): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Dec 4, 2024
1 parent 8732617 commit 55a458b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/provider/resource_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccBinding(t *testing.T) {
"kestra_binding.new", "type", "GROUP",
),
resource.TestCheckResourceAttr(
"kestra_binding.new", "external_id", "admin",
"kestra_binding.new", "external_id", "admin_default",
),
resource.TestCheckResourceAttr(
"kestra_binding.new", "role_id", "admin",
Expand All @@ -30,7 +30,7 @@ func TestAccBinding(t *testing.T) {
),
},
{
Config: testAccResourceBinding("USER", "john", "admin2", "", "new"),
Config: testAccResourceBinding("USER", "john", "launcher_default", "", "new"),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(
"kestra_binding.new", "type", "USER",
Expand Down
8 changes: 3 additions & 5 deletions internal/provider/resource_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ func TestAccUser(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccResourceUser(
"admin",
"[email protected]",
"[kestra_group.group1.id]",
),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(
"kestra_user.new", "username", "admin",
"kestra_user.new", "username", "admin@john.doe",
),
resource.TestCheckResourceAttr(
"kestra_user.new", "email", "[email protected]",
Expand All @@ -33,7 +32,6 @@ func TestAccUser(t *testing.T) {
},
{
Config: testAccResourceUser(
"admin-2",
"[email protected]",
"[]",
),
Expand All @@ -58,7 +56,7 @@ func TestAccUser(t *testing.T) {
})
}

func testAccResourceUser(name, email, groups string) string {
func testAccResourceUser(email, groups string) string {
return fmt.Sprintf(
`
resource "kestra_role" "new" {
Expand All @@ -82,7 +80,7 @@ func testAccResourceUser(name, email, groups string) string {
email = "%s"
groups = %s
}`,
name,
email,
email,
groups,
)
Expand Down

0 comments on commit 55a458b

Please sign in to comment.