Skip to content

Commit

Permalink
Remove new references to framework/util
Browse files Browse the repository at this point in the history
Signed-off-by: joshvanl <[email protected]>
  • Loading branch information
JoshVanL committed May 23, 2024
1 parent 43910c7 commit 0c4ef08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"github.com/dapr/dapr/tests/integration/framework"
"github.com/dapr/dapr/tests/integration/framework/process/daprd"
"github.com/dapr/dapr/tests/integration/framework/util"
"github.com/dapr/dapr/tests/integration/suite"
)

Expand Down Expand Up @@ -64,8 +63,6 @@ spec:
func (c *components) Run(t *testing.T, ctx context.Context) {
c.daprd.WaitUntilRunning(t, ctx)

client := util.HTTPClient(t)

file := filepath.Join(c.resDir, "res.yaml")
require.NoError(t, os.WriteFile(file, []byte(`
apiVersion: dapr.io/v1alpha1
Expand All @@ -78,7 +75,7 @@ spec:
`), 0o600))

require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Len(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()), 1)
assert.Len(t, c.daprd.GetMetaRegisteredComponents(t, ctx), 1)
}, time.Second*10, time.Millisecond*10)

require.NoError(t, os.WriteFile(file, []byte(`
Expand All @@ -93,7 +90,7 @@ scopes:
- foo
`), 0o600))
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Empty(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()))
assert.Empty(t, c.daprd.GetMetaRegisteredComponents(t, ctx))
}, time.Second*10, time.Millisecond*10)

require.NoError(t, os.WriteFile(file, []byte(`
Expand All @@ -109,7 +106,7 @@ scopes:
- myappid
`), 0o600))
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Len(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()), 1)
assert.Len(t, c.daprd.GetMetaRegisteredComponents(t, ctx), 1)
}, time.Second*10, time.Millisecond*10)

require.NoError(t, os.WriteFile(file, []byte(`
Expand All @@ -124,7 +121,7 @@ scopes:
- foo
`), 0o600))
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Empty(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()))
assert.Empty(t, c.daprd.GetMetaRegisteredComponents(t, ctx))
}, time.Second*10, time.Millisecond*10)

require.NoError(t, os.WriteFile(file, []byte(`
Expand All @@ -137,7 +134,7 @@ spec:
version: v1
`), 0o600))
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Len(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()), 1)
assert.Len(t, c.daprd.GetMetaRegisteredComponents(t, ctx), 1)
}, time.Second*10, time.Millisecond*10)

require.NoError(t, os.WriteFile(file, []byte(`
Expand All @@ -160,6 +157,6 @@ scopes:
- myappid
`), 0o600))
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.Len(t, util.GetMetaComponents(t, ctx, client, c.daprd.HTTPPort()), 2)
assert.Len(t, c.daprd.GetMetaRegisteredComponents(t, ctx), 2)
}, time.Second*10, time.Millisecond*10)
}
4 changes: 2 additions & 2 deletions tests/integration/suite/daprd/outbox/http/projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"github.com/dapr/components-contrib/state"
"github.com/dapr/dapr/tests/integration/framework"
"github.com/dapr/dapr/tests/integration/framework/client"
procdaprd "github.com/dapr/dapr/tests/integration/framework/process/daprd"
prochttp "github.com/dapr/dapr/tests/integration/framework/process/http"
"github.com/dapr/dapr/tests/integration/framework/util"
"github.com/dapr/dapr/tests/integration/suite"
)

Expand Down Expand Up @@ -146,7 +146,7 @@ func (o *projection) Run(t *testing.T, ctx context.Context) {
b, err := json.Marshal(&tr)
require.NoError(t, err)

httpClient := util.HTTPClient(t)
httpClient := client.HTTP(t)

req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, bytes.NewReader(b))
require.NoError(t, err)
Expand Down

0 comments on commit 0c4ef08

Please sign in to comment.