@@ -85,6 +85,7 @@ describe("githubInputs", () => {
8585 expect ( test ) . to . haveOwnProperty ( "imageOverride" ) . and . to . equal ( undefined ) ;
8686 expect ( test ) . to . haveOwnProperty ( "envPassthrough" ) . and . to . deep . equal ( [ ] ) ;
8787 expect ( test ) . to . haveOwnProperty ( "hideCloudWatchLogs" ) . and . to . equal ( false ) ;
88+ expect ( test ) . to . haveOwnProperty ( "disableGithubEnvVars" ) . and . to . equal ( false ) ;
8889 } ) ;
8990
9091 it ( "a project name is required." , ( ) => {
@@ -400,6 +401,29 @@ describe("inputs2Parameters", () => {
400401 expect ( test ) . to . not . haveOwnProperty ( "sourceLocationOverride" ) ;
401402 expect ( test ) . to . not . haveOwnProperty ( "sourceVersion" ) ;
402403 } ) ;
404+
405+ it ( "can process disable-github-env-vars" , ( ) => {
406+ process . env [ `GITHUB_REPOSITORY` ] = repoInfo ;
407+ process . env [ `GITHUB_SHA` ] = sha ;
408+
409+ const test = inputs2Parameters ( {
410+ projectName,
411+ sourceVersion : sha ,
412+ owner : "owner" ,
413+ repo : "repo" ,
414+ disableGithubEnvVars : true ,
415+ } ) ;
416+
417+ const [ repoEnv ] = test . environmentVariablesOverride . filter (
418+ ( { name } ) => name === "GITHUB_REPOSITORY"
419+ ) ;
420+ expect ( repoEnv ) . to . equal ( undefined ) ;
421+
422+ const [ shaEnv ] = test . environmentVariablesOverride . filter (
423+ ( { name } ) => name === "GITHUB_SHA"
424+ ) ;
425+ expect ( shaEnv ) . to . equal ( undefined ) ;
426+ } ) ;
403427} ) ;
404428
405429describe ( "waitForBuildEndTime" , ( ) => {
0 commit comments