@@ -629,6 +629,16 @@ func TestNative_environment(t *testing.T) {
629629 netrc : nil ,
630630 want : map [string ]string {"BUILD_AUTHOR" : "foo" , "BUILD_AUTHOR_EMAIL" : "" , "BUILD_BASE_REF" : "foo" , "BUILD_BRANCH" : "foo" , "BUILD_CLONE" : "foo" , "BUILD_COMMIT" : "foo" , "BUILD_CREATED" : "1" , "BUILD_ENQUEUED" : "1" , "BUILD_EVENT" : "deployment" , "BUILD_HOST" : "" , "BUILD_LINK" : "" , "BUILD_MESSAGE" : "foo" , "BUILD_NUMBER" : "1" , "BUILD_PARENT" : "1" , "BUILD_REF" : "refs/pull/1/head" , "BUILD_SENDER" : "foo" , "BUILD_SOURCE" : "foo" , "BUILD_STARTED" : "1" , "BUILD_STATUS" : "foo" , "BUILD_TARGET" : "production" , "BUILD_TITLE" : "foo" , "BUILD_WORKSPACE" : "/vela/src/foo/foo/foo" , "CI" : "true" , "REPOSITORY_ACTIVE" : "false" , "REPOSITORY_ALLOW_EVENTS" : "" , "REPOSITORY_BRANCH" : "foo" , "REPOSITORY_CLONE" : "foo" , "REPOSITORY_FULL_NAME" : "foo" , "REPOSITORY_LINK" : "foo" , "REPOSITORY_NAME" : "foo" , "REPOSITORY_ORG" : "foo" , "REPOSITORY_PRIVATE" : "false" , "REPOSITORY_TIMEOUT" : "1" , "REPOSITORY_TRUSTED" : "false" , "REPOSITORY_VISIBILITY" : "foo" , "VELA" : "true" , "VELA_ADDR" : "foo" , "VELA_SERVER_ADDR" : "foo" , "VELA_OPEN_ID_ISSUER" : "foo" , "VELA_BUILD_APPROVED_AT" : "0" , "VELA_BUILD_APPROVED_BY" : "" , "VELA_BUILD_AUTHOR" : "foo" , "VELA_BUILD_AUTHOR_EMAIL" : "" , "VELA_BUILD_BASE_REF" : "foo" , "VELA_BUILD_BRANCH" : "foo" , "VELA_BUILD_CLONE" : "foo" , "VELA_BUILD_COMMIT" : "foo" , "VELA_BUILD_CREATED" : "1" , "VELA_BUILD_DISTRIBUTION" : "" , "VELA_BUILD_ENQUEUED" : "1" , "VELA_BUILD_EVENT" : "deployment" , "VELA_BUILD_EVENT_ACTION" : "" , "VELA_BUILD_HOST" : "" , "VELA_BUILD_ROUTE" : "" , "VELA_BUILD_LINK" : "" , "VELA_BUILD_MESSAGE" : "foo" , "VELA_BUILD_NUMBER" : "1" , "VELA_BUILD_PARENT" : "1" , "VELA_BUILD_REF" : "refs/pull/1/head" , "VELA_BUILD_RUNTIME" : "" , "VELA_BUILD_SENDER" : "foo" , "VELA_BUILD_SENDER_SCM_ID" : "foo" , "VELA_BUILD_SOURCE" : "foo" , "VELA_BUILD_STARTED" : "1" , "VELA_BUILD_STATUS" : "foo" , "VELA_BUILD_TARGET" : "production" , "VELA_BUILD_TITLE" : "foo" , "VELA_BUILD_WORKSPACE" : "/vela/src/foo/foo/foo" , "VELA_DATABASE" : "foo" , "VELA_DEPLOYMENT" : "production" , "VELA_DEPLOYMENT_NUMBER" : "0" , "VELA_DISTRIBUTION" : "TODO" , "VELA_HOST" : "foo" , "VELA_NETRC_MACHINE" : "foo" , "VELA_NETRC_PASSWORD" : "TODO" , "VELA_NETRC_USERNAME" : "x-oauth-basic" , "VELA_QUEUE" : "foo" , "VELA_REPO_ACTIVE" : "false" , "VELA_REPO_ALLOW_EVENTS" : "" , "VELA_REPO_APPROVAL_TIMEOUT" : "0" , "VELA_REPO_APPROVE_BUILD" : "" , "VELA_REPO_BRANCH" : "foo" , "VELA_REPO_TOPICS" : "cloud,security" , "VELA_REPO_BUILD_LIMIT" : "1" , "VELA_REPO_CLONE" : "foo" , "VELA_REPO_CUSTOM_PROPS" : `{"foo":"bar"}` , "VELA_REPO_INSTALL_ID" : "0" , "VELA_REPO_FULL_NAME" : "foo" , "VELA_REPO_LINK" : "foo" , "VELA_REPO_NAME" : "foo" , "VELA_REPO_ORG" : "foo" , "VELA_REPO_OWNER" : "foo" , "VELA_REPO_PIPELINE_TYPE" : "" , "VELA_REPO_PRIVATE" : "false" , "VELA_REPO_TIMEOUT" : "1" , "VELA_REPO_TRUSTED" : "false" , "VELA_REPO_VISIBILITY" : "foo" , "VELA_RUNTIME" : "TODO" , "VELA_SOURCE" : "foo" , "VELA_USER_ACTIVE" : "false" , "VELA_USER_ADMIN" : "false" , "VELA_USER_FAVORITES" : "[]" , "VELA_USER_NAME" : "foo" , "VELA_VERSION" : "TODO" , "VELA_WORKSPACE" : "/vela/src/foo/foo/foo" , "VELA_ID_TOKEN_REQUEST_URL" : "foo/api/v1/repos/foo/builds/1/id_token" },
631631 },
632+ // app installation push
633+ {
634+ w : workspace ,
635+ b : & api.Build {ID : & num64 , Repo : & api.Repo {ID : & num64 , Owner : & api.User {ID : & num64 , Name : & str , Token : & str , Active : & booL , Admin : & booL }, Org : & str , Name : & str , FullName : & str , Link : & str , Clone : & str , Branch : & str , Topics : & topics , CustomProps : & props , BuildLimit : & num32 , Timeout : & num32 , Visibility : & str , Private : & booL , Trusted : & booL , Active : & booL }, Number : & num64 , Parent : & num64 , Event : & push , Status : & str , Error : & str , Enqueued : & num64 , Created : & num64 , Started : & num64 , Finished : & num64 , Deploy : & str , Clone : & str , Source : & str , Title : & str , Message : & str , Commit : & str , Sender : & str , SenderSCMID : & str , Author : & str , Branch : & str , Ref : & str , BaseRef : & str },
636+ m : & internal.Metadata {Database : & internal.Database {Driver : str , Host : str }, Queue : & internal.Queue {Driver : str , Host : str }, Source : & internal.Source {Driver : str , Host : str }, Vela : & internal.Vela {Address : str , WebAddress : str , OpenIDIssuer : str }},
637+ r : & api.Repo {ID : & num64 , Owner : & api.User {ID : & num64 , Name : & str , Token : & str , Active : & booL , Admin : & booL }, Org : & str , Name : & str , FullName : & str , Link : & str , Clone : & str , Branch : & str , Topics : & topics , CustomProps : & props , BuildLimit : & num32 , Timeout : & num32 , Visibility : & str , Private : & booL , Trusted : & booL , Active : & booL , InstallID : & num64 },
638+ u : & api.User {ID : & num64 , Name : & str , Token : & str , Active : & booL , Admin : & booL },
639+ netrc : & netrc ,
640+ want : map [string ]string {"BUILD_AUTHOR" : "foo" , "BUILD_AUTHOR_EMAIL" : "" , "BUILD_BASE_REF" : "foo" , "BUILD_BRANCH" : "foo" , "BUILD_CLONE" : "foo" , "BUILD_COMMIT" : "foo" , "BUILD_CREATED" : "1" , "BUILD_ENQUEUED" : "1" , "BUILD_EVENT" : "push" , "BUILD_HOST" : "" , "BUILD_LINK" : "" , "BUILD_MESSAGE" : "foo" , "BUILD_NUMBER" : "1" , "BUILD_PARENT" : "1" , "BUILD_REF" : "foo" , "BUILD_SENDER" : "foo" , "BUILD_SOURCE" : "foo" , "BUILD_STARTED" : "1" , "BUILD_STATUS" : "foo" , "BUILD_TITLE" : "foo" , "BUILD_WORKSPACE" : "/vela/src/foo/foo/foo" , "CI" : "true" , "REPOSITORY_ACTIVE" : "false" , "REPOSITORY_ALLOW_EVENTS" : "" , "REPOSITORY_BRANCH" : "foo" , "REPOSITORY_CLONE" : "foo" , "REPOSITORY_FULL_NAME" : "foo" , "REPOSITORY_LINK" : "foo" , "REPOSITORY_NAME" : "foo" , "REPOSITORY_ORG" : "foo" , "REPOSITORY_PRIVATE" : "false" , "REPOSITORY_TIMEOUT" : "1" , "REPOSITORY_TRUSTED" : "false" , "REPOSITORY_VISIBILITY" : "foo" , "VELA" : "true" , "VELA_ADDR" : "foo" , "VELA_SERVER_ADDR" : "foo" , "VELA_OPEN_ID_ISSUER" : "foo" , "VELA_BUILD_APPROVED_AT" : "0" , "VELA_BUILD_APPROVED_BY" : "" , "VELA_BUILD_AUTHOR" : "foo" , "VELA_BUILD_AUTHOR_EMAIL" : "" , "VELA_BUILD_BASE_REF" : "foo" , "VELA_BUILD_BRANCH" : "foo" , "VELA_BUILD_CLONE" : "foo" , "VELA_BUILD_COMMIT" : "foo" , "VELA_BUILD_CREATED" : "1" , "VELA_BUILD_DISTRIBUTION" : "" , "VELA_BUILD_ENQUEUED" : "1" , "VELA_BUILD_EVENT" : "push" , "VELA_BUILD_EVENT_ACTION" : "" , "VELA_BUILD_HOST" : "" , "VELA_BUILD_ROUTE" : "" , "VELA_BUILD_LINK" : "" , "VELA_BUILD_MESSAGE" : "foo" , "VELA_BUILD_NUMBER" : "1" , "VELA_BUILD_PARENT" : "1" , "VELA_BUILD_REF" : "foo" , "VELA_BUILD_RUNTIME" : "" , "VELA_BUILD_SENDER" : "foo" , "VELA_BUILD_SENDER_SCM_ID" : "foo" , "VELA_BUILD_SOURCE" : "foo" , "VELA_BUILD_STARTED" : "1" , "VELA_BUILD_STATUS" : "foo" , "VELA_BUILD_TITLE" : "foo" , "VELA_BUILD_WORKSPACE" : "/vela/src/foo/foo/foo" , "VELA_DATABASE" : "foo" , "VELA_DISTRIBUTION" : "TODO" , "VELA_GIT_TOKEN" : "foo" , "VELA_HOST" : "foo" , "VELA_NETRC_MACHINE" : "foo" , "VELA_NETRC_PASSWORD" : "foo" , "VELA_NETRC_USERNAME" : "x-oauth-basic" , "VELA_QUEUE" : "foo" , "VELA_REPO_ACTIVE" : "false" , "VELA_REPO_ALLOW_EVENTS" : "" , "VELA_REPO_APPROVAL_TIMEOUT" : "0" , "VELA_REPO_APPROVE_BUILD" : "" , "VELA_REPO_BRANCH" : "foo" , "VELA_REPO_TOPICS" : "cloud,security" , "VELA_REPO_BUILD_LIMIT" : "1" , "VELA_REPO_CLONE" : "foo" , "VELA_REPO_CUSTOM_PROPS" : `{"foo":"bar"}` , "VELA_REPO_INSTALL_ID" : "1" , "VELA_REPO_FULL_NAME" : "foo" , "VELA_REPO_LINK" : "foo" , "VELA_REPO_NAME" : "foo" , "VELA_REPO_ORG" : "foo" , "VELA_REPO_OWNER" : "foo" , "VELA_REPO_PIPELINE_TYPE" : "" , "VELA_REPO_PRIVATE" : "false" , "VELA_REPO_TIMEOUT" : "1" , "VELA_REPO_TRUSTED" : "false" , "VELA_REPO_VISIBILITY" : "foo" , "VELA_RUNTIME" : "TODO" , "VELA_SOURCE" : "foo" , "VELA_USER_ACTIVE" : "false" , "VELA_USER_ADMIN" : "false" , "VELA_USER_FAVORITES" : "[]" , "VELA_USER_NAME" : "foo" , "VELA_VERSION" : "TODO" , "VELA_WORKSPACE" : "/vela/src/foo/foo/foo" , "VELA_ID_TOKEN_REQUEST_URL" : "foo/api/v1/repos/foo/builds/1/id_token" },
641+ },
632642 }
633643
634644 // run test
0 commit comments