tests: Sync with downstream RHEL
This commit is contained in:
		
							parent
							
								
									2d91976d68
								
							
						
					
					
						commit
						0b229db4b1
					
				| @ -21,3 +21,4 @@ | |||||||
|     - verify: |     - verify: | ||||||
|         dir: . |         dir: . | ||||||
|         run: ./verify.sh |         run: ./verify.sh | ||||||
|  |         save-files: ["logs/*"] | ||||||
|  | |||||||
| @ -1,12 +1,13 @@ | |||||||
| #!/bin/sh | #!/bin/sh | ||||||
| set -eux | set -eux | ||||||
| 
 | 
 | ||||||
| # HACK: this should be a var: https://pagure.io/standard-test-roles/issue/263 | # from standard-test-source | ||||||
| SOURCE=/var/str/source | SOURCE="$(pwd)/source" | ||||||
| 
 | LOGS="$(pwd)/logs" | ||||||
| # HACK: reset the journal (tests should only look at the relevant portion) | mkdir -p "$LOGS" | ||||||
| rm -rf /var/log/journal/* | chmod a+w "$LOGS" | ||||||
| systemctl restart systemd-journald | # these get mounted into the tasks container | ||||||
|  | chcon -Rt container_file_t "$SOURCE" "$LOGS" | ||||||
| 
 | 
 | ||||||
| # create user account for logging in | # create user account for logging in | ||||||
| if ! id admin 2>/dev/null; then | if ! id admin 2>/dev/null; then | ||||||
| @ -20,19 +21,24 @@ fi | |||||||
| # which tests the host. Use a fixed tag to avoid running into failures with | # which tests the host. Use a fixed tag to avoid running into failures with | ||||||
| # "latest", as we don't gate container updates on the dist-git tests for now. | # "latest", as we don't gate container updates on the dist-git tests for now. | ||||||
| RC=0 | RC=0 | ||||||
| cat <<EOF | podman run --rm -i docker.io/cockpit/tests:2018-11-09 /bin/sh -eux || RC=$? | cat <<EOF | podman run --rm -i -v "$SOURCE:/source:ro" -v "$LOGS:/logs" docker.io/cockpit/tasks:2019-06-03 /bin/sh -eux || RC=$? | ||||||
| # CSP does not like the the invalid host name _gateway, so translate it | # CSP does not like the the invalid host name _gateway, so translate it | ||||||
| HOST=\$(getent hosts _gateway | cut -f1 -d' ') | HOST=\$(getent hosts _gateway | cut -f1 -d' ') | ||||||
| 
 | 
 | ||||||
| # copy source dir, otherwise it's owned by root:root and not chown'able | trap "cp --verbose Test* /logs/ || true" EXIT | ||||||
| cp -a cockpit /tmp/ |  | ||||||
| cd /tmp/cockpit |  | ||||||
| 
 | 
 | ||||||
| # check out current rhel-x branch to get the tests; they are not shipped in the source | # tests need cockpit's bots/ libraries | ||||||
| git fetch origin rhel-x | cd /tmp | ||||||
| git checkout FETCH_HEAD | git clone --depth=1 https://github.com/cockpit-project/cockpit | ||||||
|  | cd cockpit | ||||||
|  | # copy tests from our source, so that they match the released version | ||||||
|  | rm -rf test | ||||||
|  | cp -a /source/test . | ||||||
| 
 | 
 | ||||||
| export TEST_OS=rhel-x | # only install a subset to save time/space | ||||||
|  | npm install axe-core chrome-remote-interface sizzle | ||||||
|  | 
 | ||||||
|  | export TEST_OS=fedora-30 | ||||||
| test/verify/check-menu -tv --machine \$HOST:22 --browser \$HOST:9090 | test/verify/check-menu -tv --machine \$HOST:22 --browser \$HOST:9090 | ||||||
| EOF | EOF | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user