Serene-Arc / listenbrainz-playlist-uploader

A program to upload playlists to Listenbrainz and give feedback in bulk
MIT License
6 stars 1 forks source link

group tests that require network features #4

Open quantenzitrone opened 3 months ago

quantenzitrone commented 3 months ago

It'd be cool if all tests would be grouped behind a test feature flag "net" or something similar. I don't know a lot of rust yet, so maybe there is a better way. Build tools like nix don't have network in the build sandbox, but still want to run all possible tests. While I can easily disable all network tests manually like this:

checkFlags = [
    # below tests require network features
    "--skip=audio_data::test::test_get_artist_mbid_1"
    "--skip=audio_data::test::test_get_artist_mbid_2_non_english_with_alias"
    "--skip=audio_data::test::test_get_recording_mbid_artist_alias"
    "--skip=audio_data::test::test_get_recording_mbid_artist_partial_name"
    "--skip=audio_data::test::test_get_recording_mbid_band_name_with_character"
    "--skip=audio_data::test::test_get_recording_mbid_general_1"
    "--skip=audio_data::test::test_get_recording_mbid_two_artist_feat_join"
    "--skip=audio_data::test::test_get_recording_mbid_two_artists_and_join"
    "--skip=feedback::test::test_get_existing_feedback"
];

This is kinda tedious and every package update I'd have to look into if there are new tests that require network.

Serene-Arc commented 3 months ago

Thanks! I'll look into doing this, it's a good idea.