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 additional mocks needed for tests in new versions of @actions #343

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

swenson
Copy link
Contributor

@swenson swenson commented Jun 28, 2022

Tests started failing after actions was bumped in
#334

@swenson swenson requested a review from tvoran June 28, 2022 21:11
@swenson
Copy link
Contributor Author

swenson commented Jun 28, 2022

Test run:

$ npm run test                                                                                              (git)-[fix-tests-mocks]-

> vault-action@0.1.0 test
> jest

 PASS  src/action.test.js
 PASS  src/auth.test.js

Test Suites: 2 passed, 2 total
Tests:       25 passed, 25 total
Snapshots:   0 total
Time:        0.373 s, estimated 1 s
Ran all test suites.
[swenson@hashicorp 14:11:41] vault-action :) $ npm run test:integration:basic                                                                            (git)-[fix-tests-mocks]-

> vault-action@0.1.0 test:integration:basic
> jest -c integrationTests/basic/jest.config.js

 PASS  integrationTests/basic/integration.test.js
  integration
    ✓ prints a nice error message when secret not found (18 ms)
    ✓ get simple secret (5 ms)
    ✓ re-map secret (5 ms)
    ✓ get nested secret (4 ms)
    ✓ get multiple secrets (6 ms)
    ✓ leading slash kvv2 (3 ms)
    ✓ get secret from K/V v1 (3 ms)
    ✓ get nested secret from K/V v1 (3 ms)
    ✓ leading slash kvv1 (4 ms)
    generic engines
      ✓ supports cubbyhole (4 ms)
      ✓ caches responses (4 ms)

 PASS  integrationTests/basic/jwt_auth.test.js
  jwt auth
    authenticate with private key
      ✓ successfully authenticates (935 ms)
    authenticate with Github OIDC
      ✓ successfully authenticates (6 ms)
      ✓ successfully authenticates with `jwtGithubAudience` set to `sigstore` (917 ms)
      ✓ successfully authenticates as default role without specifying it (5 ms)

Test Suites: 2 passed, 2 total
Tests:       15 passed, 15 total
Snapshots:   0 total
Time:        3.484 s, estimated 4 s
Ran all test suites.

@swenson
Copy link
Contributor Author

swenson commented Jun 28, 2022

Thanks!

@swenson swenson merged commit 2dcbd17 into main Jun 28, 2022
@swenson swenson deleted the fix-tests-mocks branch June 28, 2022 21:35
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.

2 participants