From bdda08223e5c28640833f44a86e2bb2bb614bc7d Mon Sep 17 00:00:00 2001 From: erenJag <64777133+erenJag@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:00:30 +0200 Subject: [PATCH] Fix hub CI (#86) --- .github/workflows/hub-ci.yml | 2 +- cmd/crowdsec-cli/backup-restore.go | 4 ++-- wizard.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/hub-ci.yml b/.github/workflows/hub-ci.yml index ef43afbcb1f..88824bd4b88 100644 --- a/.github/workflows/hub-ci.yml +++ b/.github/workflows/hub-ci.yml @@ -43,6 +43,6 @@ jobs: run: | for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do echo "::group::Test-${i}" ; - ./main $i || (echo "::error file=${i}::Failed test for ${i}" ; diff ${i}"/results.yaml" ${i}"/results.yaml.fail") ; + ./main -c dev.yaml $i || (echo "::error file=${i}::Failed test for ${i}" ; diff ${i}"/results.json" ${i}"/results.json.fail") ; echo "::endgroup::" ; done ; diff --git a/cmd/crowdsec-cli/backup-restore.go b/cmd/crowdsec-cli/backup-restore.go index d6c04cd5b04..747de7124db 100644 --- a/cmd/crowdsec-cli/backup-restore.go +++ b/cmd/crowdsec-cli/backup-restore.go @@ -415,7 +415,7 @@ cscli backup restore ./my-backup`, } outputCTX, err = outputs.NewOutput(&outputConfig, false) if err != nil { - log.Fatalf("Failed to load output plugins") + log.Fatalf("Failed to load output plugins : %v", err) } if err := cwhub.GetHubIdx(); err != nil { log.Fatalf("Failed to get Hub index : %v", err) @@ -456,7 +456,7 @@ cscli backup restore ./my-backup`, } outputCTX, err = outputs.NewOutput(&outputConfig, false) if err != nil { - log.Fatalf("Failed to load output plugins") + log.Fatalf("Failed to load output plugins : %v", err) } if err := cwhub.GetHubIdx(); err != nil { diff --git a/wizard.sh b/wizard.sh index c92f635185b..72cd8cd0dc9 100755 --- a/wizard.sh +++ b/wizard.sh @@ -314,14 +314,14 @@ update_full() { fi log_info "Backing up existing configuration" - ${CSCLI_BIN} backup save ${BACKUP_DIR} + ${CSCLI_BIN_INSTALLED} backup save ${BACKUP_DIR} log_info "Cleanup existing crowdsec configuration" uninstall_crowdsec log_info "Installing crowdsec" install_crowdsec log_info "Restoring configuration" - ${CSCLI_BIN} update - ${CSCLI_BIN} backup restore ${BACKUP_DIR} + ${CSCLI_BIN_INSTALLED} update + ${CSCLI_BIN_INSTALLED} backup restore ${BACKUP_DIR} log_info "Finished, restarting" systemctl restart crowdsec || log_err "Failed to restart crowdsec" }