Skip to content

minor: Add Leviathan Test Helpers - #976

Merged
vipulgupta2048 merged 1 commit into
masterfrom
vipul/add-helpers-packaged
Apr 3, 2023
Merged

minor: Add Leviathan Test Helpers#976
vipulgupta2048 merged 1 commit into
masterfrom
vipul/add-helpers-packaged

Conversation

@vipulgupta2048

@vipulgupta2048 vipulgupta2048 commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

To reduce Core's dependencies and in the end, simplify Leviathan architecture. We are taking the first steps to use the leviathan test helpers package in the e2e test suite. This will aid in removing Core's helpers #977 and helps provide a testbed to stabilize changes made in the test-helpers package.

Signed-off-by: Vipul Gupta (@vipulgupta2048) vipulgupta2048@gmail.com

Comment thread suites/e2e/tests/always-fail/index.js
Comment thread suites/e2e/suite.js
sshKeyPath: join(homedir(), 'id'),
sshKeyLabel: this.suite.options.id,
sdk: new Balena(this.suite.options.balena.apiUrl, this.getLogger()),
sdk: new Sdk(this.suite.options?.balena?.apiUrl, this.getLogger()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know that this is called sdk in the helpers package - bit isn't it a little bit more than just the SDK? We have some CLI uses in there, and some extra functions that are a composite of various sdk calls + CLI uses

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is but I felt it was more confusing to import a component called Balena which is a file called sdk.js and initialize it as SDK.

Why confuse when we can straight away be called it SDK?
Coming over to what's inside of it, I think that should be broken down further in the helper's package to improve our consistency. The SDK helper should only have SDK methods. What do you think?

(This is the time and place we can semantically improve our nomenclature as well as structures) Happy to get more input on helpers package before merging this so we can get the best changes in there.

@rcooke-warwick

Copy link
Copy Markdown
Contributor

this all looks good to me -

As far as I can see, there is no way for this to break anything other than leviathan e2e tests - which it won't as we can see those tests passing here. This is because you have not removed anything, in meta balena until the helpers are verified and that PR merges (balena-os/meta-balena#3091) they will continue to use the "baked-in" functions

Maybe we can add a quic note to the PR description as to why we are making this change also

@vipulgupta2048

Copy link
Copy Markdown
Contributor Author

Added the quick note and I completely agree with the nonbreaking changes with this PR. PR #826 was similar in this regard.

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
@rcooke-warwick
rcooke-warwick force-pushed the vipul/add-helpers-packaged branch from f95cb0f to f3f2752 Compare March 31, 2023 14:17
@vipulgupta2048
vipulgupta2048 enabled auto-merge April 3, 2023 06:43
@vipulgupta2048

Copy link
Copy Markdown
Contributor Author

@balena-ci I self-certify!

@vipulgupta2048
vipulgupta2048 merged commit d490df2 into master Apr 3, 2023
@vipulgupta2048
vipulgupta2048 deleted the vipul/add-helpers-packaged branch April 3, 2023 06:43
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