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

Group creation #248

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Group creation #248

wants to merge 11 commits into from

Conversation

matushorvath
Copy link
Owner

No description provided.

@matushorvath matushorvath marked this pull request as draft March 12, 2023 02:52
@matushorvath matushorvath force-pushed the create-groups branch 10 times, most recently from 134c812 to 76e2288 Compare April 10, 2023 12:38
@github-actions
Copy link

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/opt/hostedtoolcache/node/16.20.0/x64/bin/npx' failed with exit code 1
St.
Category Percentage Covered / Total
🟢 Statements
87.99% (-12.01% 🔻)
769/874
🟢 Branches
86.85% (-13.15% 🔻)
284/327
🟢 Functions
81.89% (-18.11% 🔻)
104/127
🟢 Lines
87.84% (-12.16% 🔻)
751/855
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴 chat.js 27.78% 0% 0% 27.78%
🔴 client.js 10.87% 0% 0% 10.99%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 telegram.js
98.03% (-1.97% 🔻)
99.09%
93.75% (-6.25% 🔻)
98.03% (-1.97% 🔻)
🟢 secrets.js
83.33% (-16.67% 🔻)
75% (-25% 🔻)
70% (-30% 🔻)
82.35% (-17.65% 🔻)

Test suite run failed

Failed tests: 6/183. Failed suites: 1/11.
  ● getAdventOfCodeSecret › gets secrets first time

    expect(received).resolves.toEqual()

    Received promise rejected instead of resolved
    Rejected to value: [TypeError: Cannot read properties of undefined (reading 'Value')]

      33 |         ssm.SSMClient.prototype.send.mockResolvedValueOnce(data);
      34 |
    > 35 |         await expect(getSecretFunction()).resolves.toEqual(result);
         |               ^
      36 |
      37 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
      38 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.expect (unit-tests/secrets.test.js:35:15)

  ● getAdventOfCodeSecret › fails with missing SSM

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

      Object {
        "Names": Array [
          "/aoc-bot/advent-of-code-secret",
    +     "/aoc-bot/tdlib-api-id",
    +     "/aoc-bot/tdlib-api-hash",
    +     "/aoc-bot/tdlib-aes-key",
          "/aoc-bot/telegram-secret",
        ],
        "WithDecryption": true,
      },

    Number of calls: 1

      68 |         await expect(getSecretFunction()).rejects.toThrow(/getSecrets/);
      69 |
    > 70 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
         |                                          ^
      71 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],
      72 |             WithDecryption: true
      73 |         });

      at Object.toHaveBeenCalledWith (unit-tests/secrets.test.js:70:42)

  ● getAdventOfCodeSecret › fails with AWS error

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

      Object {
        "Names": Array [
          "/aoc-bot/advent-of-code-secret",
    +     "/aoc-bot/tdlib-api-id",
    +     "/aoc-bot/tdlib-api-hash",
    +     "/aoc-bot/tdlib-aes-key",
          "/aoc-bot/telegram-secret",
        ],
        "WithDecryption": true,
      },

    Number of calls: 1

      83 |         await expect(getSecretFunction()).rejects.toThrow('sSmErRoR');
      84 |
    > 85 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
         |                                          ^
      86 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],
      87 |             WithDecryption: true
      88 |         });

      at Object.toHaveBeenCalledWith (unit-tests/secrets.test.js:85:42)

  ● getTelegramSecret › gets secrets first time

    expect(received).resolves.toEqual()

    Received promise rejected instead of resolved
    Rejected to value: [TypeError: Cannot read properties of undefined (reading 'Value')]

      33 |         ssm.SSMClient.prototype.send.mockResolvedValueOnce(data);
      34 |
    > 35 |         await expect(getSecretFunction()).resolves.toEqual(result);
         |               ^
      36 |
      37 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
      38 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.expect (unit-tests/secrets.test.js:35:15)

  ● getTelegramSecret › fails with missing SSM

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

      Object {
        "Names": Array [
          "/aoc-bot/advent-of-code-secret",
    +     "/aoc-bot/tdlib-api-id",
    +     "/aoc-bot/tdlib-api-hash",
    +     "/aoc-bot/tdlib-aes-key",
          "/aoc-bot/telegram-secret",
        ],
        "WithDecryption": true,
      },

    Number of calls: 1

      68 |         await expect(getSecretFunction()).rejects.toThrow(/getSecrets/);
      69 |
    > 70 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
         |                                          ^
      71 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],
      72 |             WithDecryption: true
      73 |         });

      at Object.toHaveBeenCalledWith (unit-tests/secrets.test.js:70:42)

  ● getTelegramSecret › fails with AWS error

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

      Object {
        "Names": Array [
          "/aoc-bot/advent-of-code-secret",
    +     "/aoc-bot/tdlib-api-id",
    +     "/aoc-bot/tdlib-api-hash",
    +     "/aoc-bot/tdlib-aes-key",
          "/aoc-bot/telegram-secret",
        ],
        "WithDecryption": true,
      },

    Number of calls: 1

      83 |         await expect(getSecretFunction()).rejects.toThrow('sSmErRoR');
      84 |
    > 85 |         expect(ssm.GetParametersCommand).toHaveBeenCalledWith({
         |                                          ^
      86 |             Names: ['/aoc-bot/advent-of-code-secret', '/aoc-bot/telegram-secret'],
      87 |             WithDecryption: true
      88 |         });

      at Object.toHaveBeenCalledWith (unit-tests/secrets.test.js:85:42)

Report generated by 🧪jest coverage report action from 76e2288

@matushorvath matushorvath force-pushed the create-groups branch 15 times, most recently from ae39cb5 to 8e3e324 Compare April 10, 2023 16:31
@matushorvath matushorvath force-pushed the create-groups branch 2 times, most recently from eb7c3e4 to db47ec9 Compare May 13, 2023 14:55
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