File tree Expand file tree Collapse file tree 3 files changed +45
-7
lines changed Expand file tree Collapse file tree 3 files changed +45
-7
lines changed Original file line number Diff line number Diff line change 7676 test-install-build-artifact-task-noarch :
7777 strategy :
7878 matrix :
79+ package :
80+ - name : openvox-server
81+ version : 8.8.0
82+ - name : openvoxdb
83+ version : 8.9.0
84+ - name : openvoxdb-termini
85+ version : 8.9.0
7986 details :
8087 - image : almalinux:9
8188 prereqs :
@@ -124,12 +131,15 @@ jobs:
124131 - name : Test noarch package installation
125132 env :
126133 PT__installdir : ${{ github.workspace }}
127- PT_package : " openvox-server "
128- PT_version : " 8.8.0 "
134+ PT_package : ${{ matrix.package.name }}
135+ PT_version : ${{ matrix.package.version }}
129136 run : ./openvox_bootstrap/tasks/install_build_artifact_linux.sh
130137 - name : Verify openvox-server is installed
131138 shell : bash
139+ env :
140+ PACKAGE : ${{ matrix.package.name }}
141+ VERSION : ${{ matrix.package.version }}
132142 run : |-
133- /opt/puppetlabs/bin/puppet resource package openvox-server > openvox-server .status
134- cat openvox-server .status
135- grep "ensure.*=>.*'8.8.0 " openvox-server .status
143+ /opt/puppetlabs/bin/puppet resource package "${PACKAGE}" > openvox-package .status
144+ cat openvox-package .status
145+ grep "ensure.*=>.*'${VERSION} " openvox-package .status
Original file line number Diff line number Diff line change @@ -493,7 +493,17 @@ set_artifacts_package_url() {
493493 fail " Unhandled package type: '${package_type} '"
494494 ;;
495495 esac
496- package_url=" ${_artifacts_source} /${_package} /${_version} /${package_name} "
496+
497+ case " ${_package} " in
498+ openvoxdb-termini)
499+ local _package_dir=' openvoxdb'
500+ ;;
501+ * )
502+ local _package_dir=" ${_package} "
503+ ;;
504+ esac
505+
506+ package_url=" ${_artifacts_source} /${_package_dir} /${_version} /${package_name} "
497507
498508 export package_name # quiets shellcheck SC2034
499509 assigned ' package_name'
Original file line number Diff line number Diff line change 544544 expect ( status . success? ) . to be ( true )
545545 package_name = 'openvoxdb-termini-8.9.1-1.el.noarch.rpm'
546546 expect ( output ) . to include ( "Assigned package_name=#{ package_name } " )
547- expect ( output ) . to include ( "Assigned package_url=https://foo/openvoxdb-termini /8.9.1/#{ package_name } " )
547+ expect ( output ) . to include ( "Assigned package_url=https://foo/openvoxdb/8.9.1/#{ package_name } " )
548548 end
549549
550550 it 'builds a fedora url' do
558558 expect ( output ) . to include ( "Assigned package_url=https://foo/openvox-agent/8.18.0/#{ package_name } " )
559559 end
560560 end
561+
562+ context 'pathing' do
563+ it 'looks for openvoxdb in the openvoxdb dir' do
564+ allow_script . to set_env ( 'os_family' , 'el' )
565+ output , status = test ( 'set_artifacts_package_url https://foo openvoxdb 8.9.1' )
566+
567+ expect ( status . success? ) . to be ( true )
568+ expect ( output ) . to match ( %r{Assigned package_url=https://foo/openvoxdb/8\. 9\. 1/} )
569+ end
570+
571+ it 'lookds for openvoxdb-termini in the openvoxdb dir as well' do
572+ allow_script . to set_env ( 'os_family' , 'el' )
573+ output , status = test ( 'set_artifacts_package_url https://foo openvoxdb-termini 8.9.1' )
574+
575+ expect ( status . success? ) . to be ( true )
576+ expect ( output ) . to match ( %r{Assigned package_url=https://foo/openvoxdb/8\. 9\. 1/} )
577+ end
578+ end
561579 end
562580end
You can’t perform that action at this time.
0 commit comments