mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-18 15:26:58 +00:00
6dc50652c8
For example: in utils/deb/deb-ci.sh line 27: 'which git-secret': SC2230: which is non-standard. Use builtin 'command -v' instead.
40 lines
935 B
Bash
40 lines
935 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Note that this file is created for test purposes:
|
|
# 1. It runs inside the Docker container
|
|
# 2. It does not use `sudo` or anything
|
|
# 3. If you would like to install `.rpm` package on your system, see `Installation`
|
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
source "${SECRET_PROJECT_ROOT}/utils/build-utils.sh"
|
|
|
|
# This folder should contain just one .rpm file:
|
|
RPM_FILE_LOCATION=$(locate_rpm)
|
|
|
|
|
|
# Integration tests
|
|
function integration_tests {
|
|
# Note that `dnf` must be installed.
|
|
# CentOS 6 does not support `dnf`.
|
|
|
|
# Installing the package:
|
|
dnf install -y "$RPM_FILE_LOCATION"
|
|
|
|
# Testing the installation:
|
|
dnf info "git-secret"
|
|
# 'command -v' is like 'which'
|
|
command -v "git-secret"
|
|
|
|
# Test the manuals:
|
|
man --where "git-secret" # .7
|
|
man --where "git-secret-init" # .1
|
|
}
|
|
|
|
integration_tests
|
|
|
|
# Unit tests:
|
|
# shellcheck disable=SC1090,SC1091
|
|
source "${SECRET_PROJECT_ROOT}/utils/tests.sh"
|