Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic deployment lock implementation #252

Merged
merged 25 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
shini4i committed Feb 19, 2024
commit 2674a6a48d342584f49609d1d92e5e8652d0434b
6 changes: 5 additions & 1 deletion cmd/argo-watcher/server/router_test.go
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ import (
"net/http/httptest"
"testing"

"github.com/shini4i/argo-watcher/cmd/argo-watcher/config"

"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
)
@@ -32,8 +34,10 @@ func TestGetVersion(t *testing.T) {
func TestDeployLock(t *testing.T) {
gin.SetMode(gin.TestMode)

dummyConfig := &config.ServerConfig{}

router := gin.Default()
env := &Env{}
env := &Env{config: dummyConfig}

t.Run("SetDeployLock", func(t *testing.T) {
router.POST("/api/v1/deploy-lock", env.SetDeployLock)
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ services:
DB_NAME: watcher
DB_PASSWORD: watcher
DB_MIGRATIONS_PATH: /app/db/migrations
LOG_LEVEL: debug
depends_on:
migrations:
condition: service_completed_successfully
Loading