test/koji: move the koji test to schutzbot

The Koji test in Github actions was always a bit quick and dirty solution.
I think it's much nicer solution to run it on Schutzbot.

Therefore, this commit moves the koji_test.go to a new osbuild-koji-tests
executable. This new test isn't run in the base test suite as one would
anticipate but inside the koji.sh test. This is needed because
osbuild-koji-tests requires a running koji instance. This might change
in the future but I think it works for now.
This commit is contained in:
Ondřej Budai 2020-11-02 10:47:24 +01:00
parent 2dc0ecec73
commit 073f9dc79a
8 changed files with 19 additions and 78 deletions

70
.github/koji.conf vendored
View file

@ -1,70 +0,0 @@
; Koji installed from pip is missing the default config.
; This one is taken from Fedora 32 and installed in Github Actions.
[koji]
;configuration for koji cli tool
;url of XMLRPC server
;server = http://hub.example.com/kojihub
server = https://koji.fedoraproject.org/kojihub
;url of web interface
;weburl = http://www.example.com/koji
weburl = https://koji.fedoraproject.org/koji
;url of package download site
;pkgurl = http://www.example.com/packages
;path to the koji top directory
;topdir = /mnt/koji
topurl = https://kojipkgs.fedoraproject.org/
;configuration for Kerberos authentication
authtype = kerberos
krb_rdns = false
;the service name of the principal being used by the hub
;krbservice = host
;the principal to auth as for automated clients
;principal = client@EXAMPLE.COM
;the keytab to auth as for automated clients
;keytab = /etc/krb5.keytab
;enable to lookup dns canonical hostname for krb auth
;krb_canon_host = no
;The realm of server principal. Using client's realm if not set
;krb_server_realm = EXAMPLE.COM
;configuration for SSL authentication
;client certificate
;cert = ~/.koji/client.crt
;certificate of the CA that issued the HTTP server certificate
;serverca = ~/.koji/serverca.crt
;plugin paths, separated by ':' as the same as the shell's PATH
;koji_cli_plugins module and ~/.koji/plugins are always loaded in advance,
;and then be overridden by this option
;plugin_paths = ~/.koji/plugins
;[not_implemented_yet]
;enabled plugins for CLI, runroot and save_failed_tree are available
;plugins =
; runroot plugin is enabled by default in fedora
plugins = runroot
;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200
;timeout = 43200
;timeout of GSSAPI/SSL authentication by seconds, default: 60
;auth_timeout = 60
; use the fast upload feature of koji by default
use_fast_upload = yes
serverca = /tmp/osbuild-composer-koji-test/ca-crt.pem

7
.github/krb5.conf vendored
View file

@ -1,7 +0,0 @@
include /etc/krb5.conf
[realms]
LOCAL = {
kdc = localhost
admin_server = localhost
}

View file

@ -53,44 +53,6 @@ jobs:
- name: Send coverage to codecov.io
run: bash <(curl -s https://codecov.io/bash)
koji:
name: "麹 Koji test"
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
# We need python for koji client.
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Check out code into the Go module directory
uses: actions/checkout@v2
# Koji from pip is missing its config file.
# To fix this, the default Fedora 32 config is included in the repo
# and installed here. See the last line of the script.
- name: Install koji client
run: |
sudo apt-get install -y libkrb5-dev krb5-config
python -m pip install --upgrade pip
pip install koji
sudo cp .github/koji.conf /etc/koji.conf
- name: Run unit tests
run: |
sudo tools/run-koji-container.sh start
koji --server=http://localhost:8080/kojihub --user kojiadmin --password kojipass --authtype=password make-task image
env KRB5_CONFIG=../../../.github/krb5.conf go test -v -race -covermode atomic -coverprofile=coverage.txt -tags koji_test ./internal/upload/koji
sudo tools/run-koji-container.sh stop
- name: Send coverage to codecov.io
run: bash <(curl -s https://codecov.io/bash)
shellcheck:
name: "🐚 Shellcheck"
runs-on: ubuntu-latest