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

fix: e2e tests #521

Merged
merged 3 commits into from
Dec 21, 2024
Merged

fix: e2e tests #521

merged 3 commits into from
Dec 21, 2024

Conversation

janb87
Copy link
Contributor

@janb87 janb87 commented Dec 20, 2024

  • --wait is needed for the codegen command to work (eg if the graphql api is not running the codegen cannot download the schema)
  • removed some redundant code

Summary by Sourcery

Tests:

  • Wait for platform resources to be deployed in end-to-end tests.

@janb87 janb87 requested a review from snigdha920 December 20, 2024 22:00
Copy link
Contributor

sourcery-ai bot commented Dec 20, 2024

Reviewer's Guide by Sourcery

This pull request fixes end-to-end tests by adding the --wait flag to the codegen command and removing redundant code.

Sequence diagram for the updated instance prompt flow

Loading
sequenceDiagram
    participant CLI
    participant Env
    participant User

    CLI->>Env: loadEnv()
    Env-->>CLI: env configuration

    Note over CLI: Removed redundant env check
    CLI->>User: instancePrompt()
    User-->>CLI: instance selection

    alt usePersonalAccessToken
        CLI->>CLI: getInstanceCredentials(instance)
        CLI-->>CLI: personalAccessToken
    else
        CLI->>Env: get SETTLEMINT_ACCESS_TOKEN
        Env-->>CLI: accessToken
    end

File-Level Changes

Change Details Files
Added the --wait flag to the codegen command
  • Added the --wait flag to ensure the GraphQL API is running before code generation attempts to download the schema
test/scripts/setup-platform-resources.ts
Removed redundant code and checks
  • Removed unnecessary checks for hasuraResult, minioResult, ipfsResult status
  • Removed redundant output capture in reset command
  • Simplified instance prompt logic
test/scripts/setup-platform-resources.ts
sdk/cli/src/commands/platform/common/create-command.ts
test/create-smart-contract-set.e2e.test.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the fix label Dec 20, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @janb87 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

github-actions bot commented Dec 20, 2024

📦 Packages

Package NPM Docker
SDK Cli @settlemint/sdk-cli@0.7.0-pr591f715
SDK The Graph @settlemint/sdk-thegraph@0.7.0-pr591f715
SDK Portal @settlemint/sdk-portal@0.7.0-pr591f715
SDK Hasura @settlemint/sdk-hasura@0.7.0-pr591f715
SDK JS @settlemint/sdk-js@0.7.0-pr591f715
SDK Utils @settlemint/sdk-utils@0.7.0-pr591f715
SDK Next @settlemint/sdk-next@0.7.0-pr591f715
SDK Minio @settlemint/sdk-minio@0.7.0-pr591f715
SDK IPFS @settlemint/sdk-ipfs@0.7.0-pr591f715
SDK Blockscout @settlemint/sdk-blockscout@0.7.0-pr591f715
Registry ghcr.io/settlemint/btp-sdk-registry:0.7.0-pr591f715

@snigdha920 snigdha920 merged commit 8f50f1e into main Dec 21, 2024
3 checks passed
@snigdha920 snigdha920 deleted the jan/fix-e2e-tests branch December 21, 2024 01:01
snigdha920 added a commit that referenced this pull request Dec 21, 2024
…t-else-use-the-pat-token-for

* main:
  chore: update package versions [skip ci]
  chore(deps): update oven/bun docker tag to v1.1.42 (#527)
  fix: e2e tests (#521)
  chore(deps): update dependency @inquirer/input to v4.1.1 (#523)
  chore(deps): update dependency react-hook-form to v7.54.2 (#526)
  chore(deps): update dependency @inquirer/select to v4.0.4 (#525)
  chore(deps): update dependency @inquirer/password to v4.0.4 (#524)
  chore(deps): update dependency @inquirer/confirm to v5.1.1 (#522)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants