Fixes issue where network failures during plugin install was returning 0 exit code. Closes #3367

This commit is contained in:
Puskar Basu
2023-05-05 15:32:41 +05:30
committed by GitHub
parent 8b51df9397
commit 414664080c
3 changed files with 4 additions and 4 deletions

View File

@@ -237,6 +237,8 @@ func runPluginInstallCmd(cmd *cobra.Command, args []string) {
installReports = append(installReports, report)
if !report.Skipped {
installCount++
} else {
exitCode = constants.ExitCodePluginInstallFailure
}
}

View File

@@ -7,6 +7,7 @@ const (
ExitCodePluginLoadingError = 11 // plugin - loading error
ExitCodePluginListFailure = 12 // plugin - listing failed
ExitCodePluginNotFound = 13 // plugin - not found
ExitCodePluginInstallFailure = 14 // plugin - install failed
ExitCodeSnapshotCreationFailed = 21 // snapshot - creation failed
ExitCodeSnapshotUploadFailed = 22 // snapshot - upload failed
ExitCodeServiceSetupFailure = 31 // service - setup failed

View File

@@ -88,13 +88,10 @@ load "$LIB_BATS_SUPPORT/load.bash"
rm -rf $target_install_directory
}
@test "start service, install plugin and query" {
@test "start service and query" {
# start service
steampipe service start
# install plugin
steampipe plugin install chaos
# query the plugin
run steampipe query "select time_col from chaos_cache_check limit 1"
# check if the query passes