Skip to content

Commit

Permalink
Remove root check in tests, include test suite script
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhartman committed Jul 22, 2021
1 parent ecf0841 commit 7ebf617
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
18 changes: 9 additions & 9 deletions tests/brew
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash
#
# Fully automated LAMP installation and configuration using Trusted localhost
# Fully automated LAMP installation and configuration using Trusted localhost
# SSL Certificates
#
# Copyright: Copyright (C) 2018 Justin Hartman (https://justin.hartman.me)
# Author : Justin Hartman <[email protected]> (https://justin.hartman.me)
#
# Copyright: Copyright (C) 2018 Justin Hartman (https://justinhartman.co)
# Author : Justin Hartman <[email protected]> (https://justinhartman.co)
# License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0
# Version : 1.1.0
# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL
# Link : https://justin.hartman.me
# Link : https://github.com/justinhartman/lamp-ssl
# Link : https://justinhartman.co
# Since : 0.5.0
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
Expand All @@ -23,7 +23,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#

#######################################
# Includes the colour palette and
Expand All @@ -37,7 +37,7 @@
#######################################
global_includes ()
{
source scripts/globals.sh
source ./test_suite.sh
source scripts/colour_palette.sh
}

Expand Down
32 changes: 16 additions & 16 deletions tests/lamp-add
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# Add new domains to your setup. This creates the website folder, link to the
# /etc/hosts file, creates a SSL certificate and sets up a git project for you
# to begin using.
#
# Copyright: Copyright (C) 2018 Justin Hartman (https://justin.hartman.me)
# Author : Justin Hartman <[email protected]> (https://justin.hartman.me)
#
# Copyright: Copyright (C) 2018 Justin Hartman (https://justinhartman.co)
# Author : Justin Hartman <[email protected]> (https://justinhartman.co)
# License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0
# Version : 1.1.0
# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL
# Link : https://justin.hartman.me
# Link : https://github.com/justinhartman/lamp-ssl
# Link : https://justinhartman.co
# Since : 0.5.0
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
Expand All @@ -24,7 +24,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#

#######################################
# Includes the colour palette and
Expand All @@ -38,7 +38,7 @@
#######################################
global_includes ()
{
source scripts/globals.sh
source ./test_suite.sh
source scripts/colour_palette.sh
}

Expand Down Expand Up @@ -75,14 +75,14 @@ main_application ()

global_includes # Includes global variables and file paths.

if ! [ "$(id -u)" = 0 ]; then
printf "${RED}%s\\n" "$TOP"
printf "* %-76s %s\\n" "This needs to be run as root. Please run it again using 'sudo' by executing" "*"
printf "* %-76s %s\\n" "the following command: $ sudo ./add_domain" "*"
printf "%s${NOC}\\n\\n" "$BOTTOM"

exit 1
fi
#if ! [ "$(id -u)" = 0 ]; then
# printf "${RED}%s\\n" "$TOP"
# printf "* %-76s %s\\n" "This needs to be run as root. Please run it again using 'sudo' by executing" "*"
# printf "* %-76s %s\\n" "the following command: $ sudo ./add_domain" "*"
# printf "%s${NOC}\\n\\n" "$BOTTOM"
#
# exit 1
#fi

main_application # Runs the main install
exit 0
24 changes: 12 additions & 12 deletions tests/lamp-upgrade
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#
# Upgrade all the software.
#
# Copyright: Copyright 2018-2020 Justin Hartman (https://hartman.me)
# Author : Justin Hartman <[email protected]> (https://hartman.me)
# Copyright: Copyright 2018-2020 Justin Hartman (https://justinhartman.co)
# Author : Justin Hartman <[email protected]> (https://justinhartman.co)
# License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0
# Version : 1.2.2
# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL
# Link : https://github.com/justinhartman/lamp-ssl
# Since : 1.1.0
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -34,7 +34,7 @@
# Variables
#######################################
global_includes() {
source ./scripts/globals.sh
source ./test_suite.sh
source ./scripts/colour_palette.sh
}

Expand All @@ -58,14 +58,14 @@ main_application() {

global_includes # Includes global variables and file paths.

if ! [ "$(id -u)" = 0 ]; then
printf "${RED}%s\\n" "$TOP"
printf '* %-76s %s\n' "This needs to be run as root. Please run it again using 'sudo' by executing" "*"
printf '* %-76s %s\n' "the following command: $ sudo ./upgrade" "*"
printf "%s${NOC}\\n\\n" "$BOTTOM"

exit 1
fi
#if ! [ "$(id -u)" = 0 ]; then
# printf "${RED}%s\\n" "$TOP"
# printf '* %-76s %s\n' "This needs to be run as root. Please run it again using 'sudo' by executing" "*"
# printf '* %-76s %s\n' "the following command: $ sudo ./upgrade" "*"
# printf "%s${NOC}\\n\\n" "$BOTTOM"
#
# exit 1
#fi

#######################################
# Runs the main upgrade.
Expand Down

0 comments on commit 7ebf617

Please sign in to comment.