Path: blob/main/components/service-waiter/cmd/database_test.go
2498 views
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package cmd56import (7_ "embed"8"os"9"strings"10"testing"11)1213func TestGetLatestMigrationName(t *testing.T) {14t.Run("should have latest migration name", func(t *testing.T) {15path, err := os.Getwd()16if err != nil {17t.Errorf("failed to get current work dir: %v", err)18return19}20if !strings.Contains(path, "components-service-waiter--app") {21t.Skip("skipping test; not running in leeway build")22return23}24if GetLatestMigrationName() == "" {25t.Errorf("migration name should not be empty")26}27})28}293031