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 test #4

Merged
merged 13 commits into from
Dec 4, 2024
Merged

Add test #4

merged 13 commits into from
Dec 4, 2024

Conversation

Sachindu-Nethmin
Copy link
Contributor

Create test.bal

Purpose

Add test cases to spotify connector

Examples

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

ballerina/tests/test.bal Outdated Show resolved Hide resolved
ballerina/tests/test.bal Outdated Show resolved Hide resolved
ballerina/tests/test.bal Show resolved Hide resolved
ballerina/tests/test.bal Outdated Show resolved Hide resolved
@aashikam
Copy link
Contributor

Hey @Sachindu-Nethmin,

Looks good! I will review this and verify by running locally.

add License and line spaces into test.bal
@aashikam
Copy link
Contributor

aashikam commented Nov 12, 2024

Hey some of the tests failed, any idea?
Screenshot 2024-11-12 at 14 47 42

Failed tests:
getAudiobooksTest
GetShowsTest
GetEpisodeTest
GetChaptersTest

ballerina/tests/test.bal Outdated Show resolved Hide resolved
use camel case in test function names
@Sachindu-Nethmin
Copy link
Contributor Author

  1. Albums
  2. Artist
    //3. AudioBooks {"audiobooks":[null,null,null]}
  3. Browse Categories
    //5. Chapters{"error": {"status": 404, "message": "Resource not found" } }
    //6. Episode
  4. Markets
  5. Playlist
    //9. Shows{"error": {"status": 404, "message": "Resource not found" } }

When I curl it, it also gives an error. I don't know what to do. Can you please help me?

ballerina/tests/README.md Outdated Show resolved Hide resolved
ballerina/tests/test.bal Outdated Show resolved Hide resolved
using the check expression to avoid the error checking scenarios
ballerina/tests/testcases.md Outdated Show resolved Hide resolved
ballerina/tests/test.bal Show resolved Hide resolved
@NipunaRanasinghe
Copy link
Contributor

@Sachindu-Nethmin added a few more suggestions

use loudness in browser artist test.
@aashikam
Copy link
Contributor

aashikam commented Dec 2, 2024

@Sachindu-Nethmin Were you able to fix the test failures?

@Sachindu-Nethmin
Copy link
Contributor Author

Sachindu-Nethmin commented Dec 3, 2024

@aashikam
I am trying hard to fix this, but when I attempt to get data from the API, it does not work. I have no idea what to do now. I need assistance, please.

curl --request GET
--url 'https://api.spotify.com/v1/audiobooks?ids=18yVqkdbdRvS24c0Ilj2ci%2C1HGw3J3NxZO1TP1BTtVhpZ%2C7iHfbu1YPACw6oZPAFJtqe'
--header 'Authorization: Bearer 1POdFZRZbvb...qqillRxMr2z'

response

{
"audiobooks": [
null,
null,
null
]
}

@aashikam
Copy link
Contributor

aashikam commented Dec 3, 2024

@Sachindu-Nethmin

  1. This response seems to be because there are no audiobooks available matching the ids given right?
  2. https://developer.spotify.com/documentation/web-api/reference/get-multiple-audiobooks According to this official documentation

Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

So I guess we can disable this test for now.

remove test cases that not support in region.
@Sachindu-Nethmin
Copy link
Contributor Author

@aashikam, thank you for your assistance. Could you please review it once more?

aashikam
aashikam previously approved these changes Dec 3, 2024
Copy link
Contributor

@aashikam aashikam left a comment

Choose a reason for hiding this comment

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

LGTM
Screenshot 2024-12-03 at 19 06 47

@NipunaRanasinghe Need your review.

remove the check expression
@Sachindu-Nethmin
Copy link
Contributor Author

@aashikam, I would greatly appreciate it if you could take another look at this. Thank you!

aashikam
aashikam previously approved these changes Dec 4, 2024
ballerina/tests/README.md Outdated Show resolved Hide resolved
ballerina/tests/README.md Outdated Show resolved Hide resolved
@aashikam aashikam dismissed their stale review December 4, 2024 04:11

Due to pending changes

@aashikam
Copy link
Contributor

aashikam commented Dec 4, 2024

Hey @Sachindu-Nethmin
Please address the pending comments and it is nice if we can squash the commits.

ballerina/tests/README.md Outdated Show resolved Hide resolved
ballerina/tests/README.md Outdated Show resolved Hide resolved
remove unrelated info about envs.
@aashikam aashikam merged commit 0d4c920 into ballerina-platform:main Dec 4, 2024
2 checks passed
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.

3 participants