@@ -652,6 +652,7 @@ module_stream_test_v2_yaml (void)
652652
653653 GPtrArray * dependencies = NULL ;
654654
655+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
655656 stream = modulemd_module_stream_read_string (
656657 "---\n"
657658 "document: modulemd\n"
@@ -794,6 +795,7 @@ module_stream_test_v2_yaml (void)
794795 NULL ,
795796 NULL ,
796797 & error );
798+ G_GNUC_END_IGNORE_DEPRECATIONS
797799
798800 g_assert_no_error (error );
799801
@@ -1007,6 +1009,7 @@ module_stream_test_v2_yaml (void)
10071009
10081010
10091011 // Validate a trivial modulemd
1012+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
10101013 stream = modulemd_module_stream_read_string (
10111014 "---\n"
10121015 "document: modulemd\n"
@@ -1022,6 +1025,7 @@ module_stream_test_v2_yaml (void)
10221025 NULL ,
10231026 NULL ,
10241027 & error );
1028+ G_GNUC_END_IGNORE_DEPRECATIONS
10251029
10261030 g_assert_no_error (error );
10271031 g_assert_nonnull (stream );
@@ -1032,8 +1036,10 @@ module_stream_test_v2_yaml (void)
10321036 // Sanity check spec.v2.yaml
10331037 gchar * specV2Path = g_strdup_printf ("%s/yaml_specs/modulemd_stream_v2.yaml" ,
10341038 g_getenv ("MESON_SOURCE_ROOT" ));
1039+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
10351040 stream =
10361041 modulemd_module_stream_read_file (specV2Path , TRUE, NULL , NULL , & error );
1042+ G_GNUC_END_IGNORE_DEPRECATIONS
10371043
10381044 g_assert_no_error (error );
10391045 g_assert_nonnull (stream );
@@ -1051,8 +1057,10 @@ module_packager_v2_sanity (void)
10511057
10521058 g_autofree gchar * specV2Path = g_strdup_printf (
10531059 "%s/yaml_specs/modulemd_packager_v2.yaml" , g_getenv ("MESON_SOURCE_ROOT" ));
1060+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
10541061 stream =
10551062 modulemd_module_stream_read_file (specV2Path , TRUE, NULL , NULL , & error );
1063+ G_GNUC_END_IGNORE_DEPRECATIONS
10561064 g_assert_no_error (error );
10571065 g_assert_nonnull (stream );
10581066
@@ -1061,6 +1069,29 @@ module_packager_v2_sanity (void)
10611069}
10621070
10631071
1072+ static void
1073+ module_packager_v3_sanity (void )
1074+ {
1075+ g_autoptr (ModulemdModuleStream ) stream = NULL ;
1076+ g_autoptr (GError ) error = NULL ;
1077+
1078+ g_autofree gchar * packagerV3Path = g_strdup_printf (
1079+ "%s/yaml_specs/modulemd_packager_v3.yaml" , g_getenv ("MESON_SOURCE_ROOT" ));
1080+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
1081+ stream = modulemd_module_stream_read_file (
1082+ packagerV3Path , TRUE, NULL , NULL , & error );
1083+ G_GNUC_END_IGNORE_DEPRECATIONS
1084+ g_assert_no_error (error );
1085+ g_assert_nonnull (stream );
1086+
1087+ /* confirm packager v3 document was returned as stream v2 */
1088+ g_assert_true (MODULEMD_IS_MODULE_STREAM_V2 (stream ));
1089+
1090+ g_clear_object (& stream );
1091+ g_clear_pointer (& packagerV3Path , g_free );
1092+ }
1093+
1094+
10641095static void
10651096module_stream_v1_test_rpm_artifacts (void )
10661097{
@@ -2753,8 +2784,10 @@ module_stream_v1_test_depends_on_stream (void)
27532784
27542785 path = g_strdup_printf ("%s/dependson_v1.yaml" , g_getenv ("TEST_DATA_PATH" ));
27552786 g_assert_nonnull (path );
2787+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
27562788 stream = modulemd_module_stream_read_file (
27572789 path , TRUE, module_name , module_stream , & error );
2790+ G_GNUC_END_IGNORE_DEPRECATIONS
27582791 g_assert_nonnull (stream );
27592792
27602793 g_assert_true (
@@ -2785,8 +2818,10 @@ module_stream_v2_test_depends_on_stream (void)
27852818
27862819 path = g_strdup_printf ("%s/dependson_v2.yaml" , g_getenv ("TEST_DATA_PATH" ));
27872820 g_assert_nonnull (path );
2821+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
27882822 stream = modulemd_module_stream_read_file (
27892823 path , TRUE, module_name , module_stream , & error );
2824+ G_GNUC_END_IGNORE_DEPRECATIONS
27902825 g_assert_nonnull (stream );
27912826
27922827 g_assert_true (
@@ -2826,8 +2861,10 @@ module_stream_test_validate_buildafter (void)
28262861 g_getenv ("TEST_DATA_PATH" ),
28272862 version );
28282863 g_assert_nonnull (path );
2864+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
28292865 stream =
28302866 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2867+ G_GNUC_END_IGNORE_DEPRECATIONS
28312868 g_assert_nonnull (stream );
28322869 g_assert_null (error );
28332870 g_clear_pointer (& path , g_free );
@@ -2841,8 +2878,10 @@ module_stream_test_validate_buildafter (void)
28412878 g_getenv ("TEST_DATA_PATH" ),
28422879 version );
28432880 g_assert_nonnull (path );
2881+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
28442882 stream =
28452883 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2884+ G_GNUC_END_IGNORE_DEPRECATIONS
28462885 g_assert_error (error , MODULEMD_ERROR , MMD_ERROR_VALIDATE );
28472886 g_assert_null (stream );
28482887 g_clear_error (& error );
@@ -2856,8 +2895,10 @@ module_stream_test_validate_buildafter (void)
28562895 g_getenv ("TEST_DATA_PATH" ),
28572896 version );
28582897 g_assert_nonnull (path );
2898+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
28592899 stream =
28602900 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2901+ G_GNUC_END_IGNORE_DEPRECATIONS
28612902 g_assert_error (error , MODULEMD_ERROR , MMD_ERROR_VALIDATE );
28622903 g_assert_null (stream );
28632904 g_clear_error (& error );
@@ -2870,8 +2911,10 @@ module_stream_test_validate_buildafter (void)
28702911 g_getenv ("TEST_DATA_PATH" ),
28712912 version );
28722913 g_assert_nonnull (path );
2914+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
28732915 stream =
28742916 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2917+ G_GNUC_END_IGNORE_DEPRECATIONS
28752918 g_assert_error (error , MODULEMD_ERROR , MMD_ERROR_VALIDATE );
28762919 g_assert_null (stream );
28772920 g_clear_error (& error );
@@ -2901,8 +2944,10 @@ module_stream_test_validate_buildarches (void)
29012944 g_getenv ("TEST_DATA_PATH" ),
29022945 version );
29032946 g_assert_nonnull (path );
2947+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
29042948 stream =
29052949 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2950+ G_GNUC_END_IGNORE_DEPRECATIONS
29062951 g_assert_nonnull (stream );
29072952 g_assert_null (error );
29082953 g_clear_pointer (& path , g_free );
@@ -2916,8 +2961,10 @@ module_stream_test_validate_buildarches (void)
29162961 g_getenv ("TEST_DATA_PATH" ),
29172962 version );
29182963 g_assert_nonnull (path );
2964+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
29192965 stream =
29202966 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2967+ G_GNUC_END_IGNORE_DEPRECATIONS
29212968 g_assert_nonnull (stream );
29222969 g_assert_null (error );
29232970 g_clear_pointer (& path , g_free );
@@ -2931,8 +2978,10 @@ module_stream_test_validate_buildarches (void)
29312978 g_getenv ("TEST_DATA_PATH" ),
29322979 version );
29332980 g_assert_nonnull (path );
2981+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
29342982 stream =
29352983 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
2984+ G_GNUC_END_IGNORE_DEPRECATIONS
29362985 g_assert_nonnull (stream );
29372986 g_assert_null (error );
29382987 g_clear_pointer (& path , g_free );
@@ -2946,8 +2995,10 @@ module_stream_test_validate_buildarches (void)
29462995 g_getenv ("TEST_DATA_PATH" ),
29472996 version );
29482997 g_assert_nonnull (path );
2998+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
29492999 stream =
29503000 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
3001+ G_GNUC_END_IGNORE_DEPRECATIONS
29513002 g_assert_nonnull (stream );
29523003 g_assert_null (error );
29533004 g_clear_pointer (& path , g_free );
@@ -2961,8 +3012,10 @@ module_stream_test_validate_buildarches (void)
29613012 g_getenv ("TEST_DATA_PATH" ),
29623013 version );
29633014 g_assert_nonnull (path );
3015+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
29643016 stream =
29653017 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
3018+ G_GNUC_END_IGNORE_DEPRECATIONS
29663019 g_assert_error (error , MODULEMD_ERROR , MMD_ERROR_VALIDATE );
29673020 g_assert_null (stream );
29683021 g_clear_error (& error );
@@ -3014,8 +3067,10 @@ module_stream_test_unicode_desc (void)
30143067 version );
30153068 g_assert_nonnull (path );
30163069
3070+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
30173071 stream =
30183072 modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
3073+ G_GNUC_END_IGNORE_DEPRECATIONS
30193074 g_assert_nonnull (stream );
30203075 g_assert_no_error (error );
30213076 g_clear_object (& stream );
@@ -3038,7 +3093,9 @@ module_stream_v1_test_xmd_issue_274 (void)
30383093 g_strdup_printf ("%s/stream_unicode_v1.yaml" , g_getenv ("TEST_DATA_PATH" ));
30393094 g_assert_nonnull (path );
30403095
3096+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
30413097 stream = modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
3098+ G_GNUC_END_IGNORE_DEPRECATIONS
30423099 g_assert_nonnull (stream );
30433100 g_assert_no_error (error );
30443101 g_assert_cmpint (modulemd_module_stream_get_mdversion (stream ),
@@ -3134,7 +3191,9 @@ module_stream_v2_test_xmd_issue_290_with_example (void)
31343191
31353192 path = g_strdup_printf ("%s/290.yaml" , g_getenv ("TEST_DATA_PATH" ));
31363193 g_assert_nonnull (path );
3194+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
31373195 stream = modulemd_module_stream_read_file (path , TRUE, NULL , NULL , & error );
3196+ G_GNUC_END_IGNORE_DEPRECATIONS
31383197 g_assert_nonnull (stream );
31393198 g_assert_no_error (error );
31403199
@@ -3279,8 +3338,10 @@ module_stream_v1_regression_content_license (void)
32793338 " - bar\n"
32803339 "...\n" ;
32813340
3341+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
32823342 stream = modulemd_module_stream_read_string (
32833343 content_first , TRUE, NULL , NULL , & error );
3344+ G_GNUC_END_IGNORE_DEPRECATIONS
32843345 g_assert_no_error (error );
32853346 g_assert_nonnull (stream );
32863347 g_assert_true (MODULEMD_IS_MODULE_STREAM_V1 (stream ));
@@ -3396,6 +3457,9 @@ main (int argc, char *argv[])
33963457 g_test_add_func ("/modulemd/v2/packager/v2_sanity" ,
33973458 module_packager_v2_sanity );
33983459
3460+ g_test_add_func ("/modulemd/v2/packager/v3_sanity" ,
3461+ module_packager_v3_sanity );
3462+
33993463 g_test_add_func ("/modulemd/v2/modulestream/upgrade_v1_to_v2" ,
34003464 module_stream_test_upgrade_v1_to_v2 );
34013465
0 commit comments