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 spec tests for api_fetch function #149

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

marek130
Copy link
Contributor

@marek130 marek130 commented Mar 9, 2023

No description provided.

Copy link
Contributor

@anders-larsson anders-larsson left a comment

Choose a reason for hiding this comment

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

Looks like a good start. We probably want something related to timeouts and other issues as well to make sure we understand how that is handled.

Gemfile Show resolved Hide resolved
@@ -174,7 +182,15 @@
context "when #{var_name} (#{type}) is set to valid #{valid} (as #{valid.class})" do
let(:params) { [mandatory_params, var[:params], { "#{var_name}": valid, }].reduce(:merge) }

it { is_expected.to compile }
it do
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably want to have tests as well on what happens if we do not get a proper answer from function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this is applicable in a different spec file though. Maybe these tests already exists? Don't remember :P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, these use cases are included in spec/classes/init_spec.rb

@marek130
Copy link
Contributor Author

Looks like a good start. We probably want something related to timeouts and other issues as well to make sure we understand how that is handled.

Added new test use case which checks timeout

@anders-larsson
Copy link
Contributor

I'll merge these changes. Thanks.

@anders-larsson anders-larsson merged commit 1cc0214 into Ericsson:master Jul 13, 2023
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