test/cmd: add api.sh

Add an additional integration test, which builds a fedora-32 image via
the newly moved composer API.

This adds a new certificate for clients to authenticate, with
CN=client.osbuild.org.

Also stop allowing certificates with `CN=worker.osbuild.org` in the
`osbuild-composer.toml` used in tests and amend `osbuild-auth-tests` to
use `CN=client.osbuild.org` for accessing the koji API.

Heavily based on an earlier version of this test in `test/cmd/aws.sh` by
Sanne Raymaekers.
This commit is contained in:
Lars Karlitski 2020-10-08 08:41:54 +02:00 committed by Ondřej Budai
parent 8161f2fa04
commit 0aef7ff5d5
7 changed files with 227 additions and 4 deletions

View file

@ -181,7 +181,7 @@ func TestKojiAPIAuth(t *testing.T) {
subj string
success bool
}{
{"valid CN 1", "/CN=worker.osbuild.org", true},
{"valid CN 1", "/CN=client.osbuild.org", true},
{"valid CN 2", "/CN=localhost", true},
{"invalid CN", "/CN=example.com", false},
}