Skip to content

Commit

Permalink
Fix caller content url tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anbsky committed Oct 11, 2023
1 parent 6e96268 commit b50c028
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions app/query/caller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,6 @@ func TestCaller_Status(t *testing.T) {
}

func TestCaller_GetFreeUnauthenticated(t *testing.T) {
config.Override("FreeContentURL", "https://player.odycdn.com/api/v4/streams/free/")
defer config.RestoreOverridden()

srvAddress := test.RandServerAddress(t)
uri := "what#19b9c243bea0c45175e6a6027911abbad53e983e"

Expand All @@ -707,13 +704,10 @@ func TestCaller_GetFreeUnauthenticated(t *testing.T) {
getResponse := &ljsonrpc.GetResponse{}
err = resp.GetObject(&getResponse)
require.NoError(t, err)
assert.Equal(t, "https://player.odycdn.com/api/v4/streams/free/what/19b9c243bea0c45175e6a6027911abbad53e983e/d51692", getResponse.StreamingURL)
assert.Equal(t, "https://player.odycdn.com/v6/streams/19b9c243bea0c45175e6a6027911abbad53e983e/d51692.mp4", getResponse.StreamingURL)
}

func TestCaller_GetFreeAuthenticated(t *testing.T) {
config.Override("FreeContentURL", "https://player.odycdn.com/api/v4/streams/free/")
defer config.RestoreOverridden()

uri := "what"

dummyUserID := 123321
Expand All @@ -730,7 +724,7 @@ func TestCaller_GetFreeAuthenticated(t *testing.T) {
getResponse := &ljsonrpc.GetResponse{}
err = resp.GetObject(&getResponse)
require.NoError(t, err)
assert.Equal(t, "https://player.odycdn.com/api/v4/streams/free/what/19b9c243bea0c45175e6a6027911abbad53e983e/d51692", getResponse.StreamingURL)
assert.Equal(t, "https://player.odycdn.com/v6/streams/19b9c243bea0c45175e6a6027911abbad53e983e/d51692.mp4", getResponse.StreamingURL)
}

func TestCaller_GetCouldntFindClaim(t *testing.T) {
Expand All @@ -749,9 +743,6 @@ func TestCaller_GetCouldntFindClaim(t *testing.T) {
}

func TestCaller_GetInvalidURLAuthenticated(t *testing.T) {
config.Override("FreeContentURL", "https://player.odycdn.com/api")
defer config.RestoreOverridden()

uri := "what#@1||||"

dummyUserID := 123321
Expand Down

0 comments on commit b50c028

Please sign in to comment.