Skip to content

1617 test setup 1618 sample env file#1635

Open
kaldun-tech wants to merge 11 commits intohiero-ledger:mainfrom
kaldun-tech:1617_TestSetup_1618_SampleEnvFile
Open

1617 test setup 1618 sample env file#1635
kaldun-tech wants to merge 11 commits intohiero-ledger:mainfrom
kaldun-tech:1617_TestSetup_1618_SampleEnvFile

Conversation

@kaldun-tech
Copy link
Copy Markdown
Contributor

@kaldun-tech kaldun-tech commented Mar 7, 2026

Description:

  • Add TESTING.md with instructions for running unit and e2e tests
  • Add env.sh.sample documenting required environment variables for tests/examples. Users copy the script to env.sh, update their variables and and source it
  • Update README.md to reference new documentation

Related issue(s):

Fixes #1617 #1618

Notes for reviewer:

Test plan

  • Verify env.sh.sample can be copied to env.sh, filled in, and sourced
  • Verify unit test command from TESTING.md works: go test ./sdk -tags="unit" -v -timeout 9999s
  • Verify links in README.md resolve correctly

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)
image

- Add TESTING.md with instructions for running unit and e2e tests
- Add .env.sample documenting required environment variables
- Update README.md to reference new documentation

Closes hiero-ledger#1617, closes hiero-ledger#1618

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
… to network choice

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
@kaldun-tech kaldun-tech requested review from a team as code owners March 7, 2026 01:06
@lfdt-bot
Copy link
Copy Markdown

lfdt-bot commented Mar 7, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kaldun-tech
Copy link
Copy Markdown
Contributor Author

@0xivanov I believe this should be sufficient for issues #1617 #1618

I see failures in the unit tests and golangci-lint run in my environment that should not be related to my documentation changes.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 177 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kaldun-tech
Copy link
Copy Markdown
Contributor Author

Would I want to update the CHANGELOG.md file here or is that only done when tagging a release?

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Mar 31, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Copy link
Copy Markdown
Contributor

@Dosik13 Dosik13 left a comment

Choose a reason for hiding this comment

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

good work, left some comments.
Also, very sorry for the delay 😊

No, you don't need to update the changelog.

- Remove erroneous diff metadata line from TESTING.md
- Update .env.sample to mention all supported private key formats
  (hex, DER-encoded, PEM-prefixed)

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
Rename .env.sample to setup-env.sh.sample with export statements
so users can source the file directly before running tests.

- Add export statements to all environment variables
- Update README.md and TESTING.md to reference new file
- Add .env.sh and env.sh to .gitignore
- Add note about HEDERA_NETWORK taking precedence over CONFIG_FILE

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
…ILE precedence

- Rename setup-env.sh.sample to env.sh.sample for simplicity (env.sh already in .gitignore)
- Clarify that CONFIG_FILE is only used when OPERATOR_ID, OPERATOR_KEY, and
  HEDERA_NETWORK are all unset
- Update references in README.md and TESTING.md

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
.env is the standard convention for environment variable files and will
be compatible with godotenv in the future. Updated all documentation
references and cleaned up .gitignore.

Signed-off-by: kaldun-tech <tsmereka@protonmail.com>
@Dosik13 Dosik13 mentioned this pull request Apr 8, 2026
2 tasks
Copy link
Copy Markdown
Contributor

@Dosik13 Dosik13 left a comment

Choose a reason for hiding this comment

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

left final comments - you an also think of a way to make the user understand that once he did the source .env the values are exported to the terminal and dont have to do it every time (you can also leave it, i don't think it is a big problem). And I think we will be ready to merge it

kaldun-tech and others added 3 commits April 9, 2026 22:50
Remove trailing newline

Co-authored-by: Dosi Kolev <104355829+Dosik13@users.noreply.github.com>
Signed-off-by: Taras <tsmereka@protonmail.com>
Clarified language of copying .env.sample to .env

Co-authored-by: Dosi Kolev <104355829+Dosik13@users.noreply.github.com>
Signed-off-by: Taras <tsmereka@protonmail.com>
Added HEDERA_NETWORK variable export recommendation

Co-authored-by: Dosi Kolev <104355829+Dosik13@users.noreply.github.com>
Signed-off-by: Taras <tsmereka@protonmail.com>
@kaldun-tech
Copy link
Copy Markdown
Contributor Author

Yes I agree those are good changes. Considered how to communicate that they don't have to source .env every time in the terminal. It shouldn't come up unless they are making changes to the file.

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.

Issue candidate: create .env.sample

4 participants