Skip to content

Commit

Permalink
refactor: rename run subcommands to runs
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Mitchell <[email protected]>
  • Loading branch information
starpit committed Sep 25, 2024
1 parent 530a773 commit 639e8d8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions cmd/subcommands/run.go → cmd/subcommands/runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ package subcommands
import (
"github.com/spf13/cobra"

"lunchpail.io/cmd/subcommands/run"
"lunchpail.io/cmd/subcommands/runs"
"lunchpail.io/pkg/compilation"
)

func init() {
if compilation.IsCompiled() {
cmd := &cobra.Command{
Use: "run",
Use: "runs",
Short: "Commands related to runs",
}

rootCmd.AddCommand(cmd)
cmd.AddCommand(run.List())
cmd.AddCommand(run.Instances())
cmd.AddCommand(runs.List())
cmd.AddCommand(runs.Instances())
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build full || observe

package run
package runs

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build full || observe

package run
package runs

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/add-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -eo pipefail

# Wait for minio component
echo "$(tput setaf 2)Pre-Populating s3 app=$testapp target=${LUNCHPAIL_TARGET:-kubernetes} (waiting for s3 to be ready)$(tput sgr0)"
$testapp run instances \
$testapp runs instances \
--namespace $NAMESPACE \
--target ${LUNCHPAIL_TARGET:-kubernetes} \
--component minio \
Expand Down
6 changes: 3 additions & 3 deletions tests/bin/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function waitForIt {

# Note: we will use --run $run_name in a few places, but not all
# -- intentionally so we have test coverage of both code paths
local run_name=$($testapp run list --target ${LUNCHPAIL_TARGET:-kubernetes} -n $ns --latest --name)
local run_name=$($testapp runs list --target ${LUNCHPAIL_TARGET:-kubernetes} -n $ns --latest --name)
if [ -n "$run_name" ]
then echo "✅ PASS found run_name test=$name run_name=$run_name"
else echo "❌ FAIL empty run_name test=$name" && return 1
Expand Down Expand Up @@ -168,7 +168,7 @@ function waitForNoInstances {
echo "Checking that no $component remain running for run=$run_name"
while true
do
nRunning=$($testapp run instances --run $run_name --target ${LUNCHPAIL_TARGET:-kubernetes} --component $component -n $ns)
nRunning=$($testapp runs instances --run $run_name --target ${LUNCHPAIL_TARGET:-kubernetes} --component $component -n $ns)
if [[ $nRunning == 0 ]]
then echo "✅ PASS run-controller test=$name no $component remain running" && break
else echo "$nRunning ${component}(s) remaining running" && sleep 2
Expand Down Expand Up @@ -253,7 +253,7 @@ function waitForUnassignedAndOutbox {
done
echo "✅ PASS run-controller run test $name"

local run_name=$($testapp run list --target ${LUNCHPAIL_TARGET:-kubernetes} -n $ns --latest --name)
local run_name=$($testapp runs list --target ${LUNCHPAIL_TARGET:-kubernetes} -n $ns --latest --name)
echo "✅ PASS run-controller found run test=$name"

waitForEveryoneToDie $run_name
Expand Down

0 comments on commit 639e8d8

Please sign in to comment.