Skip to content

Commit

Permalink
fix gitaction
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfujian committed Sep 8, 2023
1 parent b8d1472 commit 154631e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions internal/integration/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,31 @@ func TestTransaction(t *testing.T) {
require.Equal(t, "tag1-updated", tag1.Name.Val)
}

func TestSavePoint(t *testing.T) {
tx, _ := c.Tx()
var tagPoint = "sp_point"

tx.QueryTag().Create(tx.ChangeTag().SetName("tagPoint1"))

err := tx.SavePoint(tagPoint)
require.NoError(t, err)

tx.QueryTag().Create(tx.ChangeTag().SetName("tagPoint2"))
err = tx.RollbackTo(tagPoint)
require.NoError(t, err)

exists, err := tx.QueryTag().Where(tx.TagName.EQ("tagPoint1")).Exists()
require.NoError(t, err)
require.Equal(t, true, exists)
exists, err = tx.QueryTag().Where(tx.TagName.EQ("tagPoint2")).Exists()
require.NoError(t, err)
require.Equal(t, false, exists)

err = tx.ReleasePoint(tagPoint)
require.NoError(t, err)
tx.Commit()
}

func TestChangeJSON(t *testing.T) {
s := `{"name":"user name","isAdmin":false}`

Expand Down

0 comments on commit 154631e

Please sign in to comment.