Skip to content

Commit

Permalink
Merge branch 'master' into hotreloading-workflowbackends-exit1
Browse files Browse the repository at this point in the history
  • Loading branch information
dapr-bot committed Jan 24, 2024
2 parents d226c50 + cc9d51e commit 4450de0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/e2e/hotreloading/hotreloading_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ func TestState(t *testing.T) {
}, &client.CreateOptions{}))

assert.EventuallyWithT(t, func(c *assert.CollectT) {
url := fmt.Sprintf("http://%s/test/http/save/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/save/hotreloading-state", externalURL)
_, status, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo","value":{"data":"LXcgYmFyCg=="}}]}`))
assert.NoError(c, err)
assert.Equal(c, http.StatusNoContent, status)
}, 30*time.Second, 500*time.Millisecond)

url := fmt.Sprintf("http://%s/test/http/get/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/get/hotreloading-state", externalURL)
resp, code, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo"}]}`))
assert.NoError(t, err)
assert.Equal(t, http.StatusOK, code)
Expand All @@ -135,7 +135,7 @@ func TestState(t *testing.T) {
require.NoError(t, cl.Update(ctx, &comp))

assert.EventuallyWithT(t, func(c *assert.CollectT) {
url := fmt.Sprintf("http://%s/test/http/save/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/save/hotreloading-state", externalURL)
_, code, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo","value":{"data":"xyz"}}]}`))
assert.NoError(c, err)
assert.Equal(c, http.StatusBadRequest, code)
Expand All @@ -156,13 +156,13 @@ func TestState(t *testing.T) {
require.NoError(t, cl.Update(ctx, &comp))

assert.EventuallyWithT(t, func(c *assert.CollectT) {
url := fmt.Sprintf("http://%s/test/http/save/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/save/hotreloading-state", externalURL)
_, status, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo","value":{"data":"LXcgeHl6Cg=="}}]}`))
assert.NoError(c, err)
assert.Equal(c, http.StatusNoContent, status)
}, 30*time.Second, 500*time.Millisecond)

url := fmt.Sprintf("http://%s/test/http/get/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/get/hotreloading-state", externalURL)
resp, code, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo"}]}`))
assert.NoError(t, err)
assert.Equal(t, http.StatusOK, code)
Expand All @@ -178,7 +178,7 @@ func TestState(t *testing.T) {
}, &client.DeleteOptions{})

assert.EventuallyWithT(t, func(c *assert.CollectT) {
url := fmt.Sprintf("http://%s/test/http/save/hotreloading-state", externalURL)
url := fmt.Sprintf("%s/test/http/save/hotreloading-state", externalURL)
_, code, err := utils.HTTPPostWithStatus(url, []byte(`{"states":[{"key":"foo","value":{"data":"LXcgYmFyCg=="}}]}`))
assert.NoError(c, err)
assert.Equal(c, http.StatusInternalServerError, code)
Expand Down

0 comments on commit 4450de0

Please sign in to comment.