5555from easybuild .tools .github import det_pr_title , fetch_easyconfigs_from_commit , fetch_files_from_commit
5656from easybuild .tools .github import is_patch_for , pick_default_branch
5757from easybuild .tools .testing import create_test_report , post_pr_test_report , session_state
58- from easybuild .tools .testing import exclude_env_from_report_add , exclude_env_from_report_clear
5958import easybuild .tools .github as gh
6059
6160try :
@@ -1320,15 +1319,11 @@ def test_github_create_test_report(self):
13201319 ]
13211320 environ = {
13221321 'USER' : 'test' ,
1323- 'DONT_REMOVE_ME' : 'test-123' ,
13241322 }
13251323 JWT_HDR = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
13261324 JWT_PLD = 'eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNzA4MzQ1MTIzLCJleHAiOjE3MDgzNTUxMjN9'
13271325 JWT_SIG = 'SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
13281326 secret_environ = {
1329- 'REMOVEME' : 'test-abc' ,
1330- 'ReMoVeMe2' : 'TeSt-xyz' ,
1331-
13321327 # Test default removal based on variable value
13331328 'TOTALLYPUBLICVAR1' : 'AKIAIOSFODNN7EXAMPLE' , # AWS_ACCESS_KEY
13341329 'TOTALLYPUBLICVAR2' : 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY' , # AWS_SECRET_KEY
@@ -1355,27 +1350,19 @@ def test_github_create_test_report(self):
13551350 'time' : gmtime (0 ),
13561351 }
13571352
1358- # Test exclude_env_from_report_add/clear
1359- exclude_env_from_report_add ('REMOVEME' .lower ()) # Also check that the name is uppercased in the check
1360-
13611353 res = create_test_report ("just a test" , ecs_with_res , init_session_state )
13621354 patterns = [
13631355 "**SUCCESS** _test.eb_" ,
13641356 "**FAIL (build issue)** _fail.eb_" ,
13651357 "01 Jan 1970 00:00:00" ,
13661358 "EASYBUILD_DEBUG=1" ,
1367- "DONT_REMOVE_ME = test-123 " ,
1359+ "USER = test" ,
13681360 ]
13691361 for pattern in patterns :
13701362 self .assertIn (pattern , res ['full' ])
13711363
1372- # Test that excluded patterns works by matching also partial strings
1373- exclude_patterns1 = [
1374- 'REMOVEME' ,
1375- 'ReMoVeMe2' ,
1376- ]
13771364 # Test that known token regexes for ENV vars are excluded by default
1378- exclude_patterns2 = [
1365+ exclude_patterns = [
13791366 'TOTALLYPUBLICVAR1' ,
13801367 'TOTALLYPUBLICVAR2' ,
13811368 'TOTALLYPUBLICVAR3' ,
@@ -1392,21 +1379,18 @@ def test_github_create_test_report(self):
13921379 'SECRET_SECRET' ,
13931380 'INFO_CREDENTIALS' ,
13941381 ]
1395- for pattern in exclude_patterns1 + exclude_patterns2 :
1382+ for pattern in exclude_patterns :
13961383 # .lower() test that variable name is not case sensitive for excluding
13971384 self .assertNotIn (pattern .lower (), res ['full' ])
13981385
1399- exclude_env_from_report_clear ()
1400- patterns += exclude_patterns1
1401-
14021386 res = create_test_report ("just a test" , ecs_with_res , init_session_state )
14031387 for pattern in patterns :
14041388 self .assertIn (pattern , res ['full' ])
14051389
14061390 for pattern in patterns [:2 ]:
14071391 self .assertIn (pattern , res ['overview' ])
14081392
1409- for pattern in exclude_patterns2 :
1393+ for pattern in exclude_patterns :
14101394 # .lower() test that variable name is not case sensitive for excluding
14111395 self .assertNotIn (pattern .lower (), res ['full' ])
14121396
0 commit comments