@@ -227,6 +227,42 @@ def test_package_list_command(self, regen=REGEN_TEST_FIXTURES):
227227 ef .write (result .output )
228228 assert result .output == open (expected_file ).read ()
229229
230+ def test_plugin_package_only_fails_with_license_scan (self ):
231+ test_dir = self .get_test_loc ('maven2' )
232+ result_file = self .get_temp_file ('json' )
233+ try :
234+ run_scan_click (['--package-only' , '--license' , test_dir , '--json' , result_file ])
235+ raise Exception ("This SCAN should raise an AssertionError for conflicting CLI options" )
236+ except AssertionError :
237+ pass
238+
239+ def test_plugin_package_only_fails_with_summary_scan (self ):
240+ test_dir = self .get_test_loc ('maven2' )
241+ result_file = self .get_temp_file ('json' )
242+ try :
243+ run_scan_click (['--package-only' , '--summary' , '--classify' , test_dir , '--json' , result_file ])
244+ raise Exception ("This SCAN should raise an AssertionError for conflicting CLI options" )
245+ except AssertionError :
246+ pass
247+
248+ def test_plugin_package_only_fails_with_package_scan (self ):
249+ test_dir = self .get_test_loc ('maven2' )
250+ result_file = self .get_temp_file ('json' )
251+ try :
252+ run_scan_click (['--package-only' , '--package' , test_dir , '--json' , result_file ])
253+ raise Exception ("This SCAN should raise an AssertionError for conflicting CLI options" )
254+ except AssertionError :
255+ pass
256+
257+ def test_plugin_package_only_fails_with_system_package_scan (self ):
258+ test_dir = self .get_test_loc ('maven2' )
259+ result_file = self .get_temp_file ('json' )
260+ try :
261+ run_scan_click (['--package-only' , '--system-package' , test_dir , '--json' , result_file ])
262+ raise Exception ("This SCAN should raise an AssertionError for conflicting CLI options" )
263+ except AssertionError :
264+ pass
265+
230266 def test_system_package_get_installed_packages (self ):
231267 test_dir = self .extract_test_tar ('debian/basic-rootfs.tar.gz' )
232268 expected_file = self .get_test_loc ('plugin/get_installed_packages-expected.json' )
0 commit comments