Skip to content

Commit

Permalink
create token
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-taf committed Dec 13, 2024
1 parent 22ad21e commit 02294c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comp/process/apiserver/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestLifecycle(t *testing.T) {
// With authentication
req, err := http.NewRequest("GET", "http://localhost:6162/config", nil)
require.NoError(c, err)
util.SetAuthToken(pkgconfigsetup.Datadog())
util.CreateAndSetAuthToken(pkgconfigsetup.Datadog())
req.Header.Set("Authorization", "Bearer "+util.GetAuthToken())
res, err := util.GetClient(false).Do(req)
require.NoError(c, err)
Expand Down Expand Up @@ -84,7 +84,7 @@ func TestAuthentication(t *testing.T) {
assert.Equal(c, http.StatusUnauthorized, res.StatusCode)

// With authentication
util.SetAuthToken(pkgconfigsetup.Datadog())
util.CreateAndSetAuthToken(pkgconfigsetup.Datadog())
req.Header.Set("Authorization", "Bearer "+util.GetAuthToken())
res, err = util.GetClient(false).Do(req)
require.NoError(c, err)
Expand Down

0 comments on commit 02294c3

Please sign in to comment.