Skip to content

Commit

Permalink
e2e tests for ssh key and service account
Browse files Browse the repository at this point in the history
  • Loading branch information
beevital committed Nov 17, 2023
1 parent 08653bf commit 6c2fd72
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/e2e/group_service_account_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package fivetran_test

import (
"context"
"fmt"
"testing"

testutils "github.com/fivetran/go-fivetran/test_utils"
)

func TestNewGroupServiceAccountE2E(t *testing.T) {
result, err := testutils.Client.NewGroupServiceAccount().GroupID(testutils.PredefinedGroupId).Do(context.Background())
if err != nil {
t.Logf("%+v\n", result)
t.Error(err)
}

testutils.AssertEqual(t, result.Code, "Success")
testutils.AssertEqual(t, result.Data.ServiceAccount, fmt.Sprintf("g-%[email protected]", testutils.PredefinedGroupId))
}
20 changes: 20 additions & 0 deletions tests/e2e/group_ssh_key_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package fivetran_test

import (
"context"
"testing"

testutils "github.com/fivetran/go-fivetran/test_utils"
)

func TestNewGroupSshPublicKeyE2E(t *testing.T) {
result, err := testutils.Client.NewGroupSshPublicKey().GroupID(testutils.PredefinedGroupId).Do(context.Background())
if err != nil {
t.Logf("%+v\n", result)
t.Error(err)
}

testutils.AssertEqual(t, result.Code, "Success")
testutils.AssertNotEmpty(t, result.Data.PublicKey)

}

0 comments on commit 6c2fd72

Please sign in to comment.