#!/usr/bin/env bats load 'helpers/utils' setup() { # Setup the environment for the test; this should override $HOME too omni_setup 3>&- setup_omni_config 3>&- # Add one repository setup_git_dir "git/github.com/test1org/test1repo" "git@github.com:test1org/test1repo.git" # Change directory to the repository cd "git/github.com/test1org/test1repo" } teardown() { check_commands } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to install formula" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade formula when upgrade is passed on the command line" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade formula when upgrade is configured at the work directory level" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade formula when upgrade is configured for the formula" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation does not upgrade formula if it is already installed and upgrade is not configured" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to install cask" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade cask when upgrade is passed on the command line" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade cask when upgrade is configured at the work directory level" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to upgrade cask when upgrade is configured for the cask" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation does not upgrade cask if it is already installed and upgrade is not configured" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:install @test "omni up homebrew operation calls to install formula with full tap path" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] } # bats test_tags=omni:up,omni:up:homebrew,omni:up:homebrew:tap @test "omni up homebrew operation calls to tap repository" { cat > .omni.yaml <&- echo "STATUS: $status" echo "OUTPUT: $output" [ "$status" -eq 0 ] }