Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add actions test wish-tools #88

Merged
merged 3 commits into from
Mar 9, 2024
Merged

add actions test wish-tools #88

merged 3 commits into from
Mar 9, 2024

Conversation

a-wing
Copy link
Member

@a-wing a-wing commented Feb 23, 2024

#74

The WHIP interface have some error

@a-wing
Copy link
Member Author

a-wing commented Feb 23, 2024

[2024-02-23T19:26:02Z INFO  live777::forward::forward_internal] [777] [publish] set 4bbf47044c25e106b2be641272a9baeb
[2024-02-23T19:26:02Z INFO  live777::path::manager] add path : 777
FAIL src/whip.test.ts
  WHIP
    ✓ endpoint returns HTTP 405 for any "GET" (15 ms)
    ✓ endpoint returns HTTP 405 for any "HEAD" (2 ms)
    ✓ endpoint returns HTTP 405 for any "PUT" (2 ms)
    ✓ endpoint will return an application/sdp on "POST" (60 ms)
    ✕ endpoint can signal that it accepts application/sdp (7 ms)
    ✓ SDP answer uses the recvonly attribute (8 ms)
    ✕ resource returns HTTP 405 for any "GET" (7 ms)
    ✕ resource returns HTTP 405 for any "HEAD" (33 ms)
    ✕ resource returns HTTP 405 for any "POST" (7 ms)
    ✕ resource returns HTTP 405 for any "PUT" (24 ms)
    ✓ resource can be deleted (12 ms)
    ✓ resource can handle trickle ICE attempt (8 ms)
    ✓ resource can handle ICE restart attempt (20 ms)

  ● WHIP › endpoint can signal that it accepts application/sdp

    expect(received).toEqual(expected) // deep equality

    Expected: 200
    Received: 405

      55 |
      56 |     const response = await fetch(endpoint, { method: 'OPTIONS' });
    > 57 |     expect(response.status).toEqual(200);
         |                             ^
      58 |     expect(response.headers.get('Accept-Post')).toEqual('application/sdp');
      59 |
      60 |     stream.end();

      at src/whip.test.ts:57:29
      at fulfilled (src/whip.test.ts:5:58)

  ● WHIP › resource returns HTTP 405 for any "GET"

    expect(received).toEqual(expected) // deep equality

    Expected: 201
    Received: 500

      11 |
      12 |   let response = await httpreq(endpoint, 'POST', sdp);
    > 13 |   expect(response.status).toEqual(201);
         |                           ^
      14 |   const location = response.headers.get('Location');
      15 |
      16 |   response = await httpreq(location, method);

      at src/whip.test.ts:13:27
      at fulfilled (src/whip.test.ts:5:58)

  ● WHIP › resource returns HTTP 405 for any "HEAD"

    expect(received).toEqual(expected) // deep equality

    Expected: 201
    Received: 500

      11 |
      12 |   let response = await httpreq(endpoint, 'POST', sdp);
    > 13 |   expect(response.status).toEqual(201);
         |                           ^
      14 |   const location = response.headers.get('Location');
      15 |
      16 |   response = await httpreq(location, method);

      at src/whip.test.ts:13:27
      at fulfilled (src/whip.test.ts:5:58)

  ● WHIP › resource returns HTTP 405 for any "POST"

    expect(received).toEqual(expected) // deep equality

    Expected: 201
    Received: 500

      11 |
      12 |   let response = await httpreq(endpoint, 'POST', sdp);
    > 13 |   expect(response.status).toEqual(201);
         |                           ^
      14 |   const location = response.headers.get('Location');
      15 |
      16 |   response = await httpreq(location, method);

      at src/whip.test.ts:13:27
      at fulfilled (src/whip.test.ts:5:58)

  ● WHIP › resource returns HTTP 405 for any "PUT"

    expect(received).toEqual(expected) // deep equality

    Expected: 201
    Received: 500

      11 |
      12 |   let response = await httpreq(endpoint, 'POST', sdp);
    > 13 |   expect(response.status).toEqual(201);
         |                           ^
      14 |   const location = response.headers.get('Location');
      15 |
      16 |   response = await httpreq(location, method);

      at src/whip.test.ts:13:27
      at fulfilled (src/whip.test.ts:5:58)

Test Suites: 1 failed, 1 total
Tests:       5 failed, 8 passed, 13 total
Snapshots:   0 total
Time:        1.975 s
Ran all test suites.
Jest did not exit one second after the test run has completed.

@a-wing a-wing mentioned this pull request Feb 28, 2024
5 tasks
@a-wing a-wing merged commit c0f2896 into main Mar 9, 2024
5 checks passed
@a-wing a-wing deleted the test-whip branch March 10, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant